diff options
author | Andy Doan <andy.doan@linaro.org> | 2011-09-21 13:55:29 -0500 |
---|---|---|
committer | Andy Doan <doanac@gmail.com> | 2011-09-21 13:55:29 -0500 |
commit | 47237999e9c791adb38ad75ad05369ec193800d3 (patch) | |
tree | c1e586dd6a196ed045a3bcbd9ab4866c0bfb3950 /res | |
parent | ad749d8d1251caea2d20b2556f75d63007ffe8a5 (diff) | |
download | LinaroConnect-47237999e9c791adb38ad75ad05369ec193800d3.tar.gz |
create an IMAGES handler
this is the first part in a series to support a handler
that can take JSON feed like:
http://www.linaro.org/remote/twitpic.php
and display an image browser.
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/image_loading.png | bin | 0 -> 967 bytes | |||
-rw-r--r-- | res/layout/image_item.xml | 19 | ||||
-rw-r--r-- | res/layout/images_grid.xml | 12 | ||||
-rw-r--r-- | res/raw/connect_layout.json | 5 |
4 files changed, 36 insertions, 0 deletions
diff --git a/res/drawable/image_loading.png b/res/drawable/image_loading.png Binary files differnew file mode 100644 index 0000000..8f27292 --- /dev/null +++ b/res/drawable/image_loading.png diff --git a/res/layout/image_item.xml b/res/layout/image_item.xml new file mode 100644 index 0000000..54e8649 --- /dev/null +++ b/res/layout/image_item.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingLeft="40px" + android:paddingRight="40px"> + + <TextView android:id="@+id/image_item_label" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:textColor="#88b12d" + android:gravity="center" + /> + <ImageView android:id="@+id/image_item_id" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + /> + </LinearLayout>
\ No newline at end of file diff --git a/res/layout/images_grid.xml b/res/layout/images_grid.xml new file mode 100644 index 0000000..1644912 --- /dev/null +++ b/res/layout/images_grid.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<GridView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/images_gridview" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:columnWidth="90dp" + android:numColumns="auto_fit" + android:verticalSpacing="10dp" + android:horizontalSpacing="10dp" + android:stretchMode="columnWidth" + android:gravity="center" +/>
\ No newline at end of file diff --git a/res/raw/connect_layout.json b/res/raw/connect_layout.json index 802f3df..e963f91 100644 --- a/res/raw/connect_layout.json +++ b/res/raw/connect_layout.json @@ -6,6 +6,11 @@ "data": "http://connect.linaro.org/events/event/linaro-connect-q411/" }, { + "label": "Pictures", + "handler": "IMAGES", + "data": "http://www.linaro.org/remote/twitpic.php" + }, + { "label": "Google+", "handler": "URL", "data": "http://google.com/#&q=linaro+site%3Aplus.google.com" |