aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorCamil Staps2015-04-06 21:41:41 +0200
committerCamil Staps2015-04-06 21:41:41 +0200
commite642fd72bcf507bb2258c8224e207b55061db08a (patch)
tree0048413be72891d7d135b4810651ee9d6900e419 /app/src/main/res/layout
initial commit
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_main.xml40
-rw-r--r--app/src/main/res/layout/fragment_main.xml12
-rw-r--r--app/src/main/res/layout/fragment_navigation_drawer.xml5
3 files changed, 57 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..17ea429
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,40 @@
+<!-- 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=".MainActivity">
+
+ <!-- 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" >
+
+ <ScrollView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:fillViewport="true">
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:text="Daily Reading"
+ android:id="@+id/textDailyReading"
+ android:layout_gravity="left|top"
+ android:layout_weight="1.0"/>
+
+ </ScrollView>
+ </FrameLayout>
+
+ <!-- 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_width="@dimen/navigation_drawer_width" android:layout_height="match_parent"
+ android:layout_gravity="start" android:name="com.camilstaps.taize.NavigationDrawerFragment"
+ tools:layout="@layout/fragment_navigation_drawer" />
+
+</android.support.v4.widget.DrawerLayout>
diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml
new file mode 100644
index 0000000..ef0bd84
--- /dev/null
+++ b/app/src/main/res/layout/fragment_main.xml
@@ -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" 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=".MainActivity$PlaceholderFragment">
+
+ <TextView android:id="@+id/section_label" android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+</RelativeLayout>
diff --git a/app/src/main/res/layout/fragment_navigation_drawer.xml b/app/src/main/res/layout/fragment_navigation_drawer.xml
new file mode 100644
index 0000000..c05742d
--- /dev/null
+++ b/app/src/main/res/layout/fragment_navigation_drawer.xml
@@ -0,0 +1,5 @@
+<ListView 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" android:choiceMode="singleChoice"
+ android:divider="@android:color/transparent" android:dividerHeight="0dp"
+ android:background="#cccc" tools:context=".NavigationDrawerFragment" />