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"
|
<LinearLayout android:id="@+id/loading"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="@dimen/dashMapHeight"
|
android:layout_height="@dimen/dashMapHeight"
|
||||||
android:paddingTop="?attr/actionBarSize"
|
|
||||||
android:gravity="center_vertical|center_horizontal"
|
android:gravity="center_vertical|center_horizontal"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout 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:layout_marginTop="?attr/actionBarSize">
|
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/progressContainer"
|
<LinearLayout android:id="@+id/progressContainer"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|
|
@ -1,103 +1,108 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="?attr/actionBarSize">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
||||||
android:id="@+id/sliding_tabs"
|
android:id="@+id/sliding_tabs"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"/>
|
android:background="?attr/colorPrimary" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ProgressView"
|
android:id="@+id/ProgressView"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="3dp"
|
android:layout_marginLeft="3dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:gravity="center_vertical|left"
|
android:gravity="center_vertical|left"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/IndeterminateProgressBar"
|
android:id="@+id/IndeterminateProgressBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:indeterminateOnly="true"
|
android:indeterminateOnly="true"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/ProgressPercent"
|
android:id="@+id/ProgressPercent"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:gravity="right|center_vertical"
|
android:gravity="right|center_vertical"
|
||||||
android:text=""
|
android:maxLines="1"
|
||||||
android:textSize="14sp"/>
|
android:text=""
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:text="@string/lorem_ipsum" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/ProgressMessage"
|
android:id="@+id/ProgressMessage"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="3dp"
|
android:layout_marginLeft="3dp"
|
||||||
android:layout_toLeftOf="@id/ProgressPercent"
|
android:layout_toLeftOf="@id/ProgressPercent"
|
||||||
android:layout_toRightOf="@id/IndeterminateProgressBar"
|
android:layout_toRightOf="@id/IndeterminateProgressBar"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="14sp"/>
|
android:textSize="14sp"
|
||||||
</RelativeLayout>
|
tools:text="@string/lorem_ipsum" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/DeterminateProgressBar"
|
android:id="@+id/DeterminateProgressBar"
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/Cancel"
|
android:id="@+id/Cancel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/a_1_navigation_cancel_small_dark"/>
|
android:src="@drawable/a_1_navigation_cancel_small_dark" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<android.support.v4.view.ViewPager
|
<android.support.v4.view.ViewPager
|
||||||
android:id="@+id/pager"
|
android:id="@+id/pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/DownloadButton"
|
android:id="@+id/DownloadButton"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/downloadButtonBackground"
|
android:background="?attr/downloadButtonBackground"
|
||||||
android:textColor="?attr/pstsTextColor"
|
android:gravity="center"
|
||||||
android:gravity="center"
|
android:text="@string/download_files"
|
||||||
android:text="@string/download_files"
|
android:textColor="?attr/pstsTextColor"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="1dp"
|
android:paddingTop="1dp"
|
||||||
android:paddingBottom="1dp"
|
android:paddingBottom="1dp"
|
||||||
android:paddingRight="8dp">
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginTop="?attr/actionBarSize"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/expandable_category_color"
|
android:background="?attr/expandable_category_color"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:paddingLeft="4dp"
|
android:paddingLeft="@dimen/list_header_padding"
|
||||||
android:paddingRight="4dp"
|
android:paddingRight="@dimen/list_header_padding"
|
||||||
android:paddingTop="5dp">
|
android:paddingTop="5dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -13,7 +13,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingLeft="6dp"
|
|
||||||
android:src="@drawable/expandable_category_unpushed" />
|
android:src="@drawable/expandable_category_unpushed" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
android:paddingRight="4dp"
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:paddingTop="5dp">
|
android:paddingTop="5dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -18,11 +18,8 @@
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_marginRight="0dp"
|
|
||||||
android:layout_marginTop="0dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:groupIndicator="@android:color/transparent"
|
android:groupIndicator="@android:color/transparent"
|
||||||
style="@style/OsmandListView"></ExpandableListView>
|
style="@style/OsmandListView"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -3,10 +3,10 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
android:paddingBottom="4dp"
|
android:paddingBottom="4dp">
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:paddingLeft="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
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_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:layout_marginTop="?attr/actionBarSize">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/DescriptionText"
|
android:id="@+id/DescriptionText"
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
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="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="?attr/actionBarSize"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_marginTop="?attr/actionBarSize"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
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_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,15 @@
|
||||||
android:id="@+id/LinearLayout"
|
android:id="@+id/LinearLayout"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
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">
|
android:layout_marginTop="5dp">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/ProgressBar"
|
android:id="@+id/ProgressBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="invisible"></ProgressBar>
|
android:visibility="invisible"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/SearchText"
|
android:id="@+id/SearchText"
|
||||||
|
@ -23,14 +24,14 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:hint="@string/hint_search_online"
|
android:hint="@string/hint_search_online"
|
||||||
android:text=""></EditText>
|
android:text=""/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/SearchButton"
|
android:id="@+id/SearchButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minWidth="80dp"
|
android:minWidth="80dp"
|
||||||
android:text="@string/search_button"></Button>
|
android:text="@string/search_button"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
|
@ -38,6 +39,6 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
style="@style/OsmandListView"></ListView>
|
style="@style/OsmandListView"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -2,6 +2,8 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -9,7 +11,6 @@
|
||||||
style="@style/ListText.Small"
|
style="@style/ListText.Small"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:gravity="left" />
|
android:gravity="left" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginTop="?attr/actionBarSize"
|
|
||||||
android:orientation="vertical">
|
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"
|
<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"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -9,7 +11,6 @@
|
||||||
style="@style/ListText"
|
style="@style/ListText"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="3dp"
|
|
||||||
android:layout_marginRight="3dp"
|
android:layout_marginRight="3dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/RootLayout"
|
android:id="@+id/RootLayout"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/search_icon"
|
android:id="@+id/search_icon"
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:paddingLeft="2dp"
|
|
||||||
android:paddingRight="2dp"
|
|
||||||
android:paddingTop="2dp" />
|
android:paddingTop="2dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<!-- <TextView android:id="@+id/distance_label" android:layout_marginLeft="5dp"
|
<!-- <TextView android:id="@+id/distance_label" android:layout_marginLeft="5dp"
|
||||||
|
@ -21,7 +23,6 @@
|
||||||
android:background="?attr/reset_image"
|
android:background="?attr/reset_image"
|
||||||
android:contentDescription="@string/default_buttons_delete"
|
android:contentDescription="@string/default_buttons_delete"
|
||||||
android:paddingLeft="2dp"
|
android:paddingLeft="2dp"
|
||||||
android:paddingRight="2dp"
|
|
||||||
android:paddingTop="2dp" />
|
android:paddingTop="2dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -2,7 +2,6 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_marginTop="?attr/actionBarSize"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:paddingTop="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"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:layout_marginTop="?attr/actionBarSize">
|
|
||||||
|
|
||||||
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
<net.osmand.plus.views.controls.PagerSlidingTabStrip
|
||||||
android:id="@+id/sliding_tabs"
|
android:id="@+id/sliding_tabs"
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="1dp"
|
android:paddingTop="1dp"
|
||||||
android:paddingBottom="1dp"
|
android:paddingBottom="1dp"
|
||||||
android:paddingRight="8dp">
|
android:paddingLeft="@dimen/list_content_padding"
|
||||||
|
android:paddingRight="@dimen/list_content_padding">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/check_download_item"
|
android:id="@+id/check_download_item"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<attr name="ic_action_info2" format="reference" />
|
<attr name="ic_action_info2" format="reference" />
|
||||||
<attr name="ic_action_home2" format="reference" />
|
<attr name="ic_action_home2" format="reference" />
|
||||||
<attr name="ic_action_marker2" format="reference" />
|
<attr name="ic_action_marker2" format="reference" />
|
||||||
|
<attr name="search_background" format="reference" />
|
||||||
<attr name="ic_action_settings" format="reference" />
|
<attr name="ic_action_settings" format="reference" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
<color name="download_pressed_light">#8cff8f00</color>
|
<color name="download_pressed_light">#8cff8f00</color>
|
||||||
<color name="download_pressed_dark">#be39464d</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_descr_colol">#727272</color>
|
||||||
<color name="dashboard_background">#eaeaea</color>
|
<color name="dashboard_background">#eaeaea</color>
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
<dimen name="abp__shadow_height">4dp</dimen>
|
<dimen name="abp__shadow_height">4dp</dimen>
|
||||||
<dimen name="dashFABMargin">0dp</dimen>
|
<dimen name="dashFABMargin">0dp</dimen>
|
||||||
<dimen name="dash_parking_height">100dp</dimen>
|
<dimen name="dash_parking_height">100dp</dimen>
|
||||||
|
<dimen name="list_content_padding">16dp</dimen>
|
||||||
|
<dimen name="list_header_padding">8dp</dimen>
|
||||||
|
|
||||||
<!-- TextSizes -->
|
<!-- TextSizes -->
|
||||||
<dimen name="showAllButtonTextSize">12sp</dimen>
|
<dimen name="showAllButtonTextSize">12sp</dimen>
|
||||||
|
|
|
@ -107,12 +107,18 @@
|
||||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||||
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
|
<item name="android:listChoiceIndicatorMultiple">@drawable/check_dark</item>
|
||||||
</style>
|
</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">
|
<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="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="bottomToolBarColor">@color/tool_bar_color_light</item>
|
||||||
<item name="downloadButtonBackground">@drawable/download_light</item>
|
<item name="downloadButtonBackground">@drawable/download_light</item>
|
||||||
<item name="pstsTabBackground">@color/actionbar_light_color</item>
|
<item name="pstsTabBackground">@color/actionbar_light_color</item>
|
||||||
|
@ -121,14 +127,8 @@
|
||||||
<item name="pstsTextColor">@color/color_white</item>
|
<item name="pstsTextColor">@color/color_white</item>
|
||||||
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
|
||||||
<item name="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="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||||
<item name="actionModeCloseDrawable">@drawable/action_mode_back</item>
|
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</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="card_bg">@drawable/bg_card_light</item>
|
<item name="card_bg">@drawable/bg_card_light</item>
|
||||||
<item name="ic_action_check">@drawable/ic_action_check_light</item>
|
<item name="ic_action_check">@drawable/ic_action_check_light</item>
|
||||||
<item name="ic_extension">@drawable/ic_extension_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_info2">@drawable/ic_action_info2_light</item>
|
||||||
<item name="ic_action_home2">@drawable/ic_action_home2_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="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="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>
|
||||||
|
|
||||||
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
||||||
<item name="reset_image">@drawable/ic_action_delete_dark</item> <!-- @drawable/a_1_navigation_cancel_dark -->
|
<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="expandable_category_color">?android:attr/colorBackground</item>
|
||||||
<item name="windowActionBarOverlay">true</item>
|
|
||||||
<item name="bottomToolBarColor">@color/tool_bar_color_dark</item>
|
<item name="bottomToolBarColor">@color/tool_bar_color_dark</item>
|
||||||
<item name="downloadButtonBackground">@drawable/download_dark</item>
|
<item name="downloadButtonBackground">@drawable/download_dark</item>
|
||||||
<item name="pstsTabBackground">@color/actionbar_dark_color</item>
|
<item name="pstsTabBackground">@color/actionbar_dark_color</item>
|
||||||
|
@ -157,8 +163,8 @@
|
||||||
<item name="pstsTextColor">@color/color_white</item>
|
<item name="pstsTextColor">@color/color_white</item>
|
||||||
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
||||||
<item name="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="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="card_bg">@drawable/bg_card_dark</item>
|
||||||
<item name="ic_action_check">@drawable/ic_action_check_dark</item>
|
<item name="ic_action_check">@drawable/ic_action_check_dark</item>
|
||||||
<item name="ic_extension">@drawable/ic_extension_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_info2">@drawable/ic_action_info2_dark</item>
|
||||||
<item name="ic_action_home2">@drawable/ic_action_home2_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="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>
|
<item name="ic_action_settings">@drawable/ic_action_settings_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import net.osmand.access.AccessibleAlertBuilder;
|
||||||
import net.osmand.access.AccessibleToast;
|
import net.osmand.access.AccessibleToast;
|
||||||
import net.osmand.plus.access.AccessibilityMode;
|
import net.osmand.plus.access.AccessibilityMode;
|
||||||
import net.osmand.plus.activities.DayNightHelper;
|
import net.osmand.plus.activities.DayNightHelper;
|
||||||
|
import net.osmand.plus.activities.MainMenuActivity;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SavingTrackHelper;
|
import net.osmand.plus.activities.SavingTrackHelper;
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
import net.osmand.plus.activities.SettingsActivity;
|
||||||
|
@ -795,10 +796,11 @@ public class OsmandApplication extends Application {
|
||||||
|
|
||||||
public void applyTheme(Context c) {
|
public void applyTheme(Context c) {
|
||||||
int t = R.style.OsmandLightDarkActionBarTheme;
|
int t = R.style.OsmandLightDarkActionBarTheme;
|
||||||
|
boolean mainmenu = c instanceof MainMenuActivity;
|
||||||
if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_DARK_THEME) {
|
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) {
|
} 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) {
|
} else if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_DARK_ACTIONBAR_THEME) {
|
||||||
t = R.style.OsmandLightDarkActionBarTheme;
|
t = R.style.OsmandLightDarkActionBarTheme;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,11 +46,8 @@ public class FavoritesActivity extends TabActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
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);
|
((OsmandApplication) getApplication()).applyTheme(this);
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
setSupportProgressBarIndeterminateVisibility(false);
|
|
||||||
getSupportActionBar().setTitle(R.string.favorites_Button);
|
getSupportActionBar().setTitle(R.string.favorites_Button);
|
||||||
getSupportActionBar().setElevation(0);
|
getSupportActionBar().setElevation(0);
|
||||||
|
|
||||||
|
@ -165,121 +162,5 @@ public class FavoritesActivity extends TabActivity {
|
||||||
}
|
}
|
||||||
return false;
|
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 android.view.MenuItem;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +13,7 @@ public class FavoritesListActivity extends OsmandActionBarActivity {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
((OsmandApplication) getApplication()).applyTheme(this);
|
((OsmandApplication) getApplication()).applyTheme(this);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.single_fragment_layout);
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
// During initial setup, plug in the details fragment.
|
// During initial setup, plug in the details fragment.
|
||||||
FavoritesListFragment details = new FavoritesListFragment();
|
FavoritesListFragment details = new FavoritesListFragment();
|
||||||
|
|
|
@ -81,7 +81,6 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
private Set<FavoriteGroup> groupsToDelete = new LinkedHashSet<FavoriteGroup>();
|
private Set<FavoriteGroup> groupsToDelete = new LinkedHashSet<FavoriteGroup>();
|
||||||
private ActionMode actionMode;
|
private ActionMode actionMode;
|
||||||
private SearchView searchView;
|
private SearchView searchView;
|
||||||
protected boolean hideActionBar;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttach(Activity activity) {
|
public void onAttach(Activity activity) {
|
||||||
|
@ -563,7 +562,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
showProgressBar();
|
showProgressBar();
|
||||||
};
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(String warning) {
|
protected void onPostExecute(String warning) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class HelpActivity extends OsmandActionBarActivity {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
createMenuItem(menu, HOME, R.string.home,
|
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 );
|
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
||||||
createMenuItem(menu, BACK, R.string.previous_button,
|
createMenuItem(menu, BACK, R.string.previous_button,
|
||||||
0, 0, //R.drawable.ic_action_home_light, R.drawable.ic_action_home_dark,
|
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,
|
0, 0, //R.drawable.ic_action_home_light, R.drawable.ic_action_home_dark,
|
||||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
||||||
createMenuItem(menu, CLOSE, R.string.close,
|
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 );
|
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM );
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,6 +328,7 @@ public class MapActivityLayers {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
return builder.show();
|
return builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ import android.view.MenuItem;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.OsmandActionBarActivity;
|
import net.osmand.plus.activities.OsmandActionBarActivity;
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,10 +15,8 @@ public class SearchAddressActivity extends OsmandActionBarActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
((OsmandApplication) getApplication()).applyTheme(this);
|
((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);
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.single_fragment_layout);
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
// During initial setup, plug in the details fragment.
|
// During initial setup, plug in the details fragment.
|
||||||
SearchAddressFragment details = new SearchAddressFragment();
|
SearchAddressFragment details = new SearchAddressFragment();
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class SearchAddressFragment extends Fragment {
|
||||||
if(getActivity() instanceof SearchAddressActivity) {
|
if(getActivity() instanceof SearchAddressActivity) {
|
||||||
MenuItem menuItem = menu.add(0, SELECT_POINT, 0, "");
|
MenuItem menuItem = menu.add(0, SELECT_POINT, 0, "");
|
||||||
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
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() {
|
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
|
|
|
@ -22,9 +22,12 @@ import android.support.v4.app.FragmentActivity;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
import android.widget.AbsListView;
|
||||||
|
import android.widget.ActionMenuView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.TextView.BufferType;
|
import android.widget.TextView.BufferType;
|
||||||
|
@ -39,10 +42,21 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
|
||||||
private HistoryAdapter historyAdapter;
|
private HistoryAdapter historyAdapter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, 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
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -53,17 +67,6 @@ public class SearchHistoryFragment extends ListFragment implements SearchActivit
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
historyAdapter = new HistoryAdapter(helper.getHistoryEntries());
|
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);
|
setListAdapter(historyAdapter);
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ExpandableListView;
|
import android.widget.ExpandableListView;
|
||||||
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
|
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
@ -1003,6 +1004,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
||||||
v.findViewById(R.id.explist_indicator).setVisibility(View.GONE);
|
v.findViewById(R.id.explist_indicator).setVisibility(View.GONE);
|
||||||
|
|
||||||
TextView nameView = ((TextView) v.findViewById(R.id.category_name));
|
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);
|
List<LocalIndexInfo> list = data.get(group);
|
||||||
int size = 0;
|
int size = 0;
|
||||||
for (LocalIndexInfo aList : list) {
|
for (LocalIndexInfo aList : list) {
|
||||||
|
|
|
@ -192,7 +192,9 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
|
||||||
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.BOLD);
|
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.BOLD);
|
||||||
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, HALF_TRANSP);
|
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, HALF_TRANSP);
|
||||||
tabTextSelectedAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextSelectedAlpha, OPAQUE);
|
tabTextSelectedAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextSelectedAlpha, OPAQUE);
|
||||||
tabTypeface = FontCache.getRobotoMedium(context);
|
if (!isInEditMode()) {
|
||||||
|
tabTypeface = FontCache.getRobotoMedium(context);
|
||||||
|
}
|
||||||
a.recycle();
|
a.recycle();
|
||||||
|
|
||||||
setMarginBottomTabContainer();
|
setMarginBottomTabContainer();
|
||||||
|
|
Loading…
Reference in a new issue