Fixed layout for configure screen item.

This commit is contained in:
GaidamakUA 2016-04-04 12:52:49 +03:00
parent 318c9e1bf4
commit c9540d7af8
4 changed files with 102 additions and 73 deletions

View file

@ -1,47 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dashboard"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone" >
<FrameLayout android:id="@+id/dashboard"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone">
<include
android:id="@+id/init_progress"
layout="@layout/application_loading"
android:visibility="gone" />
android:visibility="gone"/>
<LinearLayout
android:id="@+id/animateContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
android:orientation="horizontal">
<LinearLayout
android:layout_width="@dimen/dashboard_land_width"
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"/>
<com.github.ksoichiro.android.observablescrollview.ObservableScrollView
android:id="@+id/main_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fadeScrollbars="true" >
android:fadeScrollbars="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:orientation="vertical">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
android:orientation="vertical"/>
</LinearLayout>
</com.github.ksoichiro.android.observablescrollview.ObservableScrollView>
@ -50,25 +50,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:visibility="gone" >
android:visibility="gone">
<net.osmand.plus.views.controls.DynamicListView
android:id="@+id/dash_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/bg_color"
android:fadeScrollbars="true" >
</net.osmand.plus.views.controls.DynamicListView>
android:divider="@null"
android:fadeScrollbars="true"/>
<TextView
android:id="@+id/emptyTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="?attr/bg_color"
android:clickable="true"
android:gravity="center"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true"
android:textSize="@dimen/default_list_text_size_large"
android:visibility="gone"/>
@ -78,7 +78,7 @@
<FrameLayout
android:id="@+id/map_part_dashboard"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
android:layout_height="fill_parent">
<Button
android:id="@+id/map_download_button"
@ -86,7 +86,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/shared_string_download"
android:visibility="gone" />
android:visibility="gone"/>
</FrameLayout>
</LinearLayout>

View file

@ -1,36 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
android:id="@+id/dashboard"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone" >
android:visibility="gone">
<include
android:id="@+id/init_progress"
layout="@layout/application_loading"
android:visibility="gone" />
android:visibility="gone"/>
<FrameLayout
android:id="@+id/animateContent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent">
<com.github.ksoichiro.android.observablescrollview.ObservableScrollView
android:id="@+id/main_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadeScrollbars="true" >
android:fadeScrollbars="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:orientation="vertical">
<FrameLayout
android:id="@+id/map_part_dashboard"
android:layout_width="fill_parent"
android:layout_height="@dimen/dashboard_map_top_padding" >
android:layout_height="@dimen/dashboard_map_top_padding">
<Button
android:id="@+id/map_download_button"
@ -38,14 +39,14 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/shared_string_download"
android:visibility="gone" />
android:visibility="gone"/>
</FrameLayout>
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
android:orientation="vertical"/>
</LinearLayout>
</com.github.ksoichiro.android.observablescrollview.ObservableScrollView>
@ -53,7 +54,7 @@
android:id="@+id/dash_list_view_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" >
android:visibility="gone">
<LinearLayout
android:id="@+id/dash_list_background"
@ -68,9 +69,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:gravity="center"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center"
android:textSize="@dimen/default_list_text_size_large"
android:visibility="gone"/>
@ -80,8 +81,8 @@
android:id="@+id/dash_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadeScrollbars="true" >
</net.osmand.plus.views.controls.DynamicListView>
android:divider="@null"
android:fadeScrollbars="true"/>
</FrameLayout>
<include layout="@layout/dashboard_toolbar"/>

View file

@ -1,67 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<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:background="?attr/bg_color"
android:minHeight="60dp"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<RelativeLayout
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/bg_color"
android:minHeight="60dp"
tools:layout_height="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_marginBottom="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
tools:src="@drawable/ic_action_gabout_dark"/>
<FrameLayout
<LinearLayout
android:id="@+id/text_wrapper"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
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">
<LinearLayout
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
android:textSize="@dimen/default_list_text_size"
tools:text="Some title text"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/default_list_text_size"
tools:text="Some title text"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/default_desc_text_size"
tools:text="Some title text"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/default_desc_text_size"
tools:text="Some title text"/>
</LinearLayout>
</FrameLayout>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
<android.support.v7.widget.AppCompatImageView
android:id="@+id/secondary_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_margin="16dp"
android:layout_toLeftOf="@+id/toggle_item"
android:layout_toStartOf="@+id/toggle_item"
tools:src="@drawable/ic_action_gabout_dark"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/toggle_item"
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: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>

View file

@ -861,8 +861,10 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
// listView.setBackgroundColor(backgroundColor);
listEmptyTextView.setBackgroundColor(backgroundColor);
}
if (visibleType != DashboardType.WAYPOINTS && visibleType != DashboardType.MAP_MARKERS
&& visibleType != DashboardType.MAP_MARKERS_SELECTION) {
if (visibleType != DashboardType.WAYPOINTS
&& visibleType != DashboardType.MAP_MARKERS
&& visibleType != DashboardType.MAP_MARKERS_SELECTION
&& visibleType != DashboardType.CONFIGURE_SCREEN) {
listView.setDivider(dividerDrawable);
listView.setDividerHeight(dpToPx(1f));
} else {