Skip to content

Instantly share code, notes, and snippets.

@tajribati
Created April 9, 2015 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tajribati/09feb2d305b865ba2880 to your computer and use it in GitHub Desktop.
Save tajribati/09feb2d305b865ba2880 to your computer and use it in GitHub Desktop.
xml files
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity$PlaceholderFragment">
<TextView
android:text="@string/exav"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/exav"
android:textColor="#ff174abc"
android:textSize="40dp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:src="@mipmap/image"
android:layout_below="@+id/exav"
android:layout_centerHorizontal="true"
android:layout_marginTop="74dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hi! I am Exaviser! and I will help you revise your exams."
android:id="@+id/textView"
android:layout_below="@+id/imageView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="40dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start"
android:id="@+id/button"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true"
android:layout_marginTop="55dp" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<!-- Do the same for tab_fragment_2 and tab_fragment_3 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textSize="16sp"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Create Database"
android:id="@+id/createDBButton"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:onClick="createDatabase"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add Contact"
android:id="@+id/addContactButton"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/createDBButton"
android:layout_toEndOf="@+id/createDBButton"
android:layout_marginLeft="10dp"
android:onClick="addContact"
android:clickable="false" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delete Contact"
android:id="@+id/deleteContactButton"
android:layout_below="@+id/createDBButton"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:onClick="deleteContact"
android:clickable="false"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get Contacts"
android:id="@+id/getContactsButton"
android:layout_below="@+id/createDBButton"
android:layout_toRightOf="@+id/deleteContactButton"
android:layout_toEndOf="@+id/deleteContactButton"
android:layout_marginLeft="10dp"
android:onClick="getContacts"
android:clickable="false"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/nameEditText"
android:layout_below="@+id/deleteContactButton"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:hint="Name"
android:layout_marginTop="5dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/emailEditText"
android:layout_below="@+id/nameEditText"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:hint="Email"
android:layout_marginTop="5dp"
android:inputType="textEmailAddress"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="@+id/idEditText"
android:layout_below="@+id/emailEditText"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:hint="ID to Delete"
android:layout_marginTop="5dp"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delete Database"
android:id="@+id/deleteDBButton"
android:onClick="deleteDatabase"
android:layout_below="@+id/idEditText"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:clickable="false" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:ems="10"
android:id="@+id/contactListEditText"
android:lines="8"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<!-- Do the same for tab_fragment_2 and tab_fragment_3 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tab Fragment 2"
android:textSize="16sp"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<!-- Do the same for tab_fragment_2 and tab_fragment_3 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tab Fragment 3"
android:textSize="16sp"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment