diff options
author | shanavas <shanavas.m2@gmail.com> | 2017-04-27 19:12:50 +0300 |
---|---|---|
committer | Mohamed Zenadi <zeapo@users.noreply.github.com> | 2017-04-27 18:12:50 +0200 |
commit | 2d1a9f7a44154035b5a47b0a9843c365dadcb62c (patch) | |
tree | a60fe287e38c7b4ed0fa8eddd43bfc603b46230f /app/src/main/res/layout | |
parent | 94c9b5be645d4abcb8f3374c6a4963b5cfa14335 (diff) |
Make git username and email configurable (#289)
* Gather git config data and save in preferences
* Align text box properly
* Apply git configs from settings
* Validate email address
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_git_config.xml | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_git_config.xml b/app/src/main/res/layout/activity_git_config.xml new file mode 100644 index 00000000..2955809b --- /dev/null +++ b/app/src/main/res/layout/activity_git_config.xml @@ -0,0 +1,94 @@ +<ScrollView 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="com.zeapo.pwdstore.git.GitActivity" + android:background="@android:color/white"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/git_config" + android:textStyle="bold" + style="@android:style/TextAppearance.Large" + android:gravity="left" + android:paddingBottom="6dp" + android:textColor="@color/blue_grey_500" + android:background="@drawable/bottom_line"/> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_gravity="center_vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/git_user_name" + android:id="@+id/label_git_user_name" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:paddingBottom="8dp" + android:layout_alignParentStart="true" /> + + <EditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/git_user_name_hint" + android:id="@+id/git_user_name" + android:layout_marginLeft="8dp" + android:layout_toEndOf="@+id/label_git_user_name" + android:layout_toRightOf="@+id/label_git_user_name" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:inputType="textWebEmailAddress"/> + </RelativeLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_gravity="center_vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/git_user_email" + android:id="@+id/label_git_user_email" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:paddingBottom="8dp" + android:layout_alignParentStart="true" /> + + <EditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/git_user_email_hint" + android:id="@+id/git_user_email" + android:layout_marginLeft="35dp" + android:layout_toEndOf="@+id/label_git_user_email" + android:layout_toRightOf="@+id/label_git_user_email" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:inputType="textWebEmailAddress"/> + </RelativeLayout> + + <Button + android:id="@+id/save_button" + android:text="Save" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:onClick="applyGitConfigs"/> + </LinearLayout> + +</ScrollView> |