Guest User

Untitled

a guest
Dec 13th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <Button
  2. android:id="@+id/button"
  3. android:layout_width="101dp"
  4. android:layout_height="85dp"
  5. android:layout_marginStart="132dp"
  6. android:layout_marginTop="148dp"
  7. android:onClick="pge"
  8. android:visibility="invisible"
  9. app:layout_constraintStart_toStartOf="parent"
  10. app:layout_constraintTop_toTopOf="parent"
  11. tools:ignore="MissingConstraints" />
  12.  
  13. public void pge(View view){
  14.  
  15. msToast("Hello");
  16.  
  17. }
  18.  
  19. public void msToast(String text){
  20. Context context = getApplicationContext();
  21. int duration = Toast.LENGTH_SHORT;
  22. Toast toast = Toast.makeText(context, text, duration);
  23. toast.show();
  24. }
Add Comment
Please, Sign In to add comment