Fixed layout for configure screen item.
This commit is contained in:
parent
318c9e1bf4
commit
c9540d7af8
4 changed files with 102 additions and 73 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout android:id="@+id/dashboard"
|
||||||
android:id="@+id/dashboard"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
@ -20,8 +20,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="@dimen/dashboard_land_width"
|
android:layout_width="@dimen/dashboard_land_width"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:background="#70000000"
|
||||||
android:background="#70000000">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/dashboard_toolbar"/>
|
<include layout="@layout/dashboard_toolbar"/>
|
||||||
|
|
||||||
|
@ -57,18 +57,18 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/bg_color"
|
android:background="?attr/bg_color"
|
||||||
android:fadeScrollbars="true" >
|
android:divider="@null"
|
||||||
</net.osmand.plus.views.controls.DynamicListView>
|
android:fadeScrollbars="true"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/emptyTextView"
|
android:id="@+id/emptyTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
|
||||||
android:background="?attr/bg_color"
|
android:background="?attr/bg_color"
|
||||||
|
android:clickable="true"
|
||||||
|
android:gravity="center"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:clickable="true"
|
|
||||||
android:textSize="@dimen/default_list_text_size_large"
|
android:textSize="@dimen/default_list_text_size_large"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout
|
||||||
android:id="@+id/dashboard"
|
android:id="@+id/dashboard"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
@ -68,9 +69,9 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="100dp"
|
android:layout_marginTop="100dp"
|
||||||
|
android:gravity="center"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="@dimen/default_list_text_size_large"
|
android:textSize="@dimen/default_list_text_size_large"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
@ -80,8 +81,8 @@
|
||||||
android:id="@+id/dash_list_view"
|
android:id="@+id/dash_list_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fadeScrollbars="true" >
|
android:divider="@null"
|
||||||
</net.osmand.plus.views.controls.DynamicListView>
|
android:fadeScrollbars="true"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<include layout="@layout/dashboard_toolbar"/>
|
<include layout="@layout/dashboard_toolbar"/>
|
||||||
|
|
|
@ -1,37 +1,44 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/bg_color"
|
android:background="?attr/bg_color"
|
||||||
android:minHeight="60dp"
|
android:minHeight="60dp"
|
||||||
android:orientation="horizontal"
|
tools:layout_height="60dp">
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:paddingRight="16dp">
|
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatImageView
|
<android.support.v7.widget.AppCompatImageView
|
||||||
android:id="@+id/icon"
|
android:id="@+id/icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
tools:src="@drawable/ic_action_gabout_dark"/>
|
tools:src="@drawable/ic_action_gabout_dark"/>
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/text_wrapper"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/text_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_toEndOf="@+id/icon"
|
||||||
|
android:layout_toLeftOf="@+id/secondary_icon"
|
||||||
|
android:layout_toRightOf="@+id/icon"
|
||||||
|
android:layout_toStartOf="@+id/secondary_icon"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:minHeight="60dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -46,22 +53,41 @@
|
||||||
android:textSize="@dimen/default_desc_text_size"
|
android:textSize="@dimen/default_desc_text_size"
|
||||||
tools:text="Some title text"/>
|
tools:text="Some title text"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatImageView
|
<android.support.v7.widget.AppCompatImageView
|
||||||
android:id="@+id/secondary_icon"
|
android:id="@+id/secondary_icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
|
android:layout_toLeftOf="@+id/toggle_item"
|
||||||
|
android:layout_toStartOf="@+id/toggle_item"
|
||||||
tools:src="@drawable/ic_action_gabout_dark"/>
|
tools:src="@drawable/ic_action_gabout_dark"/>
|
||||||
|
|
||||||
<android.support.v7.widget.SwitchCompat
|
<android.support.v7.widget.SwitchCompat
|
||||||
android:id="@+id/toggle_item"
|
android:id="@+id/toggle_item"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:focusable="false"/>
|
android:focusable="false"/>
|
||||||
|
|
||||||
</LinearLayout>
|
<View
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignLeft="@+id/text_wrapper"
|
||||||
|
android:layout_alignStart="@+id/text_wrapper"
|
||||||
|
android:background="?attr/divider_color"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
|
@ -861,8 +861,10 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
|
||||||
// listView.setBackgroundColor(backgroundColor);
|
// listView.setBackgroundColor(backgroundColor);
|
||||||
listEmptyTextView.setBackgroundColor(backgroundColor);
|
listEmptyTextView.setBackgroundColor(backgroundColor);
|
||||||
}
|
}
|
||||||
if (visibleType != DashboardType.WAYPOINTS && visibleType != DashboardType.MAP_MARKERS
|
if (visibleType != DashboardType.WAYPOINTS
|
||||||
&& visibleType != DashboardType.MAP_MARKERS_SELECTION) {
|
&& visibleType != DashboardType.MAP_MARKERS
|
||||||
|
&& visibleType != DashboardType.MAP_MARKERS_SELECTION
|
||||||
|
&& visibleType != DashboardType.CONFIGURE_SCREEN) {
|
||||||
listView.setDivider(dividerDrawable);
|
listView.setDivider(dividerDrawable);
|
||||||
listView.setDividerHeight(dpToPx(1f));
|
listView.setDividerHeight(dpToPx(1f));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue