summaryrefslogtreecommitdiff
path: root/res/layout
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-30 13:43:02 +0300
committerAndrew Dolgov <[email protected]>2011-11-30 13:43:02 +0300
commit918235592ada25cab9da734b109921dcd7e87a85 (patch)
treefa6162da18f8a6859ff9a70bd5ce601a2cdfb1ae /res/layout
parent450deb1756350a4a099eb90dc3c826be751469bf (diff)
handle layout selection by android means
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/headlines_row.xml45
-rw-r--r--res/layout/headlines_row_selected.xml95
-rw-r--r--res/layout/headlines_row_unread.xml47
-rw-r--r--res/layout/main.xml70
-rw-r--r--res/layout/main_small.xml56
5 files changed, 242 insertions, 71 deletions
diff --git a/res/layout/headlines_row.xml b/res/layout/headlines_row.xml
new file mode 100644
index 00000000..4b66b747
--- /dev/null
+++ b/res/layout/headlines_row.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:gravity="center_vertical"
+ android:background="?headlineNormalBackground"
+ android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
+ <ImageView android:background="?headlineSeparatorNormal" android:paddingRight="4dip" android:layout_height="match_parent" android:layout_width="wrap_content"></ImageView>
+ <CheckBox android:focusable="false"
+ android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
+ <LinearLayout android:orientation="vertical" android:id="@+id/linearLayout1" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="wrap_content">
+ <TextView android:singleLine="true" android:ellipsize="end" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/title" android:text="{Title...}" android:textSize="16sp"></TextView>
+ <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/excerpt" android:text="{Content excerpt...}" android:textSize="13sp" android:textColor="#909090"></TextView>
+ </LinearLayout>
+ <LinearLayout
+ android:id="@+id/linerLayout3"
+ android:layout_width="wrap_content" android:gravity="center" android:padding="3dip"
+ android:layout_height="wrap_content" android:orientation="vertical">
+ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#909090" android:textSize="13sp" android:id="@+id/date" android:text="Jan 01"></TextView>
+ <LinearLayout
+ android:id="@+id/linearLayout4"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:paddingRight="2sp"
+ android:layout_height="wrap_content" >
+
+ <ImageView
+ android:id="@+id/marked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@android:drawable/star_off" >
+ </ImageView>
+
+ <ImageView
+ android:id="@+id/published"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@drawable/ic_rss_bw" >
+ </ImageView>
+ </LinearLayout>
+
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/headlines_row_selected.xml b/res/layout/headlines_row_selected.xml
new file mode 100644
index 00000000..fa7e7ad0
--- /dev/null
+++ b/res/layout/headlines_row_selected.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/headlines_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="?headlineSelectedBackground"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?headlineSeparatorSelected"
+ android:paddingRight="4dip" >
+ </ImageView>
+
+ <CheckBox
+ android:id="@+id/selected"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip" >
+ </CheckBox>
+
+ <LinearLayout
+ android:id="@+id/linearLayout1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:text="{Title...}"
+ android:textSize="16sp" >
+ </TextView>
+
+ <TextView
+ android:id="@+id/excerpt"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="{Content excerpt...}"
+ android:textColor="#909090"
+ android:textSize="13sp" >
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/linerLayout3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="3dip" >
+
+ <TextView
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Jan 01"
+ android:textColor="#909090"
+ android:textSize="13sp" >
+ </TextView>
+
+ <LinearLayout
+ android:id="@+id/linearLayout4"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:paddingRight="2sp"
+ android:layout_height="wrap_content" >
+
+ <ImageView
+ android:id="@+id/marked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@android:drawable/star_off" >
+ </ImageView>
+
+ <ImageView
+ android:id="@+id/published"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@drawable/ic_rss_bw" >
+ </ImageView>
+ </LinearLayout>
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/headlines_row_unread.xml b/res/layout/headlines_row_unread.xml
new file mode 100644
index 00000000..e0aa00cf
--- /dev/null
+++ b/res/layout/headlines_row_unread.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:gravity="center_vertical"
+ android:background="?headlineUnreadBackground"
+ android:id="@+id/headlines_row" android:orientation="horizontal" android:layout_height="wrap_content">
+ <ImageView android:background="?headlineSeparatorUnread" android:paddingRight="4dip" android:layout_height="match_parent" android:layout_width="wrap_content"></ImageView>
+ <CheckBox android:focusable="false"
+ android:paddingLeft="6dip" android:paddingRight="6dip" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/selected"></CheckBox>
+
+ <LinearLayout android:layout_weight="1" android:layout_height="wrap_content" android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_width="match_parent">
+ <TextView android:singleLine="true" android:ellipsize="end" android:id="@+id/title" android:textSize="16sp" android:text="{Title...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>
+ <TextView android:id="@+id/excerpt" android:textSize="13sp" android:textColor="#909090" android:text="{Content excerpt...}" android:layout_width="match_parent" android:layout_height="match_parent"></TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/linerLayout3"
+ android:layout_width="wrap_content" android:gravity="center" android:padding="3dip"
+ android:layout_height="wrap_content" android:orientation="vertical">
+ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#909090" android:textSize="13sp" android:id="@+id/date" android:text="Jan 01"></TextView>
+ <LinearLayout
+ android:id="@+id/linearLayout4"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:paddingRight="2sp"
+ android:layout_height="wrap_content" >
+
+ <ImageView
+ android:id="@+id/marked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@android:drawable/star_off" >
+ </ImageView>
+
+ <ImageView
+ android:id="@+id/published"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:src="@drawable/ic_rss_bw" >
+ </ImageView>
+ </LinearLayout>
+
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/main.xml b/res/layout/main.xml
index e0a8394c..0215f270 100644
--- a/res/layout/main.xml
+++ b/res/layout/main.xml
@@ -1,16 +1,56 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" android:id="@+id/main_flipper">
- <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:id="@+id/loading_container">
- <ProgressBar android:id="@+id/loading_progress" android:layout_height="wrap_content" android:layout_width="wrap_content" style="?android:attr/progressBarStyleLarge"></ProgressBar>
- <TextView android:textAppearance="?android:attr/textAppearanceLarge" android:text="@string/loading_message" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/loading_message"></TextView>
- </LinearLayout>
- <LinearLayout android:layout_height="fill_parent" android:orientation="horizontal" android:id="@+id/main" android:layout_width="fill_parent">
- <FrameLayout android:layout_height="match_parent" android:layout_width="0dp" android:layout_weight="0.3" android:id="@+id/feeds_fragment"></FrameLayout>
- <FrameLayout android:layout_height="match_parent" android:layout_width="0dp" android:layout_weight="0.3" android:id="@+id/cats_fragment"></FrameLayout>
- <FrameLayout android:layout_height="match_parent" android:layout_width="0dp" android:layout_weight="0.5" android:id="@+id/headlines_fragment"></FrameLayout>
- <FrameLayout android:layout_height="match_parent" android:layout_width="0dp" android:layout_weight="0.5" android:id="@+id/article_fragment"></FrameLayout>
- </LinearLayout>
-
-
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/main_flipper"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+
+ <LinearLayout
+ android:id="@+id/loading_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center" >
+
+ <ProgressBar
+ android:id="@+id/loading_progress"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+ </ProgressBar>
+
+ <TextView
+ android:id="@+id/loading_message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/loading_message" >
+ </TextView>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/main"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+
+ <FrameLayout
+ android:id="@+id/feeds_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/cats_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/headlines_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/article_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+ </FrameLayout>
+ </LinearLayout>
+
</FrameLayout> \ No newline at end of file
diff --git a/res/layout/main_small.xml b/res/layout/main_small.xml
deleted file mode 100644
index 0215f270..00000000
--- a/res/layout/main_small.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/main_flipper"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
- <LinearLayout
- android:id="@+id/loading_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center" >
-
- <ProgressBar
- android:id="@+id/loading_progress"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
- </ProgressBar>
-
- <TextView
- android:id="@+id/loading_message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/loading_message" >
- </TextView>
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/main"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
- <FrameLayout
- android:id="@+id/feeds_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/cats_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/headlines_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
- </FrameLayout>
-
- <FrameLayout
- android:id="@+id/article_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
- </FrameLayout>
- </LinearLayout>
-
-</FrameLayout> \ No newline at end of file