activity_main.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:id="@+id/coordinatorLayout"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent">
  7. <LinearLayout
  8. android:layout_width="match_parent"
  9. android:layout_height="match_parent"
  10. android:orientation="vertical">
  11. <ImageView
  12. android:layout_width="match_parent"
  13. android:layout_height="150dp"
  14. android:scaleType="centerCrop"
  15. android:src="@drawable/header" />
  16. <LinearLayout
  17. android:layout_width="match_parent"
  18. android:layout_height="0dp"
  19. android:layout_weight="1"
  20. android:background="@color/colorPrimaryLight"
  21. android:gravity="center"
  22. android:orientation="vertical">
  23. <LinearLayout
  24. android:layout_width="wrap_content"
  25. android:layout_height="wrap_content"
  26. android:orientation="horizontal">
  27. <TextView
  28. android:id="@+id/textViewIpAccess"
  29. android:layout_width="wrap_content"
  30. android:layout_height="wrap_content"
  31. android:text="http://000.000.000.000:"
  32. android:textColor="@android:color/white"
  33. android:textSize="20sp"
  34. android:textStyle="bold" />
  35. <EditText
  36. android:id="@+id/editTextPort"
  37. android:layout_width="60dp"
  38. android:layout_height="wrap_content"
  39. android:gravity="center"
  40. android:hint="8080"
  41. android:inputType="numberDecimal"
  42. android:maxLength="4"
  43. android:text="8080"
  44. android:textColor="@android:color/white"
  45. android:textSize="20sp"
  46. android:textStyle="bold" />
  47. </LinearLayout>
  48. <TextView
  49. android:id="@+id/textViewMessage"
  50. android:layout_width="wrap_content"
  51. android:layout_height="wrap_content"
  52. android:layout_marginLeft="50dp"
  53. android:layout_marginRight="50dp"
  54. android:layout_marginTop="50dp"
  55. android:gravity="center"
  56. android:text="@string/message"
  57. android:textColor="@android:color/white"
  58. android:textSize="18sp"
  59. android:visibility="invisible" />
  60. </LinearLayout>
  61. </LinearLayout>
  62. <android.support.design.widget.FloatingActionButton
  63. android:id="@+id/floatingActionButtonOnOff"
  64. android:layout_width="wrap_content"
  65. android:layout_height="wrap_content"
  66. android:layout_gravity="end|bottom"
  67. android:layout_margin="16dp"
  68. android:elevation="4dp"
  69. android:src="@drawable/on_btn"
  70. app:backgroundTint="@color/colorRed" />
  71. <Button
  72. android:id="@+id/open_hotspot"
  73. android:layout_width="match_parent"
  74. android:layout_height="wrap_content"
  75. android:text="Button" />
  76. <TextView
  77. android:id="@+id/open_hotspot_msg"
  78. android:layout_width="match_parent"
  79. android:layout_height="match_parent"
  80. android:text="TextView" />
  81. </android.support.design.widget.CoordinatorLayout>