Files
vpnhotspotmod/mobile/src/main/res/layout/listitem_interface.xml
2018-05-02 21:34:31 -07:00

63 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="data"
type="be.mygod.vpnhotspot.TetheringFragment.Data"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:padding="16dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@{data.icon}"
android:tint="?android:attr/textColorPrimary"
tools:src="@drawable/ic_device_network_wifi"/>
<Space
android:layout_width="16dp"
android:layout_height="0dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.title}"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:text="wlan0"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.text}"
android:textIsSelectable="@{data.selectable}"
tools:text="192.168.43.1/24\n01:23:45:ab:cd:ef"/>
</LinearLayout>
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:checked="@{data.active}"
android:clickable="false"
android:ellipsize="end"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"/>
</LinearLayout>
</layout>