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. tools:context=".MainActivity">
  8.  
  9. <EditText
  10. android:id="@+id/nombre"
  11. android:layout_width="0dp"
  12. android:layout_height="wrap_content"
  13. android:layout_marginBottom="8dp"
  14. android:layout_marginEnd="8dp"
  15. android:layout_marginLeft="8dp"
  16. android:layout_marginRight="8dp"
  17. android:layout_marginStart="8dp"
  18. android:layout_marginTop="8dp"
  19. android:ems="10"
  20. android:hint="@string/name"
  21. android:inputType="textPersonName"
  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. app:layout_constraintVertical_bias="0.18" />
  27.  
  28. <SeekBar
  29. android:id="@+id/cantidad"
  30. style="@style/Widget.AppCompat.SeekBar.Discrete"
  31. android:layout_width="0dp"
  32. android:layout_height="wrap_content"
  33. android:layout_marginBottom="8dp"
  34. android:layout_marginEnd="8dp"
  35. android:layout_marginLeft="8dp"
  36. android:layout_marginRight="8dp"
  37. android:layout_marginStart="8dp"
  38. android:layout_marginTop="64dp"
  39. android:max="10"
  40. android:progress="1"
  41. app:layout_constraintBottom_toBottomOf="parent"
  42. app:layout_constraintEnd_toEndOf="parent"
  43. app:layout_constraintStart_toStartOf="parent"
  44. app:layout_constraintTop_toBottomOf="@+id/nombre"
  45. app:layout_constraintVertical_bias="0.0" />
  46.  
  47. <Button
  48. android:id="@+id/boton"
  49. android:layout_width="0dp"
  50. android:layout_height="wrap_content"
  51. android:layout_marginBottom="8dp"
  52. android:layout_marginEnd="8dp"
  53. android:layout_marginLeft="8dp"
  54. android:layout_marginRight="8dp"
  55. android:layout_marginStart="8dp"
  56. android:layout_marginTop="64dp"
  57. android:text="@string/button"
  58. app:layout_constraintBottom_toBottomOf="parent"
  59. app:layout_constraintEnd_toEndOf="parent"
  60. app:layout_constraintStart_toStartOf="parent"
  61. app:layout_constraintTop_toBottomOf="@+id/cantidad"
  62. app:layout_constraintVertical_bias="0.0" />
  63.  
  64. <TextView
  65. android:id="@+id/mensaje"
  66. android:layout_width="wrap_content"
  67. android:layout_height="wrap_content"
  68. android:layout_marginBottom="8dp"
  69. android:layout_marginEnd="8dp"
  70. android:layout_marginLeft="8dp"
  71. android:layout_marginRight="8dp"
  72. android:layout_marginStart="8dp"
  73. android:layout_marginTop="64dp"
  74. android:textSize="24sp"
  75. app:layout_constraintBottom_toBottomOf="parent"
  76. app:layout_constraintEnd_toEndOf="parent"
  77. app:layout_constraintStart_toStartOf="parent"
  78. app:layout_constraintTop_toBottomOf="@+id/boton"
  79. app:layout_constraintVertical_bias="0.0" />
  80. </android.support.constraint.ConstraintLayout>

Proinf.net