diff options
author | Andrew Dolgov <[email protected]> | 2011-09-08 15:28:38 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-09-08 15:28:38 +0400 |
commit | a14e9cd14e3d9490a6c4680e54bcd7d691bf548b (patch) | |
tree | fc0b60387557aa0295b2b9927d32092d501a9336 /res | |
parent | a04f7480142a787e22fb4e152aae566bf0c43f29 (diff) |
implement fetching of feeds
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/feeds_fragment.xml | 13 | ||||
-rw-r--r-- | res/layout/feeds_row.xml | 27 | ||||
-rw-r--r-- | res/layout/main.xml | 28 | ||||
-rw-r--r-- | res/values/attrs.xml | 4 | ||||
-rw-r--r-- | res/values/style.xml | 6 |
5 files changed, 70 insertions, 8 deletions
diff --git a/res/layout/feeds_fragment.xml b/res/layout/feeds_fragment.xml new file mode 100644 index 00000000..049b82ac --- /dev/null +++ b/res/layout/feeds_fragment.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8" ?>
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
+ <ListView android:layout_weight="1" android:background="?feedlistBackground"
+ android:layout_width="match_parent" android:id="@+id/feeds" android:layout_height="match_parent"></ListView>
+ </LinearLayout>
+ <ProgressBar android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_gravity="center" android:id="@+id/loading_progress"/>
+ </FrameLayout>
diff --git a/res/layout/feeds_row.xml b/res/layout/feeds_row.xml new file mode 100644 index 00000000..81c58b46 --- /dev/null +++ b/res/layout/feeds_row.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="?android:attr/listPreferredItemHeight" + android:orientation="horizontal" + android:gravity="center_vertical" + android:padding="6dip" android:id="@+id/feeds_row"> + <TextView + android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:paddingLeft="16dp" + android:text="{FEED}" android:textSize="16sp"/> + <TextView + android:id="@+id/unread_counter" + android:gravity="right" + android:textSize="12sp" + android:textStyle="bold" + android:textColor="?unreadCounterColor" + android:layout_gravity="center_vertical" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="{123}"/> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/main.xml b/res/layout/main.xml index 4361cfe8..c91f2a76 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -1,7 +1,21 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - > -</LinearLayout> + + <LinearLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal"> + + <LinearLayout android:layout_weight="1.5" android:layout_height="match_parent" android:id="@+id/linearLayout4" android:layout_width="match_parent"> + + <LinearLayout android:layout_height="match_parent" android:id="@+id/feeds_container" android:layout_width="match_parent"> + </LinearLayout> + + <ImageView + xmlns:android="http://schemas.android.com/apk/res/android" + android:background="?feedlistDivider" + android:paddingLeft="2dip" android:paddingRight="2dip" + android:layout_width="wrap_content" android:layout_height="match_parent"></ImageView> + + </LinearLayout> + + <LinearLayout android:layout_weight="0.5" android:layout_height="match_parent" android:id="@+id/headlines_container" android:layout_width="match_parent"> + </LinearLayout> + + + </LinearLayout> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 9ad509d1..fa4748c5 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="utf-8"?>
<resources>
- <attr name="placeholder" format="reference|color" />
+ <attr name="feedlistDivider" format="reference|color" />
+ <attr name="feedlistBackground" format="reference|color" />
+ <attr name="unreadCounterColor" format="reference|color" />
</resources>
\ No newline at end of file diff --git a/res/values/style.xml b/res/values/style.xml index 952f70ff..b9c13774 100644 --- a/res/values/style.xml +++ b/res/values/style.xml @@ -1,8 +1,14 @@ <resources>
<style name="LightTheme" parent="android:Theme.Holo.Light">
+ <item name="feedlistDivider">@android:drawable/divider_horizontal_bright</item>
+ <item name="feedlistBackground">#fafafa</item>
+ <item name="unreadCounterColor">#0000ff</item>
</style>
<style name="DarkTheme" parent="android:Theme.Holo">
+ <item name="feedlistDivider">@android:drawable/divider_horizontal_dark</item>
+ <item name="feedlistBackground">#101010</item>
+ <item name="unreadCounterColor">#0000ff</item>
</style>
</resources>
\ No newline at end of file |