63 lines
2.4 KiB
XML
63 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?android:attr/listPreferredItemHeight"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
|
|
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
|
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/
|
|
-->
|
|
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical"
|
|
android:gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/repo_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical|start"
|
|
android:textAppearance="?attr/textAppearanceListItem"
|
|
android:singleLine="true"
|
|
android:ellipsize="marquee"/>
|
|
|
|
<TextView
|
|
android:id="@+id/repo_unverified"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical|start"
|
|
android:text="@string/unverified"
|
|
android:textSize="14sp"
|
|
android:textColor="@color/unverified"
|
|
android:singleLine="true"
|
|
android:ellipsize="marquee"/>
|
|
|
|
<TextView
|
|
android:id="@+id/repo_unsigned"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical|start"
|
|
android:text="@string/unsigned"
|
|
android:textSize="14sp"
|
|
android:textColor="@color/unsigned"
|
|
android:singleLine="true"
|
|
android:ellipsize="marquee"/>
|
|
|
|
</LinearLayout>
|
|
|
|
<android.support.v7.widget.SwitchCompat
|
|
android:id="@+id/repo_switch"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"/>
|
|
|
|
</LinearLayout>
|