Merge pull request #1062 from Bars107/master
Fixes and updates to styles.
This commit is contained in:
commit
48704b78f2
42 changed files with 219 additions and 281 deletions
|
@ -9,7 +9,6 @@
|
|||
<LinearLayout android:id="@+id/loading"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/dashMapHeight"
|
||||
android:paddingTop="?attr/actionBarSize"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout android:id="@+id/progressContainer"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -1,103 +1,108 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
||||
android:id="@+id/sliding_tabs"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"/>
|
||||
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
||||
android:id="@+id/sliding_tabs"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ProgressView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<LinearLayout
|
||||
android:id="@+id/ProgressView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center_vertical|left"
|
||||
android:orientation="horizontal">
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center_vertical|left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/IndeterminateProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateOnly="true"
|
||||
android:visibility="gone"/>
|
||||
<ProgressBar
|
||||
android:id="@+id/IndeterminateProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateOnly="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ProgressPercent"
|
||||
android:layout_width="48dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="right|center_vertical"
|
||||
android:text=""
|
||||
android:textSize="14sp"/>
|
||||
<TextView
|
||||
android:id="@+id/ProgressPercent"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="right|center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text=""
|
||||
android:textSize="14sp"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ProgressMessage"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_toLeftOf="@id/ProgressPercent"
|
||||
android:layout_toRightOf="@id/IndeterminateProgressBar"
|
||||
android:ellipsize="end"
|
||||
android:gravity="left|center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textSize="14sp"/>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/ProgressMessage"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_toLeftOf="@id/ProgressPercent"
|
||||
android:layout_toRightOf="@id/IndeterminateProgressBar"
|
||||
android:ellipsize="end"
|
||||
android:gravity="left|center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textSize="14sp"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/DeterminateProgressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
<ProgressBar
|
||||
android:id="@+id/DeterminateProgressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/a_1_navigation_cancel_small_dark"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/Cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/a_1_navigation_cancel_small_dark" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/DownloadButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/downloadButtonBackground"
|
||||
android:textColor="?attr/pstsTextColor"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_files"
|
||||
android:visibility="gone"/>
|
||||
<Button
|
||||
android:id="@+id/DownloadButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/downloadButtonBackground"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_files"
|
||||
android:textColor="?attr/pstsTextColor"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:paddingRight="8dp">
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:paddingLeft="@dimen/list_content_padding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="?attr/expandable_category_color"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingLeft="@dimen/list_header_padding"
|
||||
android:paddingRight="@dimen/list_header_padding"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -13,7 +13,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingLeft="6dp"
|
||||
android:src="@drawable/expandable_category_unpushed" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_weight="1"
|
||||
android:groupIndicator="@android:color/transparent"
|
||||
style="@style/OsmandListView"></ExpandableListView>
|
||||
style="@style/OsmandListView"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -3,10 +3,10 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingLeft="12dp">
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="?attr/actionBarSize">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/DescriptionText"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
android:id="@+id/LinearLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/ProgressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"></ProgressBar>
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/SearchText"
|
||||
|
@ -23,14 +24,14 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/hint_search_online"
|
||||
android:text=""></EditText>
|
||||
android:text=""/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/SearchButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="80dp"
|
||||
android:text="@string/search_button"></Button>
|
||||
android:text="@string/search_button"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
|
@ -38,6 +39,6 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
style="@style/OsmandListView"></ListView>
|
||||
style="@style/OsmandListView"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -2,6 +2,8 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
@ -9,7 +11,6 @@
|
|||
style="@style/ListText.Small"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="left" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical">
|
||||
<!--
|
||||
<LinearLayout android:id="@+id/LinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginTop="3dp" android:layout_marginRight="5dp"
|
||||
|
|
20
OsmAnd/res/layout/search_history.xml
Normal file
20
OsmAnd/res/layout/search_history.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/OsmandListView"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/clearAll"
|
||||
android:layout_marginLeft="@dimen/list_content_padding"
|
||||
android:layout_marginRight="@dimen/list_content_padding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -2,6 +2,8 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
@ -9,7 +11,6 @@
|
|||
style="@style/ListText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
android:id="@+id/RootLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_icon"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingTop="2dp" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- <TextView android:id="@+id/distance_label" android:layout_marginLeft="5dp"
|
||||
|
@ -21,7 +23,6 @@
|
|||
android:background="?attr/reset_image"
|
||||
android:contentDescription="@string/default_buttons_delete"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -2,7 +2,6 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp">
|
||||
|
||||
|
|
8
OsmAnd/res/layout/single_fragment_layout.xml
Normal file
8
OsmAnd/res/layout/single_fragment_layout.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:id="@android:id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
|
@ -2,8 +2,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="?attr/actionBarSize">
|
||||
android:orientation="vertical">
|
||||
|
||||
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
||||
android:id="@+id/sliding_tabs"
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:paddingRight="8dp">
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_download_item"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<attr name="ic_action_info2" format="reference" />
|
||||
<attr name="ic_action_home2" format="reference" />
|
||||
<attr name="ic_action_marker2" format="reference" />
|
||||
<attr name="search_background" format="reference" />
|
||||
<attr name="ic_action_settings" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
<color name="download_pressed_light">#8cff8f00</color>
|
||||
<color name="download_pressed_dark">#be39464d</color>
|
||||
|
||||
<color name="search_background_dark">#292f33</color>
|
||||
|
||||
|
||||
<color name="dashboard_descr_colol">#727272</color>
|
||||
<color name="dashboard_background">#eaeaea</color>
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
<dimen name="abp__shadow_height">4dp</dimen>
|
||||
<dimen name="dashFABMargin">0dp</dimen>
|
||||
<dimen name="dash_parking_height">100dp</dimen>
|
||||
<dimen name="list_content_padding">16dp</dimen>
|
||||
<dimen name="list_header_padding">8dp</dimen>
|
||||
|
||||
<!-- TextSizes -->
|
||||
<dimen name="showAllButtonTextSize">12sp</dimen>
|
||||
|
|
|
@ -107,12 +107,18 @@
|
|||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardLightTheme" parent="OsmandLightTheme">
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardDarkTheme" parent="OsmandDarkTheme">
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="OsmandLightTheme" parent="Theme.AppCompat.Light">
|
||||
<item name="expandable_category_color">@color/group_background</item>
|
||||
<!--<item name="android:actionDropDownStyle">@style/Widget.LightSpinner</item>-->
|
||||
<!--<item name="actionDropDownStyle">@style/Widget.LightSpinner</item>-->
|
||||
<item name="reset_image">@drawable/ic_action_delete_light</item> <!-- @drawable/a_1_navigation_cancel_light -->
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="expandable_category_color">?android:attr/colorBackground</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_color_light</item>
|
||||
<item name="downloadButtonBackground">@drawable/download_light</item>
|
||||
<item name="pstsTabBackground">@color/actionbar_light_color</item>
|
||||
|
@ -121,14 +127,8 @@
|
|||
<item name="pstsTextColor">@color/color_white</item>
|
||||
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
||||
<item name="actionModeBackground">@color/actionbar_light_color</item>
|
||||
<item name="android:actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="android:actionModeStyle">@style/WhiteActionMode</item>
|
||||
<item name="actionModeStyle">@style/WhiteActionMode</item>
|
||||
<item name="android:actionMenuTextColor">@color/color_white</item>
|
||||
<item name="actionMenuTextColor">@color/color_white</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||
<item name="card_bg">@drawable/bg_card_light</item>
|
||||
<item name="ic_action_check">@drawable/ic_action_check_light</item>
|
||||
<item name="ic_extension">@drawable/ic_extension_light</item>
|
||||
|
@ -142,13 +142,19 @@
|
|||
<item name="ic_action_info2">@drawable/ic_action_info2_light</item>
|
||||
<item name="ic_action_home2">@drawable/ic_action_home2_light</item>
|
||||
<item name="ic_action_marker2">@drawable/ic_action_marker2_light</item>
|
||||
<item name="search_background">@color/search_background_dark</item>
|
||||
<item name="ic_action_settings">@drawable/ic_action_settings_light</item>
|
||||
<item name="android:actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/action_mode_back</item>
|
||||
<item name="android:actionModeStyle">@style/WhiteActionMode</item>
|
||||
<item name="actionModeStyle">@style/WhiteActionMode</item>
|
||||
<item name="android:actionMenuTextColor">@color/color_white</item>
|
||||
<item name="actionMenuTextColor">@color/color_white</item>
|
||||
</style>
|
||||
|
||||
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
||||
<item name="reset_image">@drawable/ic_action_delete_dark</item> <!-- @drawable/a_1_navigation_cancel_dark -->
|
||||
<item name="expandable_category_color">?android:attr/colorBackground</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="bottomToolBarColor">@color/tool_bar_color_dark</item>
|
||||
<item name="downloadButtonBackground">@drawable/download_dark</item>
|
||||
<item name="pstsTabBackground">@color/actionbar_dark_color</item>
|
||||
|
@ -157,8 +163,8 @@
|
|||
<item name="pstsTextColor">@color/color_white</item>
|
||||
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
||||
<item name="actionModeBackground">@color/actionbar_dark_color</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||
<item name="card_bg">@drawable/bg_card_dark</item>
|
||||
<item name="ic_action_check">@drawable/ic_action_check_dark</item>
|
||||
<item name="ic_extension">@drawable/ic_extension_dark</item>
|
||||
|
@ -172,6 +178,7 @@
|
|||
<item name="ic_action_info2">@drawable/ic_action_info2_dark</item>
|
||||
<item name="ic_action_home2">@drawable/ic_action_home2_dark</item>
|
||||
<item name="ic_action_marker2">@drawable/ic_action_marker2_dark</item>
|
||||
<item name="search_background">@color/color_white</item>
|
||||
<item name="ic_action_settings">@drawable/ic_action_settings_dark</item>
|
||||
</style>
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.osmand.access.AccessibleAlertBuilder;
|
|||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.plus.access.AccessibilityMode;
|
||||
import net.osmand.plus.activities.DayNightHelper;
|
||||
import net.osmand.plus.activities.MainMenuActivity;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SavingTrackHelper;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
|
@ -795,10 +796,11 @@ public class OsmandApplication extends Application {
|
|||
|
||||
public void applyTheme(Context c) {
|
||||
int t = R.style.OsmandLightDarkActionBarTheme;
|
||||
boolean mainmenu = c instanceof MainMenuActivity;
|
||||
if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
||||
t = R.style.OsmandDarkTheme;
|
||||
t = mainmenu ? R.style.DashboardDarkTheme : R.style.OsmandDarkTheme;
|
||||
} else if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_THEME) {
|
||||
t = R.style.OsmandLightTheme;
|
||||
t = mainmenu ? R.style.DashboardLightTheme : R.style.OsmandLightTheme;
|
||||
} else if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_DARK_ACTIONBAR_THEME) {
|
||||
t = R.style.OsmandLightDarkActionBarTheme;
|
||||
}
|
||||
|
|
|
@ -46,11 +46,8 @@ public class FavoritesActivity extends TabActivity {
|
|||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
//This has to be called before setContentView and you must use the
|
||||
//class in com.actionbarsherlock.view and NOT android.view
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
super.onCreate(icicle);
|
||||
setSupportProgressBarIndeterminateVisibility(false);
|
||||
getSupportActionBar().setTitle(R.string.favorites_Button);
|
||||
getSupportActionBar().setElevation(0);
|
||||
|
||||
|
@ -165,121 +162,5 @@ public class FavoritesActivity extends TabActivity {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a helper class that implements the management of tabs and all
|
||||
* details of connecting a ViewPager with associated TabHost. It relies on a
|
||||
* trick. Normally a tab host has a simple API for supplying a View or
|
||||
* Intent that each tab will show. This is not sufficient for switching
|
||||
* between pages. So instead we make the content part of the tab host
|
||||
* 0dp high (it is not shown) and the TabsAdapter supplies its own dummy
|
||||
* view to show as the tab content. It listens to changes in tabs, and takes
|
||||
* care of switch to the correct paged in the ViewPager whenever the selected
|
||||
* tab changes.
|
||||
*/
|
||||
public static class TabsAdapter extends FragmentPagerAdapter
|
||||
implements TabHost.OnTabChangeListener, ViewPager.OnPageChangeListener {
|
||||
private final Context mContext;
|
||||
private final TabHost mTabHost;
|
||||
private final ViewPager mViewPager;
|
||||
private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>();
|
||||
private OsmandSettings osmSettings;
|
||||
private boolean favorites;
|
||||
|
||||
static final class TabInfo {
|
||||
private final String tag;
|
||||
private Class<?> clss;
|
||||
private Bundle args;
|
||||
|
||||
TabInfo(String _tag, Class<?> _class, Bundle _args) {
|
||||
tag = _tag;
|
||||
clss = _class;
|
||||
args = _args;
|
||||
}
|
||||
}
|
||||
|
||||
static class DummyTabFactory implements TabHost.TabContentFactory {
|
||||
private final Context mContext;
|
||||
|
||||
public DummyTabFactory(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createTabContent(String tag) {
|
||||
View v = new View(mContext);
|
||||
v.setMinimumWidth(0);
|
||||
v.setMinimumHeight(0);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public TabsAdapter(FragmentActivity activity, TabHost tabHost,ViewPager pager, OsmandSettings settings, boolean favorites) {
|
||||
super(activity.getSupportFragmentManager());
|
||||
this.favorites = favorites;
|
||||
mContext = activity;
|
||||
mTabHost = tabHost;
|
||||
mViewPager = pager;
|
||||
osmSettings = settings;
|
||||
mTabHost.setOnTabChangedListener(this);
|
||||
mViewPager.setAdapter(this);
|
||||
mViewPager.setOnPageChangeListener(this);
|
||||
}
|
||||
|
||||
public TabSpec addTab(TabHost.TabSpec tabSpec, Class<?> clss, Bundle args) {
|
||||
tabSpec.setContent(new DummyTabFactory(mContext));
|
||||
String tag = tabSpec.getTag();
|
||||
|
||||
TabInfo info = new TabInfo(tag, clss, args);
|
||||
mTabs.add(info);
|
||||
mTabHost.addTab(tabSpec);
|
||||
notifyDataSetChanged();
|
||||
return tabSpec;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mTabs.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
TabInfo info = mTabs.get(position);
|
||||
return Fragment.instantiate(mContext, info.clss.getName(), info.args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabChanged(String tabId) {
|
||||
int position = mTabHost.getCurrentTab();
|
||||
if (favorites){
|
||||
osmSettings.FAVORITES_TAB.set(position);
|
||||
}
|
||||
mViewPager.setCurrentItem(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
// Unfortunately when TabHost changes the current tab, it kindly
|
||||
// also takes care of putting focus on it when not in touch mode.
|
||||
// The jerk.
|
||||
// This hack tries to prevent this from pulling focus out of our
|
||||
// ViewPager.
|
||||
TabWidget widget = mTabHost.getTabWidget();
|
||||
int oldFocusability = widget.getDescendantFocusability();
|
||||
widget.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
|
||||
mTabHost.setCurrentTab(position);
|
||||
widget.setDescendantFocusability(oldFocusability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ package net.osmand.plus.activities;
|
|||
|
||||
import android.view.MenuItem;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
|
||||
|
@ -11,6 +13,7 @@ public class FavoritesListActivity extends OsmandActionBarActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.single_fragment_layout);
|
||||
if (savedInstanceState == null) {
|
||||
// During initial setup, plug in the details fragment.
|
||||
FavoritesListFragment details = new FavoritesListFragment();
|
||||
|
|
|
@ -81,7 +81,6 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
private Set<FavoriteGroup> groupsToDelete = new LinkedHashSet<FavoriteGroup>();
|
||||
private ActionMode actionMode;
|
||||
private SearchView searchView;
|
||||
protected boolean hideActionBar;
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
|
@ -563,7 +562,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
@Override
|
||||
protected void onPreExecute() {
|
||||
showProgressBar();
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String warning) {
|
||||
|
|
|
@ -102,7 +102,7 @@ public class HelpActivity extends OsmandActionBarActivity {
|
|||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
createMenuItem(menu, HOME, R.string.home,
|
||||
R.drawable.ic_action_home_light, R.drawable.ic_action_home_dark,
|
||||
R.drawable.ic_action_home_dark, R.drawable.ic_action_home_dark,
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
||||
createMenuItem(menu, BACK, R.string.previous_button,
|
||||
0, 0, //R.drawable.ic_action_home_light, R.drawable.ic_action_home_dark,
|
||||
|
@ -111,7 +111,7 @@ public class HelpActivity extends OsmandActionBarActivity {
|
|||
0, 0, //R.drawable.ic_action_home_light, R.drawable.ic_action_home_dark,
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
||||
createMenuItem(menu, CLOSE, R.string.close,
|
||||
R.drawable.ic_action_ok_light, R.drawable.ic_action_ok_dark,
|
||||
R.drawable.ic_action_ok_dark, R.drawable.ic_action_ok_dark,
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
|
|
@ -328,6 +328,7 @@ public class MapActivityLayers {
|
|||
}
|
||||
|
||||
});
|
||||
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||
return builder.show();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ import android.view.MenuItem;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.OsmandActionBarActivity;
|
||||
|
||||
|
||||
|
@ -13,10 +15,8 @@ public class SearchAddressActivity extends OsmandActionBarActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.single_fragment_layout);
|
||||
if (savedInstanceState == null) {
|
||||
// During initial setup, plug in the details fragment.
|
||||
SearchAddressFragment details = new SearchAddressFragment();
|
||||
|
|
|
@ -97,7 +97,7 @@ public class SearchAddressFragment extends Fragment {
|
|||
if(getActivity() instanceof SearchAddressActivity) {
|
||||
MenuItem menuItem = menu.add(0, SELECT_POINT, 0, "");
|
||||
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_ok_light : R.drawable.ic_action_ok_dark);
|
||||
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_ok_dark : R.drawable.ic_action_ok_dark);
|
||||
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
|
|
|
@ -22,9 +22,12 @@ import android.support.v4.app.FragmentActivity;
|
|||
import android.text.Spannable;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.ActionMenuView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TextView.BufferType;
|
||||
|
@ -39,10 +42,21 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
|
|||
private HistoryAdapter historyAdapter;
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.search_history, container, false);
|
||||
clearButton = (Button) view.findViewById(R.id.clearAll);
|
||||
clearButton.setText(R.string.clear_all);
|
||||
clearButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
helper.removeAll();
|
||||
historyAdapter.clear();
|
||||
clearButton.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -53,17 +67,6 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
|
|||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
historyAdapter = new HistoryAdapter(helper.getHistoryEntries());
|
||||
clearButton = new Button(getActivity());
|
||||
clearButton.setText(R.string.clear_all);
|
||||
clearButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
helper.removeAll();
|
||||
historyAdapter.clear();
|
||||
clearButton.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
getListView().addFooterView(clearButton);
|
||||
setListAdapter(historyAdapter);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ import android.widget.CheckBox;
|
|||
import android.widget.EditText;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -1003,6 +1004,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
v.findViewById(R.id.explist_indicator).setVisibility(View.GONE);
|
||||
|
||||
TextView nameView = ((TextView) v.findViewById(R.id.category_name));
|
||||
nameView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
List<LocalIndexInfo> list = data.get(group);
|
||||
int size = 0;
|
||||
for (LocalIndexInfo aList : list) {
|
||||
|
|
|
@ -192,7 +192,9 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
|
|||
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.BOLD);
|
||||
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, HALF_TRANSP);
|
||||
tabTextSelectedAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextSelectedAlpha, OPAQUE);
|
||||
tabTypeface = FontCache.getRobotoMedium(context);
|
||||
if (!isInEditMode()) {
|
||||
tabTypeface = FontCache.getRobotoMedium(context);
|
||||
}
|
||||
a.recycle();
|
||||
|
||||
setMarginBottomTabContainer();
|
||||
|
|
Loading…
Reference in a new issue