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
This commit is contained in:
dswitkin 2008-11-21 21:04:11 +00:00
parent 98b34ae187
commit 8df34ebb42
6 changed files with 112 additions and 21 deletions

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -172,7 +172,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
@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)