aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wong <wongma7@outlook.com>2015-08-26 17:03:37 -0400
committerMatthew Wong <wongma7@outlook.com>2015-08-26 17:03:37 -0400
commitf6d3dc23fbf68e8440fd9cab77797ad45b3100b1 (patch)
tree9b2d79264f0306d8bd6c43d0f1eeb2f7c5a4b3ca
parent88f0cddd58796745e5f2be22ac9a3540ea24f7ae (diff)
UI cleanup & reformat
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java2
-rw-r--r--app/src/main/res/layout/activity_ssh_keygen.xml7
-rw-r--r--app/src/main/res/layout/app_list_item.xml29
-rw-r--r--app/src/main/res/layout/autofill_instructions.xml122
-rw-r--r--app/src/main/res/layout/autofill_recycler_view.xml14
-rw-r--r--app/src/main/res/layout/autofill_row_layout.xml31
-rw-r--r--app/src/main/res/layout/fragment_autofill.xml46
-rw-r--r--app/src/main/res/layout/fragment_pwgen.xml48
-rw-r--r--app/src/main/res/layout/fragment_show_ssh_key.xml21
-rw-r--r--app/src/main/res/layout/fragment_ssh_keygen.xml44
10 files changed, 173 insertions, 191 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java
index 4fb5f0e3..b4daa5db 100644
--- a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java
+++ b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java
@@ -145,8 +145,6 @@ public class SshKeyGen extends AppCompatActivity {
setTitle("Generate SSH Key");
- setContentView(R.layout.activity_ssh_keygen);
-
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SshKeyGenFragment()).commit();
diff --git a/app/src/main/res/layout/activity_ssh_keygen.xml b/app/src/main/res/layout/activity_ssh_keygen.xml
deleted file mode 100644
index fb3d8a25..00000000
--- a/app/src/main/res/layout/activity_ssh_keygen.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
-</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/app_list_item.xml b/app/src/main/res/layout/app_list_item.xml
index 1a6c6e9b..15758cd5 100644
--- a/app/src/main/res/layout/app_list_item.xml
+++ b/app/src/main/res/layout/app_list_item.xml
@@ -1,24 +1,23 @@
<?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="40dp"
- android:orientation="horizontal"
- android:paddingLeft="8dp"
- android:paddingRight="8dp"
- android:gravity="center_vertical">
+ android:layout_width="match_parent"
+ android:layout_height="40dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp">
<ImageView
android:id="@android:id/icon1"
android:layout_width="24dp"
- android:layout_height="24dp"/>
+ android:layout_height="24dp" />
- <TextView android:id="@android:id/text1"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:minHeight="?android:attr/listPreferredItemHeightSmall"
- android:textAppearance="?android:attr/textAppearanceListItemSmall"
- android:layout_marginLeft="8dp"/>
+ <TextView
+ android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceListItemSmall" />
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/autofill_instructions.xml b/app/src/main/res/layout/autofill_instructions.xml
index 82ad16d1..0316dd91 100644
--- a/app/src/main/res/layout/autofill_instructions.xml
+++ b/app/src/main/res/layout/autofill_instructions.xml
@@ -1,63 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="match_parent"
- android:layout_width="match_parent">
-
-<LinearLayout android:orientation="vertical"
- android:layout_height="fill_parent"
- android:layout_width="fill_parent"
- android:paddingLeft="24dp"
- android:paddingRight="24dp"
- android:paddingTop="20dp"
- android:paddingBottom="20dp">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="@dimen/abc_text_size_menu_material"
- android:text="@string/pref_autofill_enable_msg"
- android:id="@+id/textView"/>
-
- <ImageView
- android:layout_width="match_parent"
- android:id="@+id/imageView"
- android:src="@drawable/autofill_ins_1"
- android:layout_marginTop="8dp"
- android:layout_marginBottom="8dp"
- android:layout_height="wrap_content"
- android:adjustViewBounds="true"/>
-
- <ImageView
- android:layout_width="match_parent"
- android:id="@+id/imageView2"
- android:src="@drawable/autofill_ins_2"
- android:layout_marginBottom="8dp"
- android:layout_height="wrap_content"
- android:adjustViewBounds="true"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="@dimen/abc_text_size_menu_material"
- android:text="@string/pref_autofill_enable_msg2"
- android:id="@+id/textView3"/>
-
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="114dp"
- android:id="@+id/imageView3"
- android:src="@drawable/autofill_ins_3"
- android:layout_marginTop="8dp"
- android:layout_marginBottom="8dp"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="@dimen/abc_text_size_menu_material"
- android:text="@string/pref_autofill_enable_msg3"
- android:id="@+id/textView4"/>
-
-
-</LinearLayout>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:paddingBottom="20dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="20dp">
+
+ <TextView
+ android:id="@+id/textView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pref_autofill_enable_msg"
+ android:textSize="16sp" />
+
+ <ImageView
+ android:id="@+id/imageView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:adjustViewBounds="true"
+ android:src="@drawable/autofill_ins_1" />
+
+ <ImageView
+ android:id="@+id/imageView2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:adjustViewBounds="true"
+ android:src="@drawable/autofill_ins_2" />
+
+ <TextView
+ android:id="@+id/textView3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pref_autofill_enable_msg2"
+ android:textSize="16sp" />
+
+ <ImageView
+ android:id="@+id/imageView3"
+ android:layout_width="match_parent"
+ android:layout_height="114dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:src="@drawable/autofill_ins_3" />
+
+ <TextView
+ android:id="@+id/textView4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pref_autofill_enable_msg3"
+ android:textSize="16sp" />
+
+
+ </LinearLayout>
</ScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/autofill_recycler_view.xml b/app/src/main/res/layout/autofill_recycler_view.xml
index 4b4bcf26..5dc950c2 100644
--- a/app/src/main/res/layout/autofill_recycler_view.xml
+++ b/app/src/main/res/layout/autofill_recycler_view.xml
@@ -1,20 +1,20 @@
<?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">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/autofill_recycler"
- android:scrollbars="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ android:layout_height="match_parent"
+ android:scrollbars="vertical" />
<ProgressBar
+ android:id="@+id/progress_bar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/progress_bar"
- android:indeterminate="true"
android:layout_centerInParent="true"
- android:visibility="gone"/>
+ android:indeterminate="true"
+ android:visibility="gone" />
</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/autofill_row_layout.xml b/app/src/main/res/layout/autofill_row_layout.xml
index 6e51fab3..117a76fc 100644
--- a/app/src/main/res/layout/autofill_row_layout.xml
+++ b/app/src/main/res/layout/autofill_row_layout.xml
@@ -1,43 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="64dp"
- android:background="@drawable/autofill_row_background">
+ android:layout_width="match_parent"
+ android:layout_height="64dp"
+ android:background="@drawable/autofill_row_background"
+ android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackground"
+ android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:gravity="center_vertical">
-
+ android:paddingRight="@dimen/activity_horizontal_margin">
+
<ImageView
- android:layout_width="48dp"
- android:layout_height="48dp"
android:id="@+id/app_icon"
- />
+ android:layout_width="48dp"
+ android:layout_height="48dp" />
<LinearLayout
- android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
+ android:layout_marginLeft="8dp"
android:gravity="center_vertical"
- android:layout_marginLeft="8dp">
+ android:orientation="vertical">
<TextView
+ android:id="@+id/app_name"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/app_name"/>
+ android:layout_height="wrap_content" />
<TextView
+ android:id="@+id/secondary_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:id="@+id/secondary_text"
- android:textColor="@color/grey_600"/>
+ android:textColor="@color/grey_600" />
</LinearLayout>
</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_autofill.xml b/app/src/main/res/layout/fragment_autofill.xml
index a5b1ac90..7bdf3d84 100644
--- a/app/src/main/res/layout/fragment_autofill.xml
+++ b/app/src/main/res/layout/fragment_autofill.xml
@@ -1,58 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="24dp"
- android:paddingRight="24dp"
- android:paddingTop="20dp"
- android:paddingBottom="20dp">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:paddingBottom="20dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="20dp">
<RadioGroup
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
android:id="@+id/autofill_radiogroup"
- >
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
<RadioButton
+ android:id="@+id/use_default"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/autofill_apps_default"
- android:id="@+id/use_default"
android:layout_gravity="center_vertical"
- android:checked="false"/>
+ android:checked="false"
+ android:text="@string/autofill_apps_default" />
<RadioButton
+ android:id="@+id/first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/autofill_apps_first"
- android:id="@+id/first"
android:layout_gravity="center_vertical"
- android:checked="false"/>
+ android:checked="false"
+ android:text="@string/autofill_apps_first" />
<RadioButton
+ android:id="@+id/match"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/autofill_apps_match_ellipsis"
- android:id="@+id/match"
android:layout_gravity="center_vertical"
android:checked="false"
- />
+ android:text="@string/autofill_apps_match_ellipsis" />
<EditText
+ android:id="@+id/matched"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:id="@+id/matched"
android:layout_gravity="center_horizontal"
- android:editable="false"/>
+ android:editable="false" />
<RadioButton
+ android:id="@+id/never"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/autofill_apps_never"
- android:id="@+id/never"
android:layout_gravity="center_vertical"
android:checked="false"
- />
+ android:text="@string/autofill_apps_never" />
</RadioGroup>
diff --git a/app/src/main/res/layout/fragment_pwgen.xml b/app/src/main/res/layout/fragment_pwgen.xml
index 50a253f3..6c04fb95 100644
--- a/app/src/main/res/layout/fragment_pwgen.xml
+++ b/app/src/main/res/layout/fragment_pwgen.xml
@@ -1,26 +1,26 @@
<ScrollView
- android:layout_height="match_parent"
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- xmlns:android="http://schemas.android.com/apk/res/android">
+ android:layout_height="match_parent">
<LinearLayout 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:orientation="vertical"
- android:paddingLeft="24dp"
- android:paddingRight="24dp"
- android:paddingTop="20dp"
- android:paddingBottom="20dp"
- tools:context=".MainActivityFragment">
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:paddingBottom="20dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="20dp"
+ tools:context=".MainActivityFragment">
<TextView
android:id="@+id/passwordText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginBottom="8dp"
- android:textIsSelectable="true"/>
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textIsSelectable="true" />
<LinearLayout
android:layout_width="match_parent"
@@ -38,34 +38,34 @@
android:id="@+id/include"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
android:text="@string/pwgen_include"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_marginBottom="8dp"/>
+ android:textAppearance="?android:attr/textAppearanceSmall" />
<CheckBox
android:id="@+id/numerals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pwgen_numerals"/>
+ android:text="@string/pwgen_numerals" />
<CheckBox
android:id="@+id/symbols"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pwgen_symbols"/>
+ android:text="@string/pwgen_symbols" />
<CheckBox
android:id="@+id/uppercase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pwgen_uppercase"/>
+ android:text="@string/pwgen_uppercase" />
<CheckBox
android:id="@+id/ambiguous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/pwgen_ambiguous"/>
+ android:text="@string/pwgen_ambiguous" />
</LinearLayout>
@@ -79,10 +79,9 @@
android:id="@+id/length"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Length"
- android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_marginBottom="8dp"
- />
+ android:text="Length"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText
android:id="@+id/lengthNumber"
@@ -90,14 +89,13 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:ems="10"
- android:inputType="number"
- />
+ android:inputType="number" />
<CheckBox
android:id="@+id/pronounceable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Pronounceable"/>
+ android:text="Pronounceable" />
</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_show_ssh_key.xml b/app/src/main/res/layout/fragment_show_ssh_key.xml
index 1c72faee..36808f37 100644
--- a/app/src/main/res/layout/fragment_show_ssh_key.xml
+++ b/app/src/main/res/layout/fragment_show_ssh_key.xml
@@ -1,30 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingBottom="20dp"
- android:paddingLeft="24dp"
- android:paddingRight="24dp"
- android:paddingTop="20dp">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:paddingBottom="20dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="20dp">
<TextView
android:id="@+id/public_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textIsSelectable="true"/>
+ android:textIsSelectable="true" />
<TextView
android:id="@+id/public_key_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ssh_keygen_tip"
- android:textAppearance="?android:attr/textAppearanceMedium"/>
+ android:textSize="16sp" />
</LinearLayout>
</ScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml
index 321e77d0..dc1168d4 100644
--- a/app/src/main/res/layout/fragment_ssh_keygen.xml
+++ b/app/src/main/res/layout/fragment_ssh_keygen.xml
@@ -1,64 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:orientation="vertical">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin">
<TextView
android:id="@+id/label_length"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:gravity="center_vertical"
- android:text="@string/ssh_keygen_length"/>
+ android:text="@string/ssh_keygen_length" />
<Spinner
android:id="@+id/length"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:spinnerMode="dropdown"/>
+ android:spinnerMode="dropdown" />
- <android.support.design.widget.TextInputLayout
+ <android.support.design.widget.TextInputLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- app:hintTextAppearance="@style/TextAppearance.AppCompat"
- android:layout_marginTop="8dp">
+ android:layout_marginTop="8dp"
+ app:hintTextAppearance="@style/TextAppearance.AppCompat">
<EditText
android:id="@+id/passphrase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/ssh_keygen_passphrase"
- android:inputType="textPassword"/>
+ android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<CheckBox
+ android:id="@+id/show_passphrase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/ssh_keygen_show_passphrase"
- android:id="@+id/show_passphrase"
+ android:layout_marginTop="8dp"
android:checked="false"
- android:layout_marginTop="8dp"/>
+ android:text="@string/ssh_keygen_show_passphrase" />
- <android.support.design.widget.TextInputLayout
+ <android.support.design.widget.TextInputLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- app:hintTextAppearance="@style/TextAppearance.AppCompat"
- android:layout_marginTop="8dp">
+ android:layout_marginTop="8dp"
+ app:hintTextAppearance="@style/TextAppearance.AppCompat">
+
<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:inputType="text" />
</android.support.design.widget.TextInputLayout>
<Button
@@ -67,7 +65,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:onClick="generate"
- android:text="@string/ssh_keygen_generate"/>
+ android:text="@string/ssh_keygen_generate" />
</LinearLayout>
</ScrollView> \ No newline at end of file