Advertisement
evgeni3

MyTask layout xml

Jan 5th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.91 KB | None | 0 0
  1. activity_main
  2.  
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.    android:layout_width="match_parent"
  5.    android:layout_height="match_parent"
  6.    android:orientation="vertical"
  7.    android:layout_margin="16dp">
  8.  
  9.     <!-- place for logo -->
  10.     <LinearLayout
  11.        android:layout_width="match_parent"
  12.        android:layout_height="match_parent"
  13.        android:layout_weight="1"
  14.        android:orientation="vertical"
  15.        android:gravity="center">
  16.         <TextView
  17.            android:layout_width="wrap_content"
  18.            android:layout_height="wrap_content"
  19.            android:text="MY TASK"
  20.            android:textSize="64sp"/>
  21.     </LinearLayout>
  22.  
  23.     <!-- place for user input -->
  24.     <LinearLayout
  25.        android:layout_width="match_parent"
  26.        android:layout_height="match_parent"
  27.        android:layout_weight="1"
  28.        android:orientation="vertical"
  29.        android:gravity="center">
  30.         <EditText
  31.            android:layout_width="match_parent"
  32.            android:layout_height="wrap_content"
  33.            android:hint="@string/userName"
  34.            android:id="@+id/txtUser"/>
  35.         <EditText
  36.            android:layout_width="match_parent"
  37.            android:layout_height="wrap_content"
  38.            android:hint="@string/userPass"
  39.            android:inputType="textPassword"
  40.            android:layout_marginTop="20dp"
  41.            android:id="@+id/txtPass"/>
  42.     </LinearLayout>
  43.  
  44.     <!-- place for buttons-->
  45.     <LinearLayout
  46.        android:layout_width="match_parent"
  47.        android:layout_height="match_parent"
  48.        android:layout_weight="1"
  49.        android:orientation="horizontal"
  50.        android:gravity="top">
  51.         <Button
  52.            android:layout_width="match_parent"
  53.            android:layout_height="wrap_content"
  54.            android:text="@string/register"
  55.            android:textColor="#ffffff"
  56.            android:background="#009fff"
  57.            android:textSize="22sp"
  58.            android:layout_weight="1"
  59.            android:layout_margin="20dp"
  60.            android:id="@+id/btnRegister"/>
  61.         <Button
  62.            android:layout_width="match_parent"
  63.            android:layout_height="wrap_content"
  64.            android:text="@string/login"
  65.            android:textColor="#ffffff"
  66.            android:background="#009fff"
  67.            android:textSize="22sp"
  68.            android:layout_weight="1"
  69.            android:layout_margin="20dp"
  70.            android:id="@+id/btnLogin"/>
  71.     </LinearLayout>
  72.  
  73. </LinearLayout>
  74.  
  75. ---------------------------------------------------
  76.  
  77. activity_register
  78.  
  79. <?xml version="1.0" encoding="utf-8"?>
  80. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  81.    android:orientation="vertical" android:layout_width="match_parent"
  82.    android:layout_height="match_parent"
  83.    android:layout_margin="16dp">
  84.  
  85.     <LinearLayout
  86.        android:layout_width="match_parent"
  87.        android:layout_height="match_parent"
  88.        android:layout_weight="2"
  89.        android:orientation="vertical"
  90.       >
  91.         <TextView
  92.            android:layout_width="wrap_content"
  93.            android:layout_height="match_parent"
  94.            android:text="LOGO"
  95.            android:textSize="62sp"
  96.            android:layout_gravity="center"
  97.            />
  98.     </LinearLayout>
  99.     <LinearLayout
  100.        android:layout_width="match_parent"
  101.        android:layout_height="match_parent"
  102.        android:layout_weight="1"
  103.        android:orientation="vertical"
  104.        android:layout_margin="30dp">
  105.         <EditText
  106.            android:layout_width="match_parent"
  107.            android:layout_height="match_parent"
  108.            android:id="@+id/regUserName"
  109.            android:hint="Enter a user name..."
  110.            android:layout_weight="1"
  111.            android:gravity="bottom"/>
  112.         <EditText
  113.            android:layout_width="match_parent"
  114.            android:layout_height="match_parent"
  115.            android:id="@+id/regPass1"
  116.            android:hint="Enter your password...."
  117.            android:layout_weight="1"
  118.            android:gravity="bottom"
  119.            android:inputType="textPassword"/>
  120.         <EditText
  121.            android:layout_width="match_parent"
  122.            android:layout_height="match_parent"
  123.            android:id="@+id/regPass2"
  124.            android:hint="Re-Enter your password..."
  125.            android:layout_weight="1"
  126.            android:gravity="bottom"
  127.            android:inputType="textPassword"
  128.            />
  129.     </LinearLayout>
  130.     <LinearLayout
  131.        android:layout_width="match_parent"
  132.        android:layout_height="match_parent"
  133.        android:layout_weight="2"
  134.        android:orientation="horizontal">
  135.         <Button
  136.            android:layout_width="match_parent"
  137.            android:layout_height="match_parent"
  138.            android:text="@string/register"
  139.            android:textColor="#ffffff"
  140.            android:background="#009fff"
  141.            android:textSize="32sp"
  142.            android:layout_weight="1"
  143.            android:layout_margin="10dp"
  144.            android:id="@+id/btnRegRegister"/>
  145.         <Button
  146.            android:layout_width="match_parent"
  147.            android:layout_height="match_parent"
  148.            android:text="cancel"
  149.            android:textColor="#ffffff"
  150.            android:background="#009fff"
  151.            android:textSize="32sp"
  152.            android:layout_weight="1"
  153.            android:layout_margin="10dp"
  154.            android:id="@+id/btnRegCancel"/>
  155.     </LinearLayout>
  156. </LinearLayout>
  157.  
  158. ------------------------------------------------
  159. activity_task
  160.  
  161. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  162.    android:layout_width="match_parent"
  163.    android:layout_height="match_parent"
  164.    android:orientation="vertical"
  165.    android:layout_margin="16dp">
  166.  
  167.     <TextView
  168.        android:layout_width="match_parent"
  169.        android:layout_height="wrap_content"
  170.        android:text="Error"
  171.        android:gravity="center"
  172.        android:textSize="32sp"
  173.        android:id="@+id/txtUserName"/>
  174.     <LinearLayout
  175.        android:layout_width="match_parent"
  176.        android:layout_height="wrap_content"
  177.        android:orientation="horizontal">
  178.         <EditText
  179.            android:layout_width="match_parent"
  180.            android:layout_height="wrap_content"
  181.            android:layout_weight="1"
  182.            android:hint="Enter a new task...."
  183.            android:id="@+id/etMyTask"/>
  184.         <Button
  185.            android:layout_width="match_parent"
  186.            android:layout_height="wrap_content"
  187.            android:layout_weight="6"
  188.            android:textColor="#ffffff"
  189.            android:background="#009fff"
  190.            android:text="+"
  191.            android:textSize="34sp"
  192.            android:id="@+id/btnAddTask"/>
  193.     </LinearLayout>
  194.     <ListView
  195.        android:layout_width="match_parent"
  196.        android:layout_height="match_parent"
  197.        android:id="@+id/lstTask"></ListView>
  198. </LinearLayout>
  199.  
  200. --------------------------------------------
  201. task_item
  202.  
  203. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  204.    android:layout_width="match_parent"
  205.    android:layout_height="wrap_content"
  206.    android:layout_margin="10dp"
  207.    android:orientation="horizontal"
  208.    android:gravity="center_vertical">
  209.  
  210.     <Switch
  211.        android:id="@+id/taskDone"
  212.        android:layout_width="wrap_content"
  213.        android:layout_height="wrap_content" />
  214.     <TextView
  215.        android:layout_width="match_parent"
  216.        android:layout_height="wrap_content"
  217.        android:text="Task name...."
  218.        android:textSize="24sp"
  219.        android:id="@+id/taskName"
  220.        android:layout_marginLeft="10dp"
  221.        android:layout_weight="1"/>
  222.     <ImageView
  223.        android:layout_width="wrap_content"
  224.        android:layout_height="wrap_content"
  225.        android:src="@drawable/trash"
  226.        android:id="@+id/taskDelete"/>
  227. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement