Skip to content

Instantly share code, notes, and snippets.

@vaibhavgoyal09
Created August 10, 2021 16:12
Show Gist options
  • Save vaibhavgoyal09/19990c789e300a1a46a2a90b3f028da7 to your computer and use it in GitHub Desktop.
Save vaibhavgoyal09/19990c789e300a1a46a2a90b3f028da7 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".presentation.activity.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
app:layout_constraintTop_toTopOf="parent"
android:orientation="vertical"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
app:layout_constraintBottom_toBottomOf="parent">
<EditText
android:id="@+id/textName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:importantForAutofill="no"
android:hint="@string/name"
android:inputType="text"
android:textColorHint="#9E9E9E"
android:textColor="@color/black"
android:textSize="16sp"/>
<EditText
android:id="@+id/textAge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:padding="12dp"
android:hint="@string/age"
android:textColorHint="#9E9E9E"
android:importantForAutofill="no"
android:inputType="number"
android:textSize="14sp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/buttonSave"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/save_data"
android:layout_marginTop="12dp"
android:layout_gravity="start"
android:textColor="@color/teal_200"
style="?android:attr/buttonBarButtonStyle" />
<Button
android:id="@+id/buttonClear"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/clear_data"
android:layout_marginTop="12dp"
android:layout_gravity="end"
android:textColor="@color/teal_200"
style="?android:attr/buttonBarButtonStyle" />
</LinearLayout>
<Button
android:id="@+id/buttonGetData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/get_data"
android:textColor="@color/white"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment