Rest of cosmetic changes -- simpler, black theme with easier-to-touch buttons and consistent sizing, icons

git-svn-id: https://zxing.googlecode.com/svn/trunk@1426 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-06-15 13:04:18 +00:00
parent fb1e512208
commit d7a841bc2b
14 changed files with 107 additions and 141 deletions

View file

@ -1,11 +1,13 @@
<html>
<head>
<title>About 1D barcodes</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<p>Traditional barcodes, such as those printed on product packaging, are also known as <em>one
dimensional barcodes</em>. There are several types commonly used, including UPC and EAN. Most look
similar to this:</p>
<center><p><img src="../images/big-1d.png"></p></center>
<p style="text-align:center"><img src="../images/big-1d.png"></p>
<p>These 1D barcodes contain a unique code which typically describes a product, like a CD or a book.
You can look this code up on the internet to find prices, reviews, and more.</p>
<p>If you scan a book, you can also search the contents of the book for a word or phrase, and find

View file

@ -1,13 +1,15 @@
<html>
<head>
<title>About 2D barcodes</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<p><b>Barcode Scanner</b> also understands how to read two dimensional barcodes, called <em>QR
Codes</em>. For example, the QR Code below contains a hyperlink to the ZXing Project home page:</p>
<center><p><img src="../images/big-qr.png"></p></center>
<p style="text-align:center"><img src="../images/big-qr.png" alt="QR code"></p>
<p>You can also represent contact information in a QR Code, and put it on a business card or web
site. When you scan it, the results screen provides a choice of actions:</p>
<center><p><img src="../images/contact-results-screen.jpg"></p></center>
<p style="text-align:center"><img src="../images/contact-results-screen.jpg" alt="Contact results screen"></p>
<p>Besides URLs and contact info, QR Codes can also contain:</p>
<ul>
<li>Calendar events, which you can add to your Calendar</li>

View file

@ -1,10 +1,12 @@
<html>
<head>
<title>Barcode Scanner Help</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<p><b>Barcode Scanner</b> uses the camera on your phone to read barcodes and look up product
information such as prices and reviews.</p>
<center><p><img src="../images/scan-example.png"></p></center>
<p style="text-align:center"><img src="../images/scan-example.png" alt="Scan example"></p>
<p>It also reads <strong>2D barcodes</strong>, called <em>QR Codes</em>, which can contain links to
web sites, contact information such as phone numbers and email addresses, map locations and more.</p>
<ul class="touchable">

View file

@ -1,19 +1,21 @@
<html>
<head>
<title>How to scan</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<p>Barcode Scanner continuously scans a square region shown on your screen &mdash; just line up the
phone so the barcode is completely inside the viewfinder rectangle:</p>
<center><p>
<img src="../images/demo-yes.png">&nbsp;&nbsp;&nbsp;<img src="../images/demo-no.png">
</p></center>
<p style="text-align:center">
<img src="../images/demo-yes.png" alt="Yes"/>&nbsp;&nbsp;&nbsp;<img src="../images/demo-no.png" alt="No"/>
</p>
<p><b>IMPORTANT:</b> 1D barcodes like those found on products require a phone with autofocus.
Without it, only QR Codes will be scannable.</p>
<p>When a barcode is read, a beep sound will play and you'll see the results of the scan, a
description of what the barcode contains, and options to take action on the contents.</p>
<p>If you're having trouble scanning, make sure to hold the phone steady. If the camera is unable to
focus, try moving the phone further or closer from the barcode.</p>
<ul>
<ul class="touchable">
<li><a href="about1d.html">About 1D barcodes</a></li>
<li><a href="about2d.html">About 2D barcodes</a></li>
</ul>

View file

@ -1,11 +1,13 @@
<html>
<head>
<title>How to share</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<p>In addition to <a href="about2d.html">scanning 2D barcodes</a>, <b>Barcode Scanner</b> can also
generate a QR Code and display it on your screen. Then you can show it to a friend, and let them
scan the barcode with their phone:</p>
<center><p><img src="../images/scan-from-phone.png"></p></center>
<center><p><img src="../images/scan-from-phone.png" alt="Scan from phone"></p></center>
<p>To use this feature, press the Menu button from the main scanning screen, and tap Share. Then
choose whether you want to share a contact, a bookmark, or the contents of the clipboard. A QR
Code will be generated automatically. When you're done, press Back or Home.</p>

View file

@ -1,8 +1,11 @@
body {
background-color: white;
color: black;
font-family: arial;
font-size: 16;
background-color: black;
color: white;
font-family: Arial sans-serif;
font-size: 14pt;
}
a:link, a:visited, a:active {
color: white;
}
ul.touchable li {
padding-top:8px;

View file

@ -1,7 +1,9 @@
<html>
<head>
<title>What's new in this version</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<link rel="StyleSheet" href="style.css" type="text/css">
<p><b>New in version 3.31:</b></p>
<ul>
<li>Fixed a bug which caused some devices not to scan from time to time.</li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View file

@ -18,70 +18,73 @@
android:id="@+id/encode_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:background="@color/share_view"
android:orientation="vertical"
android:padding="16dip">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:layout_height="0dip"
android:layout_weight="1"
android:textColor="@color/share_text"
android:textSize="14sp"
android:text="@string/msg_share_explanation"
android:paddingBottom="32dip"/>
android:textSize="22sp"
android:text="@string/msg_share_explanation"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="2"
android:background="@color/share_view"
android:orientation="horizontal"
android:layout_gravity="center">
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="3"
android:scaleType="center"
android:src="@drawable/share_via_barcode"
android:paddingRight="32dip"/>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical">
<TableRow>
<Button android:id="@+id/contact_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_contact"/>
<Button android:id="@+id/contact_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_share_contact"
android:minWidth="90dip"/>
<Button android:id="@+id/bookmark_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_bookmark"/>
<Button android:id="@+id/bookmark_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_share_bookmark"
android:minWidth="90dip"/>
</LinearLayout>
</TableRow>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical">
<TableRow>
<Button android:id="@+id/clipboard_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_clipboard"/>
<Button android:id="@+id/clipboard_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_share_clipboard"
android:minWidth="90dip"/>
<Button android:id="@+id/app_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_app"/>
<Button android:id="@+id/app_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_share_app"
android:minWidth="90dip"/>
</TableRow>
</TableLayout>
</LinearLayout>
</LinearLayout>

View file

@ -179,38 +179,4 @@
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/transparent">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@color/transparent"/>
<LinearLayout android:id="@+id/status_view"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@color/status_view"
android:baselineAligned="false"
android:padding="4dip">
<TextView android:id="@+id/status_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_weight="1"
android:text="@string/msg_default_status"
android:textColor="@color/status_text"
android.textSize="14sp"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>

View file

@ -18,23 +18,23 @@
android:id="@+id/encode_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:background="@color/share_view"
android:orientation="vertical"
android:padding="16dip">
<TextView
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:layout_weight="1"
android:textColor="@color/share_text"
android:textSize="14sp"
android:text="@string/msg_share_explanation"
android:paddingBottom="24dip"/>
android:textSize="22sp"
android:text="@string/msg_share_explanation"/>
<ImageView
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:scaleType="center"
android:src="@drawable/share_via_barcode"
android:paddingBottom="24dip"/>
@ -42,23 +42,20 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="horizontal"
android:gravity="center"
android:weightSum="1"
android:paddingBottom="8dip">
<Button android:id="@+id/contact_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_contact"/>
<Button android:id="@+id/bookmark_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_bookmark"/>
</LinearLayout>
@ -66,21 +63,19 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="horizontal"
android:gravity="center"
android:weightSum="1">
android:layout_weight="1"
android:orientation="horizontal">
<Button android:id="@+id/clipboard_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_clipboard"/>
<Button android:id="@+id/app_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/button_share_app"/>
</LinearLayout>

View file

@ -31,8 +31,8 @@
<color name="sbc_layout_view">#ffffffff</color>
<color name="sbc_page_number_text">#ff000000</color>
<color name="sbc_snippet_text">#ff4b4b4b</color>
<color name="share_text">#ff000000</color>
<color name="share_view">#ffffffff</color>
<color name="share_text">#ffffffff</color>
<color name="share_view">#ff000000</color>
<color name="status_view">#50000000</color>
<color name="status_text">#ffffffff</color>
<color name="transparent">#00000000</color>

View file

@ -17,6 +17,7 @@
package com.google.zxing.client.android;
import android.util.TypedValue;
import android.widget.Toast;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import com.google.zxing.ResultPoint;
@ -51,7 +52,6 @@ import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.text.ClipboardManager;
import android.util.Log;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
@ -136,7 +136,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
private CaptureActivityHandler handler;
private ViewfinderView viewfinderView;
private View statusView;
private View resultView;
private MediaPlayer mediaPlayer;
private Result lastResult;
@ -182,7 +181,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
CameraManager.init(getApplication());
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
resultView = findViewById(R.id.result_view);
statusView = findViewById(R.id.status_view);
handler = null;
lastResult = null;
hasSurface = false;
@ -190,6 +188,8 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
historyManager.trimHistory();
showHelpOnFirstLaunch();
Toast.makeText(this, R.string.msg_default_status, Toast.LENGTH_LONG).show();
}
@Override
@ -395,7 +395,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getString(R.string.title_about) + versionName);
builder.setMessage(getString(R.string.msg_about) + "\n\n" + getString(R.string.zxing_url));
builder.setIcon(R.drawable.zxing_icon);
builder.setIcon(R.drawable.launcher_icon);
builder.setPositiveButton(R.string.button_open_browser, aboutListener);
builder.setNegativeButton(R.string.button_cancel, null);
builder.show();
@ -492,7 +492,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
// Put up our own UI for how to handle the decoded contents.
private void handleDecodeInternally(Result rawResult, Bitmap barcode) {
statusView.setVisibility(View.GONE);
viewfinderView.setVisibility(View.GONE);
resultView.setVisibility(View.VISIBLE);
@ -554,12 +553,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
// barcode was found (e.g. contact info) rather than the full contents, which they won't
// have time to read.
ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
TextView textView = (TextView) findViewById(R.id.status_text_view);
textView.setGravity(Gravity.CENTER);
textView.setTextSize(18.0f);
textView.setText(getString(resultHandler.getDisplayTitle()));
statusView.setBackgroundColor(getResources().getColor(R.color.transparent));
Toast.makeText(this, resultHandler.getDisplayTitle(), Toast.LENGTH_SHORT).show();
if (copyToClipboard) {
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
@ -693,14 +687,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
private void resetStatusView() {
resultView.setVisibility(View.GONE);
statusView.setVisibility(View.VISIBLE);
statusView.setBackgroundColor(getResources().getColor(R.color.status_view));
viewfinderView.setVisibility(View.VISIBLE);
TextView textView = (TextView) findViewById(R.id.status_text_view);
textView.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
textView.setTextSize(14.0f);
textView.setText(R.string.msg_default_status);
lastResult = null;
}