OsmAnd/OsmAnd/res/layout/button_with_icon_and_subtext.xml
2020-05-15 10:58:37 +03:00

56 lines
No EOL
1.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dialog_button_ex_height">
<LinearLayout
android:id="@+id/button_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
tools:src="@drawable/ic_action_keep_both" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/content_padding_small"
android:layout_weight="1"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="Main text" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/sub_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textSize="@dimen/default_sub_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="Long subtext about two lines" />
</LinearLayout>
</LinearLayout>
</FrameLayout>