summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorMatthew Wong <wongma@protonmail.ch>2015-07-17 22:19:18 -0400
committerMatthew Wong <wongma@protonmail.ch>2015-07-17 22:19:18 -0400
commit9817760c4bdeaaea81498dab676089122a302f94 (patch)
treef2a7ef1abc4ccfe999f8df5bc92a0255232b26f6 /app/src/main
parent395309e39e591c7ae76c27027b696456efd5b21a (diff)
Use strings and clean up margins in ssh keygen
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/res/layout/fragment_ssh_keygen.xml50
-rw-r--r--app/src/main/res/values/strings.xml4
2 files changed, 32 insertions, 22 deletions
diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml
index 0ebea432..e9995885 100644
--- a/app/src/main/res/layout/fragment_ssh_keygen.xml
+++ b/app/src/main/res/layout/fragment_ssh_keygen.xml
@@ -6,54 +6,60 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
android:orientation="vertical">
<TextView
android:id="@+id/label_length"
android:layout_width="wrap_content"
android:layout_height="48dp"
- android:layout_marginLeft="16dp"
android:gravity="center_vertical"
- android:text="Length"/>
+ android:text="@string/ssh_keygen_length"/>
<Spinner
android:id="@+id/length"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
android:spinnerMode="dropdown"/>
- <EditText
- android:id="@+id/passphrase"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginTop="8dp"
- android:hint="Passphrase"
- android:inputType="textVisiblePassword"/>
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ app:hintTextAppearance="@style/TextAppearance.AppCompat"
+ android:layout_marginTop="8dp">
+
+ <EditText
+ android:id="@+id/passphrase"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/ssh_keygen_passphrase"
+ android:inputType="textVisiblePassword"/>
+ </android.support.design.widget.TextInputLayout>
- <EditText
- android:id="@+id/comment"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginTop="8dp"
- android:hint="Comment"
- android:inputType="textShortMessage"/>
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ app:hintTextAppearance="@style/TextAppearance.AppCompat"
+ android:layout_marginTop="8dp">
+ <EditText
+ android:id="@+id/comment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/ssh_keygen_comment"
+ android:inputType="textShortMessage"/>
+ </android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/generate_ssh_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:onClick="generate"
- android:text="Generate"/>
+ android:text="@string/ssh_keygen_generate"/>
</LinearLayout>
</ScrollView> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5f97cf51..9fae848d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -127,6 +127,10 @@
<string name="pwgen_ambiguous">Ambiguous</string>
<!-- ssh keygen fragment -->
+ <string name="ssh_keygen_length">Length</string>
+ <string name="ssh_keygen_passphrase">Passphrase</string>
+ <string name="ssh_keygen_comment">Comment</string>
+ <string name="ssh_keygen_generate">Generate</string>
<string name="ssh_keygen_copy">Copy</string>
<string name="ssh_keygen_tip">Provide this public key to your Git server.</string>