diff options
| author | srowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57> | 2012-09-10 16:03:03 +0400 |
|---|---|---|
| committer | srowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57> | 2012-09-10 16:03:03 +0400 |
| commit | 841ea2948ec91929063000e9d3ea3e27686fcf4e (patch) | |
| tree | 9fa424fb1b9bfcabde9612f43cf0158c9a3b99f5 | |
| parent | 13d06bd149fea895a741fdf1d6b1fd72f7841c43 (diff) | |
| download | zxing-android-embedded-841ea2948ec91929063000e9d3ea3e27686fcf4e.tar.xz | |
Remove hard-coded colors as step towards importing Holo theme; remove borders to match Holo
git-svn-id: http://zxing.googlecode.com/svn/trunk/android@2399 59b500cc-1b3d-0410-9834-0bbf25fbcc57
| -rwxr-xr-x | res/layout-land/share.xml | 1 | ||||
| -rwxr-xr-x | res/layout-ldpi/capture.xml | 3 | ||||
| -rw-r--r-- | res/layout/help.xml | 4 | ||||
| -rw-r--r-- | res/layout/search_book_contents.xml | 3 | ||||
| -rw-r--r-- | res/layout/search_book_contents_header.xml | 2 | ||||
| -rw-r--r-- | res/layout/search_book_contents_list_item.xml | 6 | ||||
| -rwxr-xr-x | res/layout/share.xml | 1 | ||||
| -rwxr-xr-x | res/values/colors.xml | 11 | ||||
| -rwxr-xr-x | src/com/google/zxing/client/android/CaptureActivity.java | 6 | ||||
| -rwxr-xr-x | src/com/google/zxing/client/android/ViewfinderView.java | 9 |
10 files changed, 4 insertions, 42 deletions
diff --git a/res/layout-land/share.xml b/res/layout-land/share.xml index f1636d33..8730c2ab 100755 --- a/res/layout-land/share.xml +++ b/res/layout-land/share.xml @@ -25,7 +25,6 @@ <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" - android:textColor="@color/share_text" android:textSize="18sp" android:text="@string/msg_share_explanation" android:paddingBottom="12dip"/> diff --git a/res/layout-ldpi/capture.xml b/res/layout-ldpi/capture.xml index ee12cc19..261bfa0e 100755 --- a/res/layout-ldpi/capture.xml +++ b/res/layout-ldpi/capture.xml @@ -25,8 +25,7 @@ <com.google.zxing.client.android.ViewfinderView android:id="@+id/viewfinder_view" android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@color/transparent"/> + android:layout_height="fill_parent"/> <LinearLayout android:id="@+id/result_view" android:orientation="vertical" diff --git a/res/layout/help.xml b/res/layout/help.xml index 74f05bbc..7962460f 100644 --- a/res/layout/help.xml +++ b/res/layout/help.xml @@ -17,7 +17,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="@color/help_view" android:orientation="vertical"> <WebView android:id="@+id/help_contents" @@ -34,8 +33,7 @@ android:orientation="horizontal" android:gravity="center" android:padding="4dip" - android:weightSum="1" - android:background="@color/help_button_view"> + android:weightSum="1"> <Button android:id="@+id/back_button" android:layout_width="0dip" diff --git a/res/layout/search_book_contents.xml b/res/layout/search_book_contents.xml index 4f94b867..d96178fe 100644 --- a/res/layout/search_book_contents.xml +++ b/res/layout/search_book_contents.xml @@ -17,8 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@color/sbc_layout_view"> + android:layout_height="fill_parent"> <LinearLayout android:orientation="horizontal" diff --git a/res/layout/search_book_contents_header.xml b/res/layout/search_book_contents_header.xml index 19957b70..36be6c33 100644 --- a/res/layout/search_book_contents_header.xml +++ b/res/layout/search_book_contents_header.xml @@ -17,10 +17,8 @@ <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="@color/sbc_header_view" android:paddingLeft="8dip" android:paddingBottom="4dip" android:enabled="false" - android:textColor="@color/sbc_header_text" android:singleLine="true" android:textSize="14sp"/> diff --git a/res/layout/search_book_contents_list_item.xml b/res/layout/search_book_contents_list_item.xml index c5ece6ea..9f1957c5 100644 --- a/res/layout/search_book_contents_list_item.xml +++ b/res/layout/search_book_contents_list_item.xml @@ -19,7 +19,6 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="@color/sbc_list_item" android:padding="6dip"> <TextView android:id="@+id/page_number_view" @@ -27,7 +26,6 @@ android:layout_height="wrap_content" android:layout_gravity="left|top" android:layout_marginRight="8dip" - android:textColor="@color/sbc_page_number_text" android:singleLine="false" android:textSize="14sp" android:textStyle="bold"/> @@ -36,9 +34,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|top" - android:textColor="@color/sbc_snippet_text" android:singleLine="false" - android:textSize="14sp" - android:typeface="serif"/> + android:textSize="14sp"/> </com.google.zxing.client.android.book.SearchBookContentsListItem> diff --git a/res/layout/share.xml b/res/layout/share.xml index a1da4c4d..6a57d2f8 100755 --- a/res/layout/share.xml +++ b/res/layout/share.xml @@ -33,7 +33,6 @@ <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"/> diff --git a/res/values/colors.xml b/res/values/colors.xml index 19de19f6..8ed7b018 100755 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -17,24 +17,13 @@ <resources> <color name="contents_text">#ff000000</color> <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="result_image_border">#ffffffff</color> <color name="result_minor_text">#ffc0c0c0</color> <color name="result_points">#c000ff00</color> <color name="result_text">#ffffffff</color> <color name="result_view">#b0000000</color> - <color name="sbc_header_text">#ff808080</color> - <color name="sbc_header_view">#ffffffff</color> - <color name="sbc_list_item">#fffff0e0</color> - <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="status_text">#ffffffff</color> <color name="transparent">#00000000</color> - <color name="viewfinder_frame">#ff000000</color> <color name="viewfinder_laser">#ffff0000</color> <color name="viewfinder_mask">#60000000</color> </resources> diff --git a/src/com/google/zxing/client/android/CaptureActivity.java b/src/com/google/zxing/client/android/CaptureActivity.java index 87179eba..029e4c90 100755 --- a/src/com/google/zxing/client/android/CaptureActivity.java +++ b/src/com/google/zxing/client/android/CaptureActivity.java @@ -474,12 +474,6 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal if (points != null && points.length > 0) { Canvas canvas = new Canvas(barcode); Paint paint = new Paint(); - paint.setColor(getResources().getColor(R.color.result_image_border)); - paint.setStrokeWidth(3.0f); - paint.setStyle(Paint.Style.STROKE); - Rect border = new Rect(2, 2, barcode.getWidth() - 2, barcode.getHeight() - 2); - canvas.drawRect(border, paint); - paint.setColor(getResources().getColor(R.color.result_points)); if (points.length == 2) { paint.setStrokeWidth(4.0f); diff --git a/src/com/google/zxing/client/android/ViewfinderView.java b/src/com/google/zxing/client/android/ViewfinderView.java index 5a9e8c04..050fd589 100755 --- a/src/com/google/zxing/client/android/ViewfinderView.java +++ b/src/com/google/zxing/client/android/ViewfinderView.java @@ -50,7 +50,6 @@ public final class ViewfinderView extends View { private Bitmap resultBitmap; private final int maskColor; private final int resultColor; - private final int frameColor; private final int laserColor; private final int resultPointColor; private int scannerAlpha; @@ -66,7 +65,6 @@ public final class ViewfinderView extends View { Resources resources = getResources(); maskColor = resources.getColor(R.color.viewfinder_mask); resultColor = resources.getColor(R.color.result_view); - frameColor = resources.getColor(R.color.viewfinder_frame); laserColor = resources.getColor(R.color.viewfinder_laser); resultPointColor = resources.getColor(R.color.possible_result_points); scannerAlpha = 0; @@ -103,13 +101,6 @@ public final class ViewfinderView extends View { canvas.drawBitmap(resultBitmap, null, frame, paint); } else { - // Draw a two pixel solid black border inside the framing rect - paint.setColor(frameColor); - canvas.drawRect(frame.left, frame.top, frame.right + 1, frame.top + 2, paint); - canvas.drawRect(frame.left, frame.top + 2, frame.left + 2, frame.bottom - 1, paint); - canvas.drawRect(frame.right - 1, frame.top, frame.right + 1, frame.bottom - 1, paint); - canvas.drawRect(frame.left, frame.bottom - 1, frame.right + 1, frame.bottom + 1, paint); - // Draw a red "laser scanner" line through the middle to show decoding is active paint.setColor(laserColor); paint.setAlpha(SCANNER_ALPHA[scannerAlpha]); |
