Refactor about screen.

* Add paddings.
* Don't use hard-coded pixel sizes.
* Don't use white color directly (this would soon break the white holo theme)
* Don't use an "empty" textview to force a vertical space.

Looks much cleaner now, and the code is easier on the eyes.
This commit is contained in:
Daniel Martí 2013-05-26 12:25:46 +02:00
parent 6f3c5b4e85
commit 18ae6e6da2
2 changed files with 42 additions and 24 deletions

View File

@ -1,52 +1,71 @@
<?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="fill_parent" android:layout_height="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical" android:paddingLeft="5px"> android:layout_height="fill_parent"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="6dp"
android:paddingBottom="6dp"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView android:text="@string/about_version" <TextView android:text="@string/about_version"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold"
android:textSize="16px" android:textColor="#ffffff" /> android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/version" android:layout_width="wrap_content" <TextView android:id="@+id/version"
android:paddingLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<LinearLayout android:layout_width="fill_parent" <LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="horizontal"> android:layout_height="fill_parent"
android:orientation="horizontal">
<TextView android:id="@+id/site" android:text="@string/about_site" <TextView android:id="@+id/site"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_site"
android:textSize="16px" android:textColor="#ffffff" /> android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/sitec" android:text="@string/about_sitec" <TextView android:id="@+id/sitec"
android:layout_width="wrap_content" android:layout_height="wrap_content" /> android:text="@string/about_sitec"
android:paddingLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView android:id="@+id/mail" android:text="@string/about_mail" <TextView android:id="@+id/mail"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_mail"
android:textSize="16px" android:textColor="#ffffff" /> android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/mailc" android:text="@string/about_mailc" <TextView android:id="@+id/mailc"
android:autoLink="email" android:layout_width="wrap_content" android:text="@string/about_mailc"
android:paddingLeft="5dp"
android:autoLink="email"
android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<TextView android:id="@+id/not" android:text="@string/about_not"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:text="@string/about_desc" <TextView android:text="@string/about_desc"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="5dp"
android:textSize="16px" /> android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout> </LinearLayout>

View File

@ -36,7 +36,6 @@
<string name="about_mailc">admin@f-droid.org</string> <string name="about_mailc">admin@f-droid.org</string>
<string name="about_version">Version: </string> <string name="about_version">Version: </string>
<string name="about_website">Website</string> <string name="about_website">Website</string>
<string name="about_not"> </string>
<string name="no_repo">You don\'t have any repositories configured!\n\nA <string name="no_repo">You don\'t have any repositories configured!\n\nA
repository is a source of applications. To add one, press the MENU repository is a source of applications. To add one, press the MENU