
textAlignment works well for 4.2 and later, but it is ignored in 4.1 and earlier. Seting gravity to its textAlignment equivalent fixes this.
104 строки
2.8 KiB
XML
104 строки
2.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:orientation="horizontal"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:padding="10dp"
|
|
android:baselineAligned="false" >
|
|
|
|
<!-- Actual icon size is dependent on preferences and set in
|
|
AppListAdapater.java:layoutIcon() -->
|
|
<ImageView
|
|
android:id="@+id/icon"
|
|
android:contentDescription="@string/app_icon"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_gravity="center_vertical"
|
|
android:scaleType="fitCenter"
|
|
/>
|
|
|
|
<LinearLayout
|
|
android:orientation="vertical"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="10dp"
|
|
android:paddingStart="10dp"
|
|
android:layout_gravity="center_vertical"
|
|
android:baselineAligned="false" >
|
|
|
|
<LinearLayout
|
|
android:orientation="horizontal"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:baselineAligned="false"
|
|
android:layout_marginBottom="3dp"
|
|
>
|
|
|
|
<TextView android:id="@+id/name"
|
|
android:textSize="17sp"
|
|
android:textStyle="bold"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:layout_weight="2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:gravity="start"
|
|
android:textAlignment="viewStart"
|
|
/>
|
|
|
|
<TextView android:id="@+id/status"
|
|
android:textSize="13sp"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:layout_weight="1"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_gravity="center_vertical"
|
|
android:gravity="end"
|
|
android:textAlignment="viewEnd"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:orientation="horizontal"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:baselineAligned="false"
|
|
>
|
|
|
|
<TextView android:id="@+id/summary"
|
|
android:textSize="13sp"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:layout_weight="2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:gravity="start"
|
|
android:textAlignment="viewStart"
|
|
/>
|
|
|
|
<TextView android:id="@+id/license"
|
|
android:textSize="12sp"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:layout_weight="1"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="6sp"
|
|
android:layout_marginStart="6sp"
|
|
android:layout_gravity="center_vertical"
|
|
android:gravity="end"
|
|
android:textAlignment="viewEnd"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|