Initial DownloadActivity import
I wish all new activities were this easy... Needs significant refactoring/testing attention, coming shortly.
BIN
app/src/main/res/drawable-hdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 438 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 702 B |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 328 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 900 B |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 567 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 650 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 5.4 KiB |
@ -1,31 +1,38 @@
|
||||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".DownloadActivity">
|
||||
tools:context="org.bspeice.minimalbible.activities.downloader.DownloadActivity" >
|
||||
|
||||
<!--
|
||||
As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions.
|
||||
-->
|
||||
|
||||
<!-- As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions. -->
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- android:layout_gravity="start" tells DrawerLayout to treat
|
||||
<!--
|
||||
android:layout_gravity="start" tells DrawerLayout to treat
|
||||
this as a sliding drawer on the left side for left-to-right
|
||||
languages and on the right side for right-to-left languages.
|
||||
If you're not building against API 17 or higher, use
|
||||
android:layout_gravity="left" instead. -->
|
||||
<!-- The drawer is given a fixed width in dp and extends the full height of
|
||||
the container. -->
|
||||
<fragment android:id="@+id/navigation_drawer"
|
||||
android:layout_gravity="left" instead.
|
||||
-->
|
||||
<!--
|
||||
The drawer is given a fixed width in dp and extends the full height of
|
||||
the container.
|
||||
-->
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_drawer"
|
||||
android:name="org.bspeice.minimalbible.activity.downloader.DownloadNavDrawerFragment"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:name="org.bspeice.minimalbible.NavigationDrawerFragment"
|
||||
tools:layout="@layout/fragment_navigation_drawer" />
|
||||
android:layout_gravity="start" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
@ -2,15 +2,14 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context=".DownloadActivity$PlaceholderFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
tools:context="org.bspeice.minimalbible.DownloadActivity$PlaceholderFragment" >
|
||||
|
||||
<ListView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/lst_download_available"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:clipToPadding="false" />
|
||||
</RelativeLayout>
|
||||
|
@ -1,9 +1,11 @@
|
||||
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/list_nav_drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#cccccc"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"
|
||||
android:background="#cccc"
|
||||
tools:context=".NavigationDrawerFragment" />
|
||||
tools:context="org.bspeice.minimalbible.activities.BaseNavigationDrawerFragment" />
|
||||
|
||||
|
45
app/src/main/res/layout/list_download_items.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/txt_download_item_name"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toLeftOf="@+id/download_ibtn_download"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/download_txt_item_acronym"
|
||||
android:paddingTop="4dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/txt_download_item_name"/>
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_action_download"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:id="@+id/download_ibtn_download"
|
||||
style="@style/AppBaseTheme.Borderless"/>
|
||||
|
||||
<com.todddavies.components.progressbar.ProgressWheel
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/download_prg_download"
|
||||
app:rimWidth="0dp"
|
||||
app:barWidth="4dp" />
|
||||
|
||||
</RelativeLayout>
|
20
app/src/main/res/values-v19/styles.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 19+. This theme completely replaces
|
||||
AppBaseTheme from BOTH res/values/styles.xml and
|
||||
res/values-v11/styles.xml on API 19+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
|
||||
|
||||
<!-- API 19 theme customizations can go here. -->
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:actionBarStyle">@style/ActionBar</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionBar" parent="@style/Widget.AppCompat.ActionBar">
|
||||
<item name="android:background">@color/actionbar</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
19
app/src/main/res/values/attrs.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<declare-styleable name="ProgressWheel">
|
||||
<attr name="text" format="string" />
|
||||
<attr name="textColor" format="color" />
|
||||
<attr name="textSize" format="dimension" />
|
||||
<attr name="barColor" format="color" />
|
||||
<attr name="rimColor" format="color" />
|
||||
<attr name="rimWidth" format="dimension" />
|
||||
<attr name="spinSpeed" format="dimension" />
|
||||
<attr name="delayMillis" format="integer" />
|
||||
<attr name="circleColor" format="color" />
|
||||
<attr name="radius" format="dimension" />
|
||||
<attr name="barWidth" format="dimension" />
|
||||
<attr name="barLength" format="dimension" />
|
||||
<attr name="contourColor" format="color"/>
|
||||
<attr name="contourSize" format="dimension"/>
|
||||
</declare-styleable>
|
||||
</resources>
|
5
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="statusbar">#dddddd</color>
|
||||
<color name="actionbar">#dddddd</color>
|
||||
</resources>
|
@ -1,8 +1,22 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light">
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<!-- We have a base theme so that KitKat can go translucent here. -->
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light" />
|
||||
|
||||
<!-- Almost re-use style from Widget.Holo.Button.Borderless -->
|
||||
<style name="AppBaseTheme.Borderless">
|
||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
||||
<item name="android:paddingLeft">4dip</item>
|
||||
<item name="android:paddingRight">4dip</item>
|
||||
<!-- Requires API 17
|
||||
<item name="android:paddingStart">4dip</item>
|
||||
<item name="android:paddingEnd">4dip</item>
|
||||
-->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|