principal.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:layout_centerHorizontal="true"
  8. android:layout_centerVertical="true"
  9. android:background="@color/colorPrimary"
  10. tools:context=".Principal">
  11.  
  12. <LinearLayout
  13. android:layout_width="wrap_content"
  14. android:layout_height="wrap_content"
  15. android:layout_marginBottom="8dp"
  16. android:layout_marginEnd="8dp"
  17. android:layout_marginLeft="8dp"
  18. android:layout_marginRight="8dp"
  19. android:layout_marginStart="8dp"
  20. android:layout_marginTop="8dp"
  21. android:background="@android:color/white"
  22. android:orientation="vertical"
  23. android:padding="32dp"
  24. app:layout_constraintBottom_toBottomOf="parent"
  25. app:layout_constraintEnd_toEndOf="parent"
  26. app:layout_constraintStart_toStartOf="parent"
  27. app:layout_constraintTop_toTopOf="parent">
  28.  
  29. <TextView
  30. android:layout_width="match_parent"
  31. android:layout_height="wrap_content"
  32. android:text="@string/category" />
  33.  
  34. <Spinner
  35. android:id="@+id/categoria"
  36. android:layout_width="match_parent"
  37. android:layout_height="wrap_content"
  38. android:entries="@array/categorias" />
  39.  
  40. <TextView
  41. android:layout_width="match_parent"
  42. android:layout_height="wrap_content"
  43. android:layout_marginTop="32dp"
  44. android:text="@string/quantity" />
  45.  
  46. <SeekBar
  47. android:id="@+id/cantidad"
  48. android:layout_width="match_parent"
  49. android:layout_height="wrap_content"
  50. android:max="20" />
  51.  
  52. <TextView
  53. android:layout_width="match_parent"
  54. android:layout_height="wrap_content"
  55. android:layout_marginTop="32dp"
  56. android:text="@string/options" />
  57.  
  58. <Switch
  59. android:id="@+id/opcion_rapido"
  60. android:layout_width="match_parent"
  61. android:layout_height="wrap_content"
  62. android:text="@string/speed" />
  63.  
  64. <Switch
  65. android:id="@+id/opcion_regalo"
  66. android:layout_width="match_parent"
  67. android:layout_height="wrap_content"
  68. android:text="@string/gift" />
  69.  
  70. <Button
  71. android:id="@+id/enviar"
  72. android:layout_width="match_parent"
  73. android:layout_height="wrap_content"
  74. android:layout_marginTop="32dp"
  75. android:text="@string/send" />
  76.  
  77. </LinearLayout>
  78.  
  79. </android.support.constraint.ConstraintLayout>

Proinf.net