Guest User

Untitled

a guest
Jul 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Button button = findViewById(R.id.button);
  2. ImageView imageView = findViewById(R.id.imageView);
  3.  
  4. @Override
  5. protected void onCreate(Bundle savedInstanceState) {
  6. super.onCreate(savedInstanceState);
  7. setContentView(R.layout.activity_main);
  8.  
  9. button.setOnClickListener(new View.OnClickListener() {
  10. @Override
  11. public void onClick(View view) {
  12.  
  13. }
  14. });
  15. }
  16.  
  17. <ImageView
  18. android:id="@+id/imageView"
  19. android:layout_width="0dp"
  20. android:layout_height="0dp"
  21. android:scaleType="fitXY"
  22. app:layout_constraintBottom_toBottomOf="parent"
  23. app:layout_constraintEnd_toEndOf="parent"
  24. app:layout_constraintStart_toStartOf="parent"
  25. app:layout_constraintTop_toTopOf="parent" />
  26. <Button
  27. android:id="@+id/button"
  28. android:layout_width="match_parent"
  29. android:layout_height="match_parent"
  30. android:text="@string/start_button"
  31. android:visibility="invisible"/>
Add Comment
Please, Sign In to add comment