activity_main.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:background="#00aa00"
  8. tools:context=".MainActivity">
  9.  
  10. <TextView
  11. android:id="@+id/goles"
  12. android:layout_width="wrap_content"
  13. android:layout_height="wrap_content"
  14. android:layout_marginBottom="8dp"
  15. android:layout_marginTop="16dp"
  16. android:text="0 - 0"
  17. android:textSize="42sp"
  18. app:layout_constraintBottom_toBottomOf="parent"
  19. app:layout_constraintLeft_toLeftOf="parent"
  20. app:layout_constraintRight_toRightOf="parent"
  21. app:layout_constraintTop_toTopOf="parent"
  22. app:layout_constraintVertical_bias="0.32" />
  23.  
  24. <Button
  25. android:id="@+id/boton_local"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content"
  28. android:layout_marginLeft="52dp"
  29. android:layout_marginStart="52dp"
  30. android:layout_marginTop="140dp"
  31. android:onClick="incrementarMarcador"
  32. android:text="Local"
  33. app:layout_constraintStart_toStartOf="parent"
  34. app:layout_constraintTop_toBottomOf="@+id/goles" />
  35.  
  36. <Button
  37. android:id="@+id/boton_visitante"
  38. android:layout_width="wrap_content"
  39. android:layout_height="wrap_content"
  40. android:layout_marginEnd="52dp"
  41. android:layout_marginRight="52dp"
  42. android:layout_marginTop="140dp"
  43. android:onClick="incrementarMarcador"
  44. android:text="Visitante"
  45. app:layout_constraintEnd_toEndOf="parent"
  46. app:layout_constraintTop_toBottomOf="@+id/goles" />
  47.  
  48. </android.support.constraint.ConstraintLayout>

Proinf.net