BobStore/res/layout/repo_item.xml
Daniel Martí 66563d30d9 First attempt at supporting RTL
Following the Android 4.2 changes, which explain how to add native support for
RTL, I've replaced Right for End and Left for Start. Enabling RTL to see the
results.
2014-02-21 00:11:58 +01:00

39 lines
1.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="25dp"
android:padding="8dp"
android:descendantFocusability="blocksDescendants">
<!--
descendantFocusability is here because if you have a child that responds
to touch events (in our case, the switch/toggle button) then the list item
itself will not respond to touch events.
http://syedasaraahmed.wordpress.com/2012/10/03/android-onitemclicklistener-not-responding-clickable-rowitem-of-custom-listview/
-->
<ImageView android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true" />
<TextView android:id="@+id/repo_name"
android:textSize="21sp"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="marquee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/img"
android:layout_alignParentStart="true"/>
<TextView android:id="@+id/repo_unsigned"
android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/repo_name"
android:text="@string/unsigned"
android:textColor="@color/unsigned"/>
</RelativeLayout>