OsmAnd/OsmAnd/res/layout/favorites_list_item.xml

158 lines
7.1 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
2015-03-07 12:37:31 +01:00
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?attr/expandable_list_item_background"
2020-04-15 11:29:17 +02:00
android:minHeight="@dimen/favorites_list_item_height"
android:orientation="vertical">
2015-03-07 12:37:31 +01:00
<View
android:id="@+id/divider"
2015-03-07 12:37:31 +01:00
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"
android:visibility="gone"/>
2017-02-18 13:59:44 +01:00
<View
android:id="@+id/list_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"
2020-02-24 15:17:23 +01:00
android:visibility="gone"
2020-04-15 11:29:17 +02:00
android:layout_marginLeft="@dimen/settings_divider_margin_start"
android:layout_marginStart="@dimen/settings_divider_margin_start" />
2017-02-18 13:59:44 +01:00
2015-03-07 12:37:31 +01:00
<LinearLayout
android:layout_width="match_parent"
2015-03-07 16:41:32 +01:00
android:layout_height="wrap_content"
2020-04-15 11:29:17 +02:00
android:minHeight="@dimen/favorites_list_item_height"
2015-03-07 16:41:32 +01:00
android:layout_gravity="center_vertical"
2015-03-07 12:37:31 +01:00
android:orientation="horizontal"
2020-04-28 10:55:30 +02:00
android:paddingStart="@dimen/list_header_text_left_margin"
android:paddingLeft="@dimen/list_header_text_left_margin"
android:paddingEnd="@dimen/list_header_text_left_margin"
android:paddingRight="@dimen/list_header_text_left_margin">
2015-02-16 17:04:47 +01:00
2020-01-27 20:29:52 +01:00
<FrameLayout
2020-04-15 11:29:17 +02:00
android:layout_width="@dimen/favorites_icon_size"
android:layout_height="match_parent"
android:layout_gravity="center_vertical">
2020-01-27 20:29:52 +01:00
<CheckBox
android:id="@+id/toggle_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
2020-04-15 11:29:17 +02:00
android:layout_marginStart="@dimen/list_header_padding"
android:layout_marginLeft="@dimen/list_header_padding"
2020-01-27 20:29:52 +01:00
android:focusable="false"
android:visibility="gone"
2020-04-15 11:29:17 +02:00
tools:visibility="visible" />
2020-01-27 20:29:52 +01:00
<ImageView
android:id="@+id/favourite_icon"
2020-03-30 11:42:54 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-04-15 11:29:17 +02:00
android:layout_gravity="center"
android:contentDescription="@string/favorite"
2020-03-30 11:42:54 +02:00
android:scaleType="center"
2020-04-15 11:29:17 +02:00
tools:src="@drawable/bg_point_circle"/>
2020-01-27 20:29:52 +01:00
</FrameLayout>
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
2015-03-07 13:18:26 +01:00
android:orientation="vertical"
2020-04-28 10:55:30 +02:00
android:layout_marginStart="@dimen/context_menu_padding_margin_large"
android:layout_marginLeft="@dimen/context_menu_padding_margin_large"
android:layout_marginEnd="@dimen/context_menu_padding_margin_large"
android:layout_marginRight="@dimen/context_menu_padding_margin_large"
2020-04-15 11:29:17 +02:00
android:paddingTop="@dimen/context_menu_padding_margin_small"
android:paddingBottom="@dimen/context_menu_padding_margin_small">
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<TextView
android:id="@+id/favourite_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-04-15 11:29:17 +02:00
android:maxLines="2"
android:scrollbars="none"
2015-03-07 12:37:31 +01:00
android:textColor="?android:textColorPrimary"
2020-04-15 11:29:17 +02:00
android:layout_marginBottom="@dimen/subHeaderPadding"
android:textSize="@dimen/default_list_text_size"
2020-04-15 11:29:17 +02:00
tools:text="@string/lorem_ipsum" />
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<ImageView
android:id="@+id/direction"
2015-04-15 11:33:33 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-04-15 11:29:17 +02:00
android:layout_gravity="center_vertical"
android:contentDescription="@string/show_view_angle"
android:src="@drawable/ic_direction_arrow" />
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<TextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-04-15 11:29:17 +02:00
android:layout_marginStart="@dimen/gpx_small_icon_margin"
android:layout_marginLeft="@dimen/gpx_small_icon_margin"
android:ellipsize="end"
android:maxLines="1"
2015-03-07 12:37:31 +01:00
android:textColor="?android:textColorSecondary"
2020-04-15 11:29:17 +02:00
android:textSize="@dimen/default_desc_text_size"
tools:text="100500 km" />
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<ImageView
android:id="@+id/group_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
2020-04-14 14:01:18 +02:00
android:layout_marginStart="@dimen/list_item_button_padding"
2020-04-15 11:29:17 +02:00
android:layout_marginLeft="@dimen/list_item_button_padding"
android:contentDescription="@string/favorite_category_name"
android:src="@drawable/ic_small_group" />
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<TextView
android:id="@+id/group_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
2020-04-15 11:29:17 +02:00
android:layout_marginStart="@dimen/gpx_small_icon_margin"
android:layout_marginLeft="@dimen/gpx_small_icon_margin"
2015-03-07 12:37:31 +01:00
android:textColor="?android:textColorSecondary"
2020-04-15 11:29:17 +02:00
android:textSize="@dimen/default_desc_text_size" />
2015-03-07 12:37:31 +01:00
</LinearLayout>
</LinearLayout>
2015-02-10 18:18:44 +01:00
2015-03-07 12:37:31 +01:00
<ImageButton
android:id="@+id/navigate_to"
android:layout_width="@dimen/list_item_height"
android:layout_height="@dimen/list_item_height"
2015-03-07 12:37:31 +01:00
android:layout_gravity="center_vertical"
2020-04-15 11:29:17 +02:00
android:layout_marginStart="@dimen/dashFavIconMargin"
2015-03-07 12:37:31 +01:00
android:layout_marginLeft="@dimen/dashFavIconMargin"
android:background="?attr/dashboard_button"
2020-04-15 11:29:17 +02:00
android:contentDescription="@string/context_menu_item_directions_to"
android:src="@drawable/ic_action_test_light"
2020-04-15 11:29:17 +02:00
android:visibility="gone" />
2015-03-10 00:49:29 +01:00
<ImageButton
android:id="@+id/options"
android:layout_width="@dimen/list_item_height"
android:layout_height="@dimen/list_item_height"
2015-03-10 00:49:29 +01:00
android:layout_gravity="center_vertical"
2015-04-24 23:45:03 +02:00
android:background="?attr/dashboard_button"
2020-04-15 11:29:17 +02:00
android:contentDescription="@string/shared_string_more"
android:src="@drawable/ic_overflow_menu_white"
2020-04-15 11:29:17 +02:00
android:visibility="gone" />
2015-03-07 12:37:31 +01:00
</LinearLayout>
</LinearLayout>