Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. TextView t;
  2.     ImageButton imgB;
  3.  
  4.     static  String info[] = {"Aquarius","Pisces", "Aries", "Taurus", "Gemini", "Cancer", "Leo",
  5.             "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn"};
  6.  
  7.  
  8.  
  9.  
  10.     @Override
  11.     protected void onCreate(Bundle savedInstanceState) {
  12.         super.onCreate(savedInstanceState);
  13.         setContentView(R.layout.activity_information_zodiac);
  14.         t = (TextView) findViewById(R.id.textViewZodiac);
  15.         imgB = (ImageButton) findViewById(R.id.imageView);
  16.  
  17.         if(imgB.getDrawable().getAlpha() == R.drawable.p1 ){
  18.             t.setText(info[0]);
  19.         }
  20.         if(imgB.getDrawable().getAlpha() == R.drawable.p1 ){
  21.             t.setText(info[0]);
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement