Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextView t;
- ImageView image;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- getSupportActionBar().setDisplayShowHomeEnabled(true);
- getSupportActionBar().setIcon(R.drawable.ic_logo);
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- t = (TextView) findViewById(R.id.nazvanie);
- Typeface meCustomFont1 = Typeface.createFromAsset(getAssets(), "fonts/LegionaryBold.otf");
- t.setTypeface(meCustomFont1);
- t = (TextView) findViewById(R.id.predpisanie);
- Typeface meCustomFont2 = Typeface.createFromAsset(getAssets(), "fonts/LegionaryItalic.otf");
- t.setTypeface(meCustomFont2);
- t = (TextView) findViewById(R.id.opisan);
- Typeface meCustomFont3 = Typeface.createFromAsset(getAssets(), "fonts/Legionary.otf");
- t.setTypeface(meCustomFont3);
- RelativeLayout mainpage = (RelativeLayout) findViewById(R.id.mainpage);
- ScrollView Opisanie = (ScrollView) findViewById(R.id.Opisanie);
- final ImageView imageView = (ImageView) findViewById(R.id.ImageView);
- final TextView nazvanie = (TextView) findViewById(R.id.nazvanie);
- final TextView predpisanie = (TextView) findViewById(R.id.predpisanie);
- final TextView opisan = (TextView) findViewById(R.id.opisan);
- ScrollView Perecheslenie = (ScrollView) findViewById(R.id.Perecheslenie);
- final ImageButton imageButton = (ImageButton) findViewById(R.id.imageButton);
- final ImageButton imageButton2 = (ImageButton) findViewById(R.id.imageButton2);
- final ImageButton imageButton3 = (ImageButton) findViewById(R.id.imageButton3);
- final ImageButton imageButton4 = (ImageButton) findViewById(R.id.imageButton4);
- final ImageButton imageButton5 = (ImageButton) findViewById(R.id.imageButton5);
- final ImageButton imageButton6 = (ImageButton) findViewById(R.id.imageButton6);
- final ImageButton imageButton7 = (ImageButton) findViewById(R.id.imageButton7);
- final ImageButton imageButton8 = (ImageButton) findViewById(R.id.imageButton8);
- final ImageButton imageButton9 = (ImageButton) findViewById(R.id.imageButton9);
- final ImageButton imageButton10 = (ImageButton) findViewById(R.id.imageButton10);
- imageButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- MediaPlayer ring= MediaPlayer.create(main.this,R.raw.firsts);
- ring.start();
- nazvanie.setText(getResources().getString(R.string.imageButton1));
- predpisanie.setText(getResources().getString(R.string.imageButton1_1));
- opisan.setText(getResources().getText(R.string.imageButton1_2));
- image.setImageResource(R.drawable.ic_launcher_2);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement