Initial commit for the re-code
BIN
MinimalBible/src/main/res/drawable-hdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 161 B |
BIN
MinimalBible/src/main/res/drawable-hdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 438 B |
BIN
MinimalBible/src/main/res/drawable-hdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
MinimalBible/src/main/res/drawable-hdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 702 B |
BIN
MinimalBible/src/main/res/drawable-hdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
MinimalBible/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
MinimalBible/src/main/res/drawable-mdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 142 B |
BIN
MinimalBible/src/main/res/drawable-mdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 328 B |
BIN
MinimalBible/src/main/res/drawable-mdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
MinimalBible/src/main/res/drawable-mdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 479 B |
BIN
MinimalBible/src/main/res/drawable-mdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
MinimalBible/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
MinimalBible/src/main/res/drawable-xhdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
MinimalBible/src/main/res/drawable-xhdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
MinimalBible/src/main/res/drawable-xhdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
MinimalBible/src/main/res/drawable-xhdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 900 B |
BIN
MinimalBible/src/main/res/drawable-xhdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
MinimalBible/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
MinimalBible/src/main/res/drawable-xxhdpi/drawer_shadow.9.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
MinimalBible/src/main/res/drawable-xxhdpi/ic_action_cancel.png
Normal file
After Width: | Height: | Size: 567 B |
BIN
MinimalBible/src/main/res/drawable-xxhdpi/ic_action_download.png
Normal file
After Width: | Height: | Size: 650 B |
BIN
MinimalBible/src/main/res/drawable-xxhdpi/ic_action_search.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
MinimalBible/src/main/res/drawable-xxhdpi/ic_drawer.png
Normal file
After Width: | Height: | Size: 202 B |
BIN
MinimalBible/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
42
MinimalBible/src/main/res/layout/activity_bible_viewer.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- 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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.bspeice.minimalbible.activities.viewer.BibleViewer" >
|
||||
|
||||
<!--
|
||||
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:fitsSystemWindows="true"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<!--
|
||||
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:name="org.bspeice.minimalbible.activities.viewer.ViewerNavDrawerFragment"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:clipToPadding="false"
|
||||
android:layout_gravity="start" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
38
MinimalBible/src/main/res/layout/activity_download.xml
Normal file
@ -0,0 +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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
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.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--
|
||||
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:name="org.bspeice.minimalbible.activities.downloader.DownloadNavDrawerFragment"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
15
MinimalBible/src/main/res/layout/fragment_download.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
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>
|
@ -0,0 +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"
|
||||
tools:context="org.bspeice.minimalbible.activities.BaseNavigationDrawerFragment" />
|
||||
|
12
MinimalBible/src/main/res/layout/fragment_viewer_main.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.bspeice.minimalbible.MainActivity$PlaceholderFragment" >
|
||||
|
||||
<WebView
|
||||
android:id="@+id/book_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
|
||||
</RelativeLayout>
|
45
MinimalBible/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>
|
16
MinimalBible/src/main/res/menu/download.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.bspeice.minimalbible.DownloadActivity" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_example"
|
||||
android:title="@string/action_example"
|
||||
app:showAsAction="withText|ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
</menu>
|
9
MinimalBible/src/main/res/menu/downloader.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/action_settings"/>
|
||||
|
||||
</menu>
|
10
MinimalBible/src/main/res/menu/global.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
</menu>
|
17
MinimalBible/src/main/res/menu/main.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.bspeice.minimalbible.MainActivity" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_downloads"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/title_activity_downloader" />
|
||||
|
||||
</menu>
|
8
MinimalBible/src/main/res/values-sw600dp/dimens.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Customize dimensions originally defined in res/values/dimens.xml (such as
|
||||
screen margins) for sw600dp devices (e.g. 7" tablets) here.
|
||||
-->
|
||||
|
||||
</resources>
|
9
MinimalBible/src/main/res/values-sw720dp-land/dimens.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Customize dimensions originally defined in res/values/dimens.xml (such as
|
||||
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
|
||||
-->
|
||||
<dimen name="activity_horizontal_margin">128dp</dimen>
|
||||
|
||||
</resources>
|
17
MinimalBible/src/main/res/values-v11/styles.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 11+. This theme completely replaces
|
||||
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
|
||||
|
||||
<!-- API 11 theme customizations can go here. -->
|
||||
<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>
|
18
MinimalBible/src/main/res/values-v14/styles.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 14+. This theme completely replaces
|
||||
AppBaseTheme from BOTH res/values/styles.xml and
|
||||
res/values-v11/styles.xml on API 14+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
|
||||
<!-- API 14 theme customizations can go here. -->
|
||||
<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>
|
20
MinimalBible/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>
|
10
MinimalBible/src/main/res/values-w820dp/dimens.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
|
||||
-->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
|
||||
</resources>
|
19
MinimalBible/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
MinimalBible/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>
|
13
MinimalBible/src/main/res/values/dimens.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<resources>
|
||||
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
<!--
|
||||
Per the design guidelines, navigation drawers should be between 240dp and 320dp:
|
||||
https://developer.android.com/design/patterns/navigation-drawer.html
|
||||
-->
|
||||
<dimen name="navigation_drawer_width">240dp</dimen>
|
||||
|
||||
</resources>
|
4
MinimalBible/src/main/res/values/html_strings.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="content_page">file:///android_asset/book.html</string>
|
||||
</resources>
|
15
MinimalBible/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">Minimal Bible</string>
|
||||
<string name="title_section1">Section 1</string>
|
||||
<string name="title_section2">Section 2</string>
|
||||
<string name="title_section3">Section 3</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="action_example">Example action</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_downloader">Downloads</string>
|
||||
<string name="title_activity_download">DownloadActivity</string>
|
||||
|
||||
</resources>
|
33
MinimalBible/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
|
||||
<!--
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
-->
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<!-- Application theme. -->
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
</style>
|
||||
|
||||
<!-- 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>
|