Skip to content

Commit

Permalink
Use ScrollView to fit shorter screens
Browse files Browse the repository at this point in the history
  • Loading branch information
fishy committed Nov 1, 2016
1 parent ee43004 commit cd19ae4
Showing 1 changed file with 122 additions and 108 deletions.
230 changes: 122 additions & 108 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,121 +3,135 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
>
<TextView
android:text="@string/master_key"
<ScrollView
android:fillViewport="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<EditText
android:id="@+id/master_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:singleLine="true"
android:hint="@string/hint_master"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView
android:text="@string/site_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<EditText
android:id="@+id/site_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textAutoCorrect"
android:singleLine="true"
android:hint="@string/hint_site"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView
android:text="@string/length"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<RadioGroup
android:id="@+id/length_group"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
>
<RadioButton
android:id="@+id/length1"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="8"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<RadioButton
android:id="@+id/length2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="10"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<RadioButton
android:id="@+id/length3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="15"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<RadioButton
android:id="@+id/length4"
android:checked="true"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="20"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView
android:text="@string/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:hint="@string/hint_password"
android:inputType="textVisiblePassword"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
>
<TextView
android:text="@string/master_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<EditText
android:id="@+id/master_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:singleLine="true"
android:hint="@string/hint_master"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView
android:text="@string/site_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<EditText
android:id="@+id/site_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textAutoCorrect"
android:singleLine="true"
android:hint="@string/hint_site"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView
android:text="@string/length"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<RadioGroup
android:id="@+id/length_group"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RadioButton
android:id="@+id/length1"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="8"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<RadioButton
android:id="@+id/length2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="10"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<RadioButton
android:id="@+id/length3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="15"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<RadioButton
android:id="@+id/length4"
android:checked="true"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="20"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</RadioGroup>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
<TextView
android:text="@string/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:hint="@string/hint_password"
android:inputType="textVisiblePassword"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:drawable/divider_horizontal_dark"
/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:gravity="center"
>
<Button
android:id="@+id/generate"
Expand Down

0 comments on commit cd19ae4

Please sign in to comment.