Fix for height of filter adapter text in Amazon kindle being cut off

pull/14/head
Tim Su 12 years ago
parent 437b9a3bea
commit 1d215de036

@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<!-- Note that properties like height, background color, and filter name size
are defined in FilterAdapter.java -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="58dip"
android:background="@android:drawable/list_selector_background"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:paddingLeft="7dip"
android:paddingRight="6dip"
android:orientation="horizontal">
<!-- filter icon -->
@ -33,12 +30,13 @@
<!-- filter name -->
<TextView android:id="@+id/name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="55dp"
android:layout_marginTop="2dp"
android:paddingRight="30dp"
android:checked="false"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:lines="2"
android:ellipsize="marquee"
android:gravity="center_vertical" />
<!-- size -->

@ -419,7 +419,7 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
} else {
viewHolder.name.setTextAppearance(activity, filterStyle);
viewHolder.name.setShadowLayer(0, 0, 0, 0);
viewHolder.view.setPadding((int) (7 * metrics.density), 8, 0, 8);
viewHolder.view.setPadding((int) (7 * metrics.density), 2, 0, 2);
viewHolder.view.getLayoutParams().height = (int) (58 * metrics.density);
}

Loading…
Cancel
Save