Download bar enchantment.

This commit is contained in:
GaidamakUA 2015-09-23 16:12:41 +03:00
parent 6da35b7c94
commit 644938a016
13 changed files with 153 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!--<item android:id="@android:id/background">-->
<!--</item>-->
<item android:id="@android:id/secondaryProgress">
<clip>
<nine-patch android:src="@drawable/bg_download_bar_light_orange"/>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<nine-patch android:src="@drawable/bg_download_bar_light_grey"/>
</clip>
</item>
</layer-list>

View file

@ -8,34 +8,130 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:padding="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:padding="4dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Free Version"/>
android:text="@string/free_version_title"/>
<TextView
android:id="@+id/downloadsLeftTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="8 downloads left"/>
tools:text="@string/downloads_left_template"/>
</LinearLayout>
<TextView
android:id="@+id/freeVersionDescriptionTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
tools:text="@string/free_version_message"/>
<ProgressBar
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="8dp"
android:layout_margin="4dp">
<ProgressBar
style="@android:style/Widget.ProgressBar.Horizontal"
android:max="10"/>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:max="10"
android:progress="5"
android:progressDrawable="@drawable/number_of_downloads_progress_bar_drawable"
android:secondaryProgress="10"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/color_black"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
@ -59,15 +155,15 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dialog_content_bottom_margin"
android:layout_margin="4dp"
android:background="?attr/bg_card"
android:orientation="vertical"
android:paddingLeft="@dimen/dialog_content_bottom_margin"
android:paddingRight="@dimen/dialog_content_bottom_margin"
android:paddingTop="10dp">
android:padding="10dp">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="@dimen/local_size_height"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
@ -82,8 +178,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/free"
android:textStyle="bold"/>
tools:text="@string/free"/>
</LinearLayout>
<ProgressBar
@ -96,13 +191,16 @@
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="World regions"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:focusable="true"
android:groupIndicator="@android:color/transparent"/>
</LinearLayout>

View file

@ -0,0 +1,10 @@
<?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="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

View file

@ -3,20 +3,24 @@
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_height" >
android:layout_height="@dimen/list_item_height"
android:focusable="false"
android:focusableInTouchMode="false">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="@dimen/list_item_height"
android:layout_gravity="center_vertical"
android:drawablePadding="24dp"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:drawableLeft="@drawable/ic_action_search_dark"
tools:text="@string/layer_poi" />
tools:text="@string/layer_poi"/>
</LinearLayout>

View file

@ -2268,4 +2268,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="count_of_lines">Count of lines</string>
<string name="are_you_sure">Are you sure?</string>
<string name="unsaved_changes_will_be_lost">Any unsaved changes will be lost. Continue?</string>
<string name="downloads_left_template">%1$s downloads left</string>
</resources>