- Added support for xlarge screens to handle tablets and disable compatibility mode.

- Improved the layout of the Share screen on big screens.
- Other minor cleanup.
- Bumped the version to 3.6 final.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1807 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin@google.com 2011-06-01 20:27:03 +00:00
parent 2f8acfd250
commit 261a349c4a
9 changed files with 87 additions and 119 deletions

View file

@ -20,14 +20,15 @@ version to be published. The next versionCode will be 7, regardless of whether t
versionName is 2.31, 2.4, or 3.0. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.zxing.client.android"
android:versionName="3.6 beta 1"
android:versionCode="69"
android:versionName="3.6"
android:versionCode="70"
android:installLocation="auto">
<!-- We require Cupcake (Android 1.5) or later, but are really targeting Donut. -->
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="4"/>
<!-- Donut-specific flags which allow us to run on any dpi screens. -->
<supports-screens android:largeScreens="true"
<supports-screens android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
@ -110,7 +111,8 @@ versionName is 2.31, 2.4, or 3.0. -->
</activity>
<activity android:name=".share.ShareActivity"
android:label="@string/share_name"
android:screenOrientation="user">
android:screenOrientation="user"
android:theme="@android:style/Theme.Light">
<intent-filter>
<action android:name="com.google.zxing.client.android.SHARE"/>
<category android:name="android.intent.category.DEFAULT"/>

View file

@ -6,35 +6,13 @@
<body>
<p><b>New in version 3.6:</b></p>
<ul>
<li>Added support for the Motorola Xoom and other tablets.</li>
<li>Added the ability to type in text and encode it as a QR Code.</li>
<li>Added support for many more locales for web search and product search.</li>
<li>Fixed support for the Motorola Xoom tablet.</li>
<li>Provided a choice of creating a new contact or merging with an existing one.</li>
<li>Allowed third party apps to specify the size of the scanning rectangle.</li>
<li>Added Hebrew translation and improved others.</li>
<li>Other minor fixes.</li>
</ul>
<p><b>New in version 3.53:</b></p>
<ul>
<li>Added support for 16 and 24 digit ITF codes.</li>
<li>Added support for mirrored images for front-facing cameras.</li>
<li>Improved Chinese, Turkish, Czech, and German translations.</li>
<li>Improved handling of all day calendar events on some devices.</li>
</ul>
<p><b>New in version 3.52:</b></p>
<ul>
<li>Fixed a crash on the Wildfire, Intercept, and other low DPI devices.</li>
<li>Improved Russian translation.</li>
</ul>
<p><b>New in version 3.51:</b></p>
<ul>
<li>Improved Data Matrix barcode reading.</li>
<li>Added support for Hanzi encoding of Chinese characters.</li>
<li>Added a preview of shortened URLs and product barcodes.</li>
<li>Added Korean translation.</li>
<li>Fixed Danish and Turkish translations.</li>
<li>Fixed a couple of rare crashes.</li>
<li>Many bug fixes.</li>
<li>Fixed a crash with WiFi codes.</li>
</ul>
</body>
</html>

View file

@ -15,11 +15,10 @@
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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:background="@color/share_view"
android:orientation="vertical"
android:padding="8dip">
@ -34,7 +33,6 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/share_view"
android:orientation="horizontal"
android:paddingBottom="12dip">

View file

@ -14,91 +14,85 @@
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">
<!-- ScrollView wrapper is to accommodate small screens -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- ScrollView wrapper is to accommodate small screens. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center">
<!-- Must wrap the rest in one layout -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="8dip">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/share_text"
android:textSize="18sp"
android:text="@string/msg_share_explanation"
android:paddingBottom="8dip"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/share_via_barcode"
android:paddingBottom="8dip"/>
<!-- Must wrap the rest in one layout -->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical"
android:padding="8dip">
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="8dip">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/share_text"
android:textSize="18sp"
android:text="@string/msg_share_explanation"
android:paddingBottom="8dip"/>
<Button android:id="@+id/share_app_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_app"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/share_via_barcode"
android:paddingBottom="8dip"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="8dip">
<Button android:id="@+id/share_app_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_app"/>
<Button android:id="@+id/share_bookmark_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_bookmark"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="8dip">
<Button android:id="@+id/share_contact_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_contact"/>
<Button android:id="@+id/share_clipboard_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_clipboard"/>
</LinearLayout>
<EditText android:id="@+id/share_text_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:hint="@string/msg_share_text"
android:singleLine="true"
android:selectAllOnFocus="true"/>
<Button android:id="@+id/share_bookmark_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_bookmark"/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="8dip">
</LinearLayout>
<Button android:id="@+id/share_contact_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_contact"/>
<Button android:id="@+id/share_clipboard_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_share_clipboard"/>
</LinearLayout>
<EditText android:id="@+id/share_text_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:hint="@string/msg_share_text"
android:singleLine="true"
android:selectAllOnFocus="true"/>
</LinearLayout>
</ScrollView>

View file

@ -19,7 +19,7 @@
<color name="encode_view">#ffffffff</color>
<color name="help_button_view">#ffcccccc</color>
<color name="help_view">#ff404040</color>
<color name="possible_result_points">#c0ffff00</color>
<color name="possible_result_points">#c0ffff00</color>
<color name="result_image_border">#ffffffff</color>
<color name="result_minor_text">#ffc0c0c0</color>
<color name="result_points">#c000ff00</color>
@ -32,7 +32,6 @@
<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="status_view">#50000000</color>
<color name="status_text">#ffffffff</color>
<color name="transparent">#00000000</color>

View file

@ -79,8 +79,9 @@ final class DecodeHandler extends Handler {
}
if (rawResult != null) {
// Don't log the barcode contents for security.
long end = System.currentTimeMillis();
Log.d(TAG, "Found barcode (" + (end - start) + " ms):\n" + rawResult.toString());
Log.d(TAG, "Found barcode in " + (end - start) + " ms");
Message message = Message.obtain(activity.getHandler(), R.id.decode_succeeded, rawResult);
Bundle bundle = new Bundle();
bundle.putParcelable(DecodeThread.BARCODE_BITMAP, source.renderCroppedGreyscaleBitmap());

View file

@ -72,7 +72,6 @@ final class DecodeThread extends Thread {
if (characterSet != null) {
hints.put(DecodeHintType.CHARACTER_SET, characterSet);
}
hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback);
}

View file

@ -90,7 +90,6 @@ final class CameraConfigurationManager {
}
private static Point getCameraResolution(Camera.Parameters parameters, Point screenResolution) {
String previewSizeValueString = parameters.get("preview-size-values");
// saw this on Xperia
if (previewSizeValueString == null) {
@ -188,7 +187,6 @@ final class CameraConfigurationManager {
}
private void setZoom(Camera.Parameters parameters) {
String zoomSupportedString = parameters.get("zoom-supported");
if (zoomSupportedString != null && !Boolean.parseBoolean(zoomSupportedString)) {
return;

View file

@ -35,8 +35,7 @@ import android.widget.TextView;
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class BookmarkAdapter extends BaseAdapter {
final class BookmarkAdapter extends BaseAdapter {
private final Context context;
private final Cursor cursor;