Guest User

Untitled

a guest
May 26th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <LinearLayout
  2. android:layout_width="120dp"
  3. android:layout_height="120dp"
  4. android:layout_margin="2dp"
  5. android:layout_weight="1"
  6. android:background="@color/secondaryDarkColor"
  7. android:orientation="vertical"
  8. android:onClick="question1"
  9. android:id="@+id/LL1">
  10.  
  11. <ImageButton
  12. android:layout_width="45dp"
  13. android:layout_height="45dp"
  14. android:layout_gravity="center"
  15. android:layout_marginTop="20dp"
  16. android:contentDescription="@string/garden0"
  17. android:onClick="question1"
  18. android:src="@drawable/garden0" />
  19.  
  20. <TextView
  21. android:id="@+id/q6"
  22. android:layout_width="match_parent"
  23. android:layout_height="match_parent"
  24. android:layout_marginTop="10dp"
  25. android:background="@color/primaryColor"
  26. android:padding="8dp"
  27. android:text="@string/q1"
  28. android:onClick="question1"/>
  29. </LinearLayout>
  30.  
  31. public void question1(View view){
  32.  
  33. LL1 = findViewById(R.id.LL1);
  34. LL1.setBackgroundColor(Color.DKGRAY);
  35.  
  36. Intent intent = new Intent(MainActivity.this, Q1.class);
  37. startActivity(intent);
  38. };
Add Comment
Please, Sign In to add comment