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"); setTitle("Generate SSH Key");
setContentView(R.layout.activity_ssh_keygen);
if (savedInstanceState == null) { if (savedInstanceState == null) {
getFragmentManager().beginTransaction() getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SshKeyGenFragment()).commit(); .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"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="40dp"
android:orientation="horizontal" android:gravity="center_vertical"
android:paddingLeft="8dp" android:orientation="horizontal"
android:paddingRight="8dp" android:paddingLeft="8dp"
android:gravity="center_vertical"> android:paddingRight="8dp">
<ImageView <ImageView
android:id="@android:id/icon1" android:id="@android:id/icon1"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp"/> android:layout_height="24dp" />
<TextView android:id="@android:id/text1" <TextView
xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/text1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:layout_marginLeft="8dp"
android:minHeight="?android:attr/listPreferredItemHeightSmall" android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textAppearance="?android:attr/textAppearanceListItemSmall" />
android:layout_marginLeft="8dp"/>
</LinearLayout> </LinearLayout>

View file

@ -1,63 +1,63 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:layout_width="match_parent">
<LinearLayout android:orientation="vertical" <LinearLayout
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:paddingLeft="24dp" android:orientation="vertical"
android:paddingRight="24dp" android:paddingBottom="20dp"
android:paddingTop="20dp" android:paddingLeft="24dp"
android:paddingBottom="20dp"> android:paddingRight="24dp"
android:paddingTop="20dp">
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/textView"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:textSize="@dimen/abc_text_size_menu_material" android:layout_height="wrap_content"
android:text="@string/pref_autofill_enable_msg" android:text="@string/pref_autofill_enable_msg"
android:id="@+id/textView"/> android:textSize="16sp" />
<ImageView <ImageView
android:layout_width="match_parent" android:id="@+id/imageView"
android:id="@+id/imageView" android:layout_width="match_parent"
android:src="@drawable/autofill_ins_1" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginBottom="8dp"
android:layout_marginBottom="8dp" android:layout_marginTop="8dp"
android:layout_height="wrap_content" android:adjustViewBounds="true"
android:adjustViewBounds="true"/> android:src="@drawable/autofill_ins_1" />
<ImageView <ImageView
android:layout_width="match_parent" android:id="@+id/imageView2"
android:id="@+id/imageView2" android:layout_width="match_parent"
android:src="@drawable/autofill_ins_2" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:layout_height="wrap_content" android:adjustViewBounds="true"
android:adjustViewBounds="true"/> android:src="@drawable/autofill_ins_2" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/textView3"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:textSize="@dimen/abc_text_size_menu_material" android:layout_height="wrap_content"
android:text="@string/pref_autofill_enable_msg2" android:text="@string/pref_autofill_enable_msg2"
android:id="@+id/textView3"/> android:textSize="16sp" />
<ImageView <ImageView
android:layout_width="match_parent" android:id="@+id/imageView3"
android:layout_height="114dp" android:layout_width="match_parent"
android:id="@+id/imageView3" android:layout_height="114dp"
android:src="@drawable/autofill_ins_3" android:layout_marginBottom="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"/> android:src="@drawable/autofill_ins_3" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/textView4"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:textSize="@dimen/abc_text_size_menu_material" android:layout_height="wrap_content"
android:text="@string/pref_autofill_enable_msg3" android:text="@string/pref_autofill_enable_msg3"
android:id="@+id/textView4"/> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View file

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/autofill_recycler" android:id="@+id/autofill_recycler"
android:scrollbars="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"
android:scrollbars="vertical" />
<ProgressBar <ProgressBar
android:id="@+id/progress_bar"
style="?android:attr/progressBarStyleLarge" style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/progress_bar"
android:indeterminate="true"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:visibility="gone"/> android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout> </RelativeLayout>

View file

@ -1,43 +1,42 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="64dp"
android:layout_height="64dp" android:background="@drawable/autofill_row_background"
android:background="@drawable/autofill_row_background"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin">
android:gravity="center_vertical">
<ImageView <ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:id="@+id/app_icon" android:id="@+id/app_icon"
/> android:layout_width="48dp"
android:layout_height="48dp" />
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="8dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_marginLeft="8dp"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/app_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
android:id="@+id/app_name"/>
<TextView <TextView
android:id="@+id/secondary_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/secondary_text" android:textColor="@color/grey_600" />
android:textColor="@color/grey_600"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -1,58 +1,56 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="match_parent"
android:layout_height="match_parent" android:orientation="vertical"
android:paddingLeft="24dp" android:paddingBottom="20dp"
android:paddingRight="24dp" android:paddingLeft="24dp"
android:paddingTop="20dp" android:paddingRight="24dp"
android:paddingBottom="20dp"> android:paddingTop="20dp">
<RadioGroup <RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/autofill_radiogroup" android:id="@+id/autofill_radiogroup"
> android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton <RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/autofill_apps_default"
android:id="@+id/use_default" android:id="@+id/use_default"
android:layout_gravity="center_vertical"
android:checked="false"/>
<RadioButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="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: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: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 <EditText
android:id="@+id/matched"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/matched"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:editable="false"/> android:editable="false" />
<RadioButton <RadioButton
android:id="@+id/never"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/autofill_apps_never"
android:id="@+id/never"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:checked="false" android:checked="false"
/> android:text="@string/autofill_apps_never" />
</RadioGroup> </RadioGroup>

View file

@ -1,26 +1,26 @@
<ScrollView <ScrollView
android:layout_height="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" 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" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="24dp" android:paddingBottom="20dp"
android:paddingRight="24dp" android:paddingLeft="24dp"
android:paddingTop="20dp" android:paddingRight="24dp"
android:paddingBottom="20dp" android:paddingTop="20dp"
tools:context=".MainActivityFragment"> tools:context=".MainActivityFragment">
<TextView <TextView
android:id="@+id/passwordText" android:id="@+id/passwordText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:textIsSelectable="true"/> android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="true" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -38,34 +38,34 @@
android:id="@+id/include" android:id="@+id/include"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/pwgen_include" android:text="@string/pwgen_include"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall" />
android:layout_marginBottom="8dp"/>
<CheckBox <CheckBox
android:id="@+id/numerals" android:id="@+id/numerals"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pwgen_numerals"/> android:text="@string/pwgen_numerals" />
<CheckBox <CheckBox
android:id="@+id/symbols" android:id="@+id/symbols"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pwgen_symbols"/> android:text="@string/pwgen_symbols" />
<CheckBox <CheckBox
android:id="@+id/uppercase" android:id="@+id/uppercase"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pwgen_uppercase"/> android:text="@string/pwgen_uppercase" />
<CheckBox <CheckBox
android:id="@+id/ambiguous" android:id="@+id/ambiguous"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/pwgen_ambiguous"/> android:text="@string/pwgen_ambiguous" />
</LinearLayout> </LinearLayout>
@ -79,10 +79,9 @@
android:id="@+id/length" android:id="@+id/length"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Length"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
/> android:text="Length"
android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText <EditText
android:id="@+id/lengthNumber" android:id="@+id/lengthNumber"
@ -90,14 +89,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:ems="10" android:ems="10"
android:inputType="number" android:inputType="number" />
/>
<CheckBox <CheckBox
android:id="@+id/pronounceable" android:id="@+id/pronounceable"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Pronounceable"/> android:text="Pronounceable" />
</LinearLayout> </LinearLayout>

View file

@ -1,30 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20dp" android:paddingBottom="20dp"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingRight="24dp" android:paddingRight="24dp"
android:paddingTop="20dp"> android:paddingTop="20dp">
<TextView <TextView
android:id="@+id/public_key" android:id="@+id/public_key"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textIsSelectable="true"/> android:textIsSelectable="true" />
<TextView <TextView
android:id="@+id/public_key_tip" android:id="@+id/public_key_tip"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/ssh_keygen_tip" android:text="@string/ssh_keygen_tip"
android:textAppearance="?android:attr/textAppearanceMedium"/> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View file

@ -1,64 +1,62 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="@dimen/activity_horizontal_margin" android:orientation="vertical"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:orientation="vertical"> android:paddingRight="@dimen/activity_horizontal_margin">
<TextView <TextView
android:id="@+id/label_length" android:id="@+id/label_length"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="48dp" android:layout_height="48dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/ssh_keygen_length"/> android:text="@string/ssh_keygen_length" />
<Spinner <Spinner
android:id="@+id/length" android:id="@+id/length"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_marginTop="8dp"
app:hintTextAppearance="@style/TextAppearance.AppCompat" app:hintTextAppearance="@style/TextAppearance.AppCompat">
android:layout_marginTop="8dp">
<EditText <EditText
android:id="@+id/passphrase" android:id="@+id/passphrase"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/ssh_keygen_passphrase" android:hint="@string/ssh_keygen_passphrase"
android:inputType="textPassword"/> android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
<CheckBox <CheckBox
android:id="@+id/show_passphrase"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/ssh_keygen_show_passphrase" android:layout_marginTop="8dp"
android:id="@+id/show_passphrase"
android:checked="false" 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_marginTop="8dp"
app:hintTextAppearance="@style/TextAppearance.AppCompat" app:hintTextAppearance="@style/TextAppearance.AppCompat">
android:layout_marginTop="8dp">
<EditText <EditText
android:id="@+id/comment" android:id="@+id/comment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/ssh_keygen_comment" android:hint="@string/ssh_keygen_comment"
android:inputType="textShortMessage"/> android:inputType="text" />
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
<Button <Button
@ -67,7 +65,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:onClick="generate" android:onClick="generate"
android:text="@string/ssh_keygen_generate"/> android:text="@string/ssh_keygen_generate" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>