UI cleanup & reformat

This commit is contained in:
Matthew Wong 2015-08-26 17:03:37 -04:00
parent 88f0cddd58
commit f6d3dc23fb
10 changed files with 173 additions and 191 deletions

View file

@ -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();

View file

@ -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>

View file

@ -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>

View file

@ -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">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="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">
<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: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"/>
<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: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: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: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"/>
<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: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"/>
<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: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"/>
<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: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"/>
<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>
</LinearLayout>
</ScrollView>

View file

@ -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>

View file

@ -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>

View file

@ -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: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"/>
<RadioButton
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"/>
<RadioButton
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_default" />
<RadioButton
android:id="@+id/first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
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: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>

View file

@ -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>

View file

@ -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>

View file

@ -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>