OsmAnd/OsmAnd/res/layout/favorites_list_item.xml

158 lines
7.3 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:osmand="http://schemas.android.com/apk/res-auto"
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-05-15 13:00:38 +02:00
android:paddingStart="@dimen/favorites_my_places_icon_left_padding"
android:paddingLeft="@dimen/favorites_my_places_icon_left_padding"
android:paddingEnd="@dimen/favorites_my_places_icon_left_padding"
android:paddingRight="@dimen/favorites_my_places_icon_left_padding">
2015-02-16 17:04:47 +01:00
2020-01-27 20:29:52 +01:00
<FrameLayout
2020-05-15 13:00:38 +02:00
android:layout_width="@dimen/favorites_my_places_icon_size"
2020-04-15 11:29:17 +02:00
android:layout_height="match_parent"
android:layout_gravity="center_vertical">
2020-01-27 20:29:52 +01:00
<androidx.appcompat.widget.AppCompatCheckBox
2020-01-27 20:29:52 +01:00
android:id="@+id/toggle_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
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
2020-05-15 09:58:37 +02:00
<androidx.appcompat.widget.AppCompatImageView
2020-01-27 20:29:52 +01:00
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"
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-05-15 13:00:38 +02:00
android:layout_marginStart="@dimen/favorites_my_places_icon_right_padding"
android:layout_marginLeft="@dimen/favorites_my_places_icon_right_padding"
android:layout_marginEnd="@dimen/favorites_my_places_icon_right_padding"
android:layout_marginRight="@dimen/favorites_my_places_icon_right_padding"
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
2020-05-15 09:58:37 +02:00
<androidx.appcompat.widget.AppCompatImageView
2015-03-07 12:37:31 +01:00
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"
osmand:srcCompat="@drawable/ic_direction_arrow" />
2015-02-10 18:18:44 +01:00
<net.osmand.plus.widgets.TextViewEx
2015-03-07 12:37:31 +01:00
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:maxLines="1"
2015-03-07 12:37:31 +01:00
android:textColor="?android:textColorSecondary"
osmand:typeface="@string/font_roboto_medium"
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
2020-05-15 09:58:37 +02:00
<androidx.appcompat.widget.AppCompatImageView
2015-03-07 12:37:31 +01:00
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"
osmand:srcCompat="@drawable/ic_action_group_name_16" />
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"
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" />
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"
osmand:srcCompat="@drawable/ic_action_remove_dark"
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"
osmand:srcCompat="@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>