Added great new artwork from Joseph for the Share UI. Also renamed the Share menu item to be clearer.
git-svn-id: https://zxing.googlecode.com/svn/trunk@758 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/android/res/drawable/share_barcode.png b/android/res/drawable/share_menu_item.png
similarity index 100%
rename from android/res/drawable/share_barcode.png
rename to android/res/drawable/share_menu_item.png
Binary files differ
diff --git a/android/res/drawable/share_via_barcode.png b/android/res/drawable/share_via_barcode.png
new file mode 100644
index 0000000..56c3449
--- /dev/null
+++ b/android/res/drawable/share_via_barcode.png
Binary files differ
diff --git a/android/res/layout-land/share.xml b/android/res/layout-land/share.xml
new file mode 100755
index 0000000..e8f81d1
--- /dev/null
+++ b/android/res/layout-land/share.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2008 ZXing authors
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/encode_view"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@color/share_view"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:padding="16px">
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ android:textColor="@color/share_text"
+ android:textSize="18.0sp"
+ android:text="@string/msg_share_explanation"
+ android:paddingBottom="32px"/>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@color/share_view"
+ android:orientation="horizontal"
+ android:gravity="center">
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="center"
+ android:src="@drawable/share_via_barcode"
+ android:paddingRight="48px"/>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@color/share_view"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <Button android:id="@+id/contact_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_share_contact"/>
+
+ <Button android:id="@+id/bookmark_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_share_bookmark"/>
+
+ <Button android:id="@+id/clipboard_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_share_clipboard"/>
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/android/res/layout/share.xml b/android/res/layout/share.xml
index 5f65ba2..e170edc 100755
--- a/android/res/layout/share.xml
+++ b/android/res/layout/share.xml
@@ -21,30 +21,46 @@
android:background="@color/share_view"
android:orientation="vertical"
android:gravity="center"
- android:padding="8px">
+ android:padding="16px">
<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ android:textColor="@color/share_text"
+ android:textSize="18.0sp"
+ android:text="@string/msg_share_explanation"
+ android:paddingBottom="32px"/>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@color/share_view"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="center"
+ android:src="@drawable/share_via_barcode"
+ android:paddingBottom="32px"/>
+
+ <Button android:id="@+id/contact_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:gravity="left"
- android:textColor="@color/share_text"
- android:textSize="18.0sp"
- android:text="@string/msg_share_explanation"
- android:paddingBottom="16px"/>
+ android:text="@string/button_share_contact"/>
- <Button android:id="@+id/contact_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/button_share_contact"/>
+ <Button android:id="@+id/bookmark_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_share_bookmark"/>
- <Button android:id="@+id/bookmark_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/button_share_bookmark"/>
+ <Button android:id="@+id/clipboard_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/button_share_clipboard"/>
- <Button android:id="@+id/clipboard_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/button_share_clipboard"/>
+ </LinearLayout>
</LinearLayout>
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
index ce2c0b7..a58d064 100755
--- a/android/res/values/strings.xml
+++ b/android/res/values/strings.xml
@@ -73,8 +73,8 @@
<string name="msg_sbc_snippet_unavailable">Snippet not available</string>
<string name="msg_sbc_unknown_page">Unknown page</string>
<string name="msg_sbc_searching_book">Searching book\u2026</string>
- <string name="msg_share_explanation">You can share data with a friend by displaying a barcode on
- your screen, and letting them scan it with their phone.</string>
+ <string name="msg_share_explanation">You can share data by displaying a barcode on
+ your screen and scanning it with another phone.</string>
<string name="msg_share_subject_line">Here\'s the contents of a barcode I scanned</string>
<string name="preferences_decode_1D_title">Decode 1D barcodes</string>
diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java
index 417b434..05adcb2 100755
--- a/android/src/com/google/zxing/client/android/CaptureActivity.java
+++ b/android/src/com/google/zxing/client/android/CaptureActivity.java
@@ -172,7 +172,7 @@
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
- menu.add(0, SHARE_ID, 0, R.string.menu_share).setIcon(R.drawable.share_barcode);
+ menu.add(0, SHARE_ID, 0, R.string.menu_share).setIcon(R.drawable.share_menu_item);
menu.add(0, SETTINGS_ID, 0, R.string.menu_settings)
.setIcon(android.R.drawable.ic_menu_preferences);
menu.add(0, HELP_ID, 0, R.string.menu_help)