Skip to content

Commit

Permalink
first start dialog: improve Android 2.x and tiny screens
Browse files Browse the repository at this point in the history
  • Loading branch information
ge0rg committed Oct 29, 2014
1 parent f2607f3 commit a5a4899
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
30 changes: 13 additions & 17 deletions res/layout/firststartdialog.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="https://schemas.android.com/apk/res/android"
android:id="@+id/statusLayout"
<ScrollView xmlns:android="https://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingStart="10dp"
android:paddingRight="10dp"
android:paddingEnd="10dp"
android:paddingBottom="15dp"
android:paddingTop="10dp" >


<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/StartupDialog_Summary"
android:layout_width="wrap_content"
Expand All @@ -25,15 +27,6 @@
style="?attr/dialogTextColor"
android:focusable="true"
/>
<ScrollView android:id="@+id/StartupDialog_ScrollView"
android:layout_height="wrap_content"
android:layout_width="fill_parent" >
<LinearLayout
android:id="@+id/AddContact_ScrollLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/StartupDialog_Username_title"
android:layout_width="fill_parent"
Expand All @@ -54,6 +47,7 @@
android:maxWidth="200sp"
android:inputType="textEmailAddress"
android:hint="@string/Global_JID_hint"
style="@style/dialogEditText"
android:contentDescription="@string/StartupDialog_Username_title"/>
<TextView
android:id="@+id/StartupDialog_passwd_title"
Expand All @@ -75,12 +69,14 @@
android:maxWidth="200sp"
android:hint="@string/StartupDialog_pwHint"
android:contentDescription="@string/StartupDialog_passwd_title"
style="@style/dialogEditText"
/>
<CheckBox
android:id="@+id/create_account"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/StartupDialog_create_new"
android:focusableInTouchMode="true"
style="?attr/dialogTextColor"
/>
<EditText
Expand All @@ -96,8 +92,8 @@
android:maxWidth="200sp"
android:hint="@string/StartupDialog_pwrHint"
android:contentDescription="@string/StartupDialog_passwd_title"
style="@style/dialogEditText"
/>

</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
</ScrollView>
5 changes: 4 additions & 1 deletion res/values-v11/dialog_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
<style name="dialogBackground">
<!-- empty -->
</style>
</resources>
<style name="dialogEditText">
<!-- empty -->
</style>
</resources>
5 changes: 4 additions & 1 deletion res/values-v7/dialog_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
<style name="dialogBackground">
<item name="android:textColor">#fff</item>
</style>
</resources>
<style name="dialogEditText">
<item name="android:textColor">#000</item>
</style>
</resources>
2 changes: 2 additions & 0 deletions src/org/yaxim/androidclient/dialogs/FirstStartDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ private void updateDialog() {
@Override
public void onCheckedChanged(CompoundButton btn,boolean isChecked) {
mRepeatPassword.setVisibility(isChecked? View.VISIBLE : View.GONE);
if (isChecked)
mRepeatPassword.requestFocus();
updateDialog();
}
public void afterTextChanged(Editable s) {
Expand Down

0 comments on commit a5a4899

Please sign in to comment.