Some much needed fixes to appdetails headers

* If the info is taller than the icon, grow larger to fit it in
* Center icon vertically
* Move padding out of the header
* Revert some font sizes to how they were some time ago, a bit smaller
This commit is contained in:
Daniel Martí 2014-02-12 19:30:26 +01:00
parent 9b2e5c2426
commit 9bd236d66c
2 changed files with 25 additions and 23 deletions

View File

@ -10,19 +10,18 @@
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="4dp"
android:orientation="horizontal" >
<ImageView
android:id="@+id/icon"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_height="fill_parent"
android:padding="4dp"
android:scaleType="fitCenter" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="56dp"
android:layout_height="wrap_content"
android:padding="6dp"
android:orientation="vertical" >
@ -34,21 +33,8 @@
android:layout_alignParentRight="true"
android:singleLine="true"
android:ellipsize="end"
android:paddingTop="3sp"
android:paddingBottom="3sp"
android:layout_marginLeft="8sp"
android:textSize="13sp" />
<TextView
android:id="@+id/categories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginLeft="8sp"
android:textSize="13sp" />
android:layout_marginLeft="6sp"
android:textSize="12sp" />
<TextView
android:id="@+id/title"
@ -61,16 +47,29 @@
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/license" />
<TextView
android:id="@+id/categories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
android:layout_alignParentRight="true"
android:layout_marginLeft="6sp"
android:layout_below="@id/title"
android:textSize="12sp" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
android:textSize="13sp"
android:textSize="12sp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@id/categories" />
android:layout_toLeftOf="@id/categories"
android:layout_below="@id/title" />
</RelativeLayout>
</LinearLayout>

View File

@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="4dp"
android:paddingBottom="8dp"
android:baselineAligned="false"
android:orientation="vertical" >
@ -16,7 +17,7 @@
android:id="@+id/appid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="13sp" />
android:textSize="12sp" />
<TextView
android:id="@+id/signature"
@ -37,6 +38,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8sp"
android:textSize="13sp"
android:singleLine="false" />
<TextView
@ -51,6 +53,7 @@
android:id="@+id/permissions_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="13sp"
android:singleLine="false" />
</LinearLayout>