Layout fixes (return padding instead margin)
This commit is contained in:
parent
83be8db17a
commit
ca435b4f3a
7 changed files with 143 additions and 143 deletions
|
@ -15,74 +15,69 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingStart="@dimen/list_content_padding"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:minHeight="@dimen/list_item_height"
|
||||
android:background="?attr/expandable_list_item_background" >
|
||||
android:background="?attr/expandable_list_item_background">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<CheckBox
|
||||
android:id="@+id/toggle_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:focusable="false"
|
||||
android:visibility="gone"
|
||||
tools:visiblity="visible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/category_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/category_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginStart="@dimen/list_content_padding">
|
||||
android:layout_weight="1"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="Category name"
|
||||
android:layout_marginStart="@dimen/list_content_padding" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/toggle_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:focusable="false"
|
||||
android:visibility="gone"
|
||||
tools:visiblity="visible"/>
|
||||
<ImageView
|
||||
android:id="@+id/options"
|
||||
android:contentDescription="@string/shared_string_more"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:focusable="false"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_overflow_menu_white"
|
||||
android:visibility="gone"
|
||||
tools:visiblity="visible"
|
||||
android:layout_marginEnd="4dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/category_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
<ImageView
|
||||
android:id="@+id/explist_indicator"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginEnd="@dimen/list_content_padding" />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/category_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_weight="1"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="Category name"
|
||||
android:layout_marginStart="@dimen/list_content_padding" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/options"
|
||||
android:contentDescription="@string/shared_string_more"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:focusable="false"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_overflow_menu_white"
|
||||
android:visibility="gone"
|
||||
tools:visiblity="visible"
|
||||
android:layout_marginEnd="4dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/explist_indicator"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_marginEnd="@dimen/list_content_padding" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:minHeight="@dimen/list_item_height"
|
||||
android:layout_marginLeft="@dimen/dialog_content_margin"
|
||||
android:layout_marginStart="@dimen/dialog_content_margin"
|
||||
android:paddingLeft="@dimen/dialog_content_margin"
|
||||
android:paddingStart="@dimen/dialog_content_margin"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<CheckBox
|
||||
|
@ -31,8 +33,10 @@
|
|||
android:visibility="gone"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:layout_marginRight="@dimen/dialog_content_margin"
|
||||
android:layout_marginEnd="@dimen/dialog_content_margin"
|
||||
android:paddingRight="@dimen/dialog_content_margin"
|
||||
android:paddingEnd="@dimen/dialog_content_margin"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:clickable="false"
|
||||
android:focusableInTouchMode="false" />
|
||||
|
||||
|
@ -79,8 +83,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/gpx_small_icon_margin"
|
||||
android:src="@drawable/ic_small_distance"
|
||||
android:layout_marginEnd="@dimen/gpx_small_icon_margin" />
|
||||
android:layout_marginEnd="@dimen/gpx_small_icon_margin"
|
||||
android:src="@drawable/ic_small_distance" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
|
@ -97,8 +101,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/gpx_small_icon_margin"
|
||||
android:src="@drawable/ic_small_point"
|
||||
android:layout_marginEnd="@dimen/gpx_small_icon_margin" />
|
||||
android:layout_marginEnd="@dimen/gpx_small_icon_margin"
|
||||
android:src="@drawable/ic_small_point" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/points_count"
|
||||
|
@ -115,8 +119,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/gpx_small_icon_margin"
|
||||
android:src="@drawable/ic_small_time"
|
||||
android:layout_marginEnd="@dimen/gpx_small_icon_margin" />
|
||||
android:layout_marginEnd="@dimen/gpx_small_icon_margin"
|
||||
android:src="@drawable/ic_small_time" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
|
@ -161,10 +165,10 @@
|
|||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:layout_marginLeft="@dimen/favorites_icon_right_margin"
|
||||
android:layout_marginStart="@dimen/favorites_icon_right_margin"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:src="@drawable/ic_action_gsave_dark"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/favorites_icon_right_margin" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/stop"
|
||||
|
|
|
@ -1,84 +1,79 @@
|
|||
<?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="wrap_content"
|
||||
android:background="?attr/expandable_list_item_background"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:minHeight="@dimen/list_item_height">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingStart="@dimen/list_content_padding"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:background="?attr/expandable_list_item_background"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:minHeight="@dimen/list_item_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_local_index"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/favorites_icon_top_margin"
|
||||
android:layout_marginEnd="@dimen/local_index_check_right_margin"
|
||||
android:layout_marginRight="@dimen/local_index_check_right_margin"
|
||||
android:focusable="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/favorites_icon_top_margin"
|
||||
android:layout_marginEnd="@dimen/favorites_icon_right_margin"
|
||||
android:layout_marginRight="@dimen/favorites_icon_right_margin"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/ic_gpx_track" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginStart="@dimen/list_content_padding">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_local_index"
|
||||
<TextView
|
||||
android:id="@+id/nameTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/local_index_check_right_margin"
|
||||
android:layout_marginEnd="@dimen/local_index_check_right_margin"
|
||||
android:layout_marginTop="@dimen/favorites_icon_top_margin"
|
||||
android:focusable="false"
|
||||
android:visibility="gone"/>
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="Bangladesh" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/favorites_icon_right_margin"
|
||||
android:layout_marginEnd="@dimen/favorites_icon_right_margin"
|
||||
android:layout_marginTop="@dimen/favorites_icon_top_margin"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/ic_gpx_track"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTextView"
|
||||
android:id="@+id/descriptionTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="Bangladesh"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/descriptionTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="7dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
tools:text="12.34 Mb * 10/4/2015"/>
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_marginEnd="7dp"
|
||||
android:layout_marginRight="7dp"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
tools:text="12.34 Mb * 10/4/2015" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/options"
|
||||
android:contentDescription="@string/shared_string_more"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/ic_overflow_menu_white"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/options"
|
||||
android:layout_width="@dimen/list_item_height"
|
||||
android:layout_height="@dimen/list_item_height"
|
||||
android:background="?attr/dashboard_button"
|
||||
android:contentDescription="@string/shared_string_more"
|
||||
android:focusable="false"
|
||||
android:src="@drawable/ic_overflow_menu_white" />
|
||||
|
||||
</LinearLayout>
|
|
@ -18,8 +18,10 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:drawablePadding="@dimen/content_padding"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/content_padding"
|
||||
android:layout_marginStart="@dimen/content_padding"
|
||||
android:paddingLeft="@dimen/content_padding"
|
||||
android:paddingStart="@dimen/content_padding"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
||||
android:textStyle="normal"
|
||||
tools:drawableLeft="@drawable/ic_action_search_dark"
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_marginEnd="@dimen/content_padding"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="Amsterdam" />
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="24dp">
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/title"
|
||||
|
|
|
@ -12,8 +12,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/list_item_height"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginStart="@dimen/list_content_padding">
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingStart="@dimen/list_content_padding"
|
||||
android:paddingRight="0dp"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
|
|
Loading…
Reference in a new issue