Guest User

Untitled

a guest
Nov 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <LinearLayout
  2. android:layout_width="match_parent"
  3. android:layout_height="match_parent"
  4. android:orientation="vertical" >
  5.  
  6. <ImageView
  7. android:layout_width="wrap_content"
  8. android:layout_height="wrap_content"
  9. android:src="@drawable/imagem_teste" />
  10.  
  11. <Button
  12. android:id="@+id/bt"
  13. android:layout_width="wrap_content"
  14. android:layout_height="wrap_content"
  15. android:layout_gravity="center_horizontal"
  16. android:backgroundTint="@color/viewfinder_laser"
  17. android:text="Entendi"
  18. android:textAppearance="@style/TextAppearance.AppCompat.Large.Inverse" />
  19.  
  20.  
  21. </LinearLayout>
  22.  
  23. btnSobre.setOnClickListener(new View.OnClickListener() {
  24. @Override
  25. public void onClick(View v) {
  26. LayoutInflater li = getLayoutInflater();
  27. View view = li.inflate(R.layout.alerta, null);
  28.  
  29. view.findViewById(R.id.bt).setOnClickListener(new View.OnClickListener() {
  30. public void onClick(View arg0) {
  31. alerta.dismiss();
  32. }
  33. });
  34.  
  35. AlertDialog.Builder builder = new AlertDialog.Builder(TelaInicial.this);
  36. builder.setTitle("Sobre...");
  37. builder.setView(view);
  38. alerta = builder.create();
  39. alerta.show();
  40.  
  41. }
  42. }
  43. );
  44.  
  45. AlertDialog.Builder builder = new AlertDialog.Builder(TelaInicial.this);
  46. builder.setTitle("Sobre...");
  47. builder.setView(view);
Add Comment
Please, Sign In to add comment