OsmAnd/OsmAnd/res/layout/plugins_list_item.xml
2015-01-30 15:26:15 +02:00

86 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="84dp"
android:background="?attr/card_bg"
android:descendantFocusability="blocksDescendants"
android:padding="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/plugin_logo"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_margin="8dp"
android:background="@drawable/bg_plugin_logo"
android:scaleType="center"
android:src="@drawable/ic_extension_dark"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginBottom="8dp"
android:layout_marginEnd="16dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="16dp"
android:layout_marginStart="6dp"
android:layout_marginTop="8dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/plugin_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="19sp"
android:textStyle="bold"
tools:text="@string/lorem_ipsum"/>
<TextView
android:id="@+id/plugin_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="2"
android:maxLines="2"
android:textColor="?android:textColorSecondary"
android:textSize="14sp"
tools:text="@string/lorem_ipsum"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:orientation="horizontal">
<ImageView
android:id="@+id/plugin_is_enabled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:src="?attr/ic_action_check"
android:visibility="invisible"
tools:visibility="visible"/>
<ImageButton
android:id="@+id/plugin_options"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?attr/ic_plugin_options"/>
</LinearLayout>
</FrameLayout>