Initial DownloadActivity import

I wish all new activities were this easy...
Needs significant refactoring/testing attention, coming shortly.
This commit is contained in:
Bradlee Speice
2014-07-07 22:09:15 -04:00
parent 5c71e8f014
commit d6951fcc9f
48 changed files with 2208 additions and 192 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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" />

View 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>