mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Remove hard-coded colors as step towards importing Holo theme; remove borders to match Holo
git-svn-id: https://zxing.googlecode.com/svn/trunk@2399 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
9c3924fbc1
commit
726fa6ddfd
|
@ -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"/>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue