activity_main.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:tools="http://schemas.android.com/tools"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. tools:context="com.app.gokitchen.MainActivity" >
  6. <!-- Header aligned to top -->
  7. <RelativeLayout
  8. android:id="@+id/header"
  9. android:layout_width="match_parent"
  10. android:layout_height="wrap_content"
  11. android:layout_alignParentTop="true"
  12. android:background="#FC9"
  13. android:gravity="center" >
  14. <ImageView
  15. android:contentDescription="@string/app_name"
  16. android:id="@+id/imageView1"
  17. android:layout_width="match_parent"
  18. android:layout_height="100dp"
  19. android:layout_alignParentTop="true"
  20. android:scaleType="centerCrop"
  21. android:src="@drawable/electrichob" />
  22. </RelativeLayout>
  23. <!-- Footer aligned to bottom -->
  24. <RelativeLayout
  25. android:id="@+id/footer"
  26. android:layout_width="match_parent"
  27. android:layout_height="wrap_content"
  28. android:layout_alignParentBottom="true"
  29. android:background="#BCDF46"
  30. android:gravity="center" >
  31. <TextView
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"
  34. android:layout_margin="3dp"
  35. android:text="@string/copyrigth"
  36. android:textColor="#000"
  37. android:textSize="12sp" />
  38. </RelativeLayout>
  39. <!-- Content below header and above footer -->
  40. <RelativeLayout
  41. android:id="@+id/content"
  42. android:layout_width="fill_parent"
  43. android:layout_height="fill_parent"
  44. android:layout_above="@id/footer"
  45. android:layout_below="@id/header"
  46. android:gravity="top"
  47. android:paddingBottom="@dimen/activity_vertical_margin"
  48. android:paddingLeft="@dimen/activity_horizontal_margin"
  49. android:paddingRight="@dimen/activity_horizontal_margin"
  50. android:paddingTop="@dimen/activity_vertical_margin" >
  51. <TextView
  52. android:id="@+id/textViewOCR"
  53. android:layout_width="wrap_content"
  54. android:layout_height="wrap_content"
  55. android:layout_alignParentTop="true"
  56. android:layout_centerHorizontal="true"
  57. android:layout_marginBottom="7dp"
  58. android:text="@string/ocr"
  59. android:textAppearance="?android:attr/textAppearanceLarge"
  60. android:textStyle="bold" />
  61. <Button
  62. android:id="@+id/ActivateOCR"
  63. android:layout_width="match_parent"
  64. android:layout_height="wrap_content"
  65. android:layout_below="@+id/textViewOCR"
  66. android:layout_centerHorizontal="true"
  67. android:layout_marginBottom="20dp"
  68. android:text="@string/textButtonOCR" />
  69. <View
  70. android:id="@+id/view1"
  71. android:layout_width="fill_parent"
  72. android:layout_height="2dp"
  73. android:layout_below="@+id/ActivateOCR"
  74. android:layout_centerHorizontal="true"
  75. android:layout_marginBottom="15dp"
  76. android:background="@android:color/black" />
  77. <TextView
  78. android:id="@+id/textViewBluetooth"
  79. android:layout_width="wrap_content"
  80. android:layout_height="wrap_content"
  81. android:layout_below="@+id/view1"
  82. android:layout_centerHorizontal="true"
  83. android:layout_marginBottom="7dp"
  84. android:text="@string/bluetooth"
  85. android:textAppearance="?android:attr/textAppearanceLarge"
  86. android:textStyle="bold" />
  87. <Switch
  88. android:id="@+id/switchBT"
  89. android:layout_width="wrap_content"
  90. android:layout_height="wrap_content"
  91. android:layout_below="@+id/textViewBluetooth"
  92. android:layout_centerHorizontal="true"
  93. android:layout_marginBottom="7dp"
  94. android:text="@string/switch_bluetooth" />
  95. <Switch
  96. android:id="@+id/OnOff"
  97. android:layout_width="wrap_content"
  98. android:layout_height="wrap_content"
  99. android:layout_below="@+id/switchBT"
  100. android:layout_centerHorizontal="true"
  101. android:layout_marginBottom="7dp"
  102. android:text="@string/switch_on_off" />
  103. <Button
  104. android:id="@+id/buttonDOWNPOWER"
  105. android:layout_width="wrap_content"
  106. android:layout_height="wrap_content"
  107. android:layout_alignLeft="@+id/lineBotton"
  108. android:layout_alignStart="@+id/lineBotton"
  109. android:layout_alignTop="@+id/buttonUPPOWER"
  110. android:text="@string/lowerPower" />
  111. <Button
  112. android:id="@+id/buttonUPPOWER"
  113. android:layout_width="wrap_content"
  114. android:layout_height="wrap_content"
  115. android:layout_alignEnd="@+id/lineBotton"
  116. android:layout_alignRight="@+id/lineBotton"
  117. android:layout_below="@+id/OnOff"
  118. android:text="@string/risePower" />
  119. <View
  120. android:id="@+id/lineBotton"
  121. android:layout_width="fill_parent"
  122. android:layout_height="2dp"
  123. android:layout_below="@+id/buttonUPPOWER"
  124. android:layout_marginTop="10dp"
  125. android:layout_centerHorizontal="true"
  126. android:background="@android:color/black" />
  127. <TextView
  128. android:id="@+id/LOG"
  129. android:layout_width="wrap_content"
  130. android:layout_height="wrap_content"
  131. android:layout_alignParentBottom="true"
  132. android:layout_centerHorizontal="true"
  133. android:text="@string/initital_log"
  134. android:textColor="#8B0000"
  135. android:textAppearance="?android:attr/textAppearanceLarge"
  136. android:textSize="15sp"
  137. android:textStyle="italic" />
  138. </RelativeLayout>
  139. </RelativeLayout>