Suppress some lint warnings that are ignorable

This commit is contained in:
Sean Owen 2014-03-23 10:41:14 +00:00
parent ed0ad2cd32
commit df4d768e23
9 changed files with 32 additions and 12 deletions

View file

@ -15,18 +15,21 @@
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:background="@color/encode_view"
android:orientation="horizontal"
android:gravity="center">
android:gravity="center"
tools:ignore="Overdraw">
<ImageView android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"
android:scaleType="center"/>
android:scaleType="center"
tools:ignore="ContentDescription"/>
<ScrollView android:layout_width="wrap_content"
android:layout_height="fill_parent"

View file

@ -15,6 +15,7 @@
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -42,7 +43,8 @@
android:layout_weight="1"
android:scaleType="center"
android:src="@drawable/share_via_barcode"
android:paddingRight="24dip"/>
android:paddingRight="24dip"
tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="0dip"

View file

@ -14,7 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<SurfaceView android:id="@+id/preview_view"
android:layout_width="fill_parent"
@ -54,7 +55,8 @@
android:maxHeight="150dip"
android:layout_marginBottom="@dimen/half_padding"
android:adjustViewBounds="true"
android:scaleType="centerInside"/>
android:scaleType="centerInside"
tools:ignore="ContentDescription"/>
<LinearLayout
android:orientation="horizontal"

View file

@ -15,6 +15,7 @@
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
@ -23,7 +24,8 @@
android:layout_width="64dip"
android:layout_height="64dip"
android:scaleType="centerInside"
android:padding="@dimen/half_padding"/>
android:padding="@dimen/half_padding"
tools:ignore="ContentDescription"/>
<TextView android:id="@+id/app_picker_list_item_label"
android:layout_width="wrap_content"

View file

@ -14,7 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<SurfaceView android:id="@+id/preview_view"
android:layout_width="fill_parent"
@ -54,7 +55,8 @@
android:maxHeight="160dip"
android:layout_marginBottom="@dimen/half_padding"
android:adjustViewBounds="true"
android:scaleType="centerInside"/>
android:scaleType="centerInside"
tools:ignore="ContentDescription"/>
<LinearLayout
android:orientation="horizontal"

View file

@ -16,18 +16,21 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:background="@color/encode_view"
android:orientation="vertical"
android:gravity="center">
android:gravity="center"
tools:ignore="Overdraw">
<ImageView android:id="@+id/image_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:scaleType="center"/>
android:scaleType="center"
tools:ignore="ContentDescription"/>
<ScrollView android:layout_width="fill_parent"
android:layout_height="wrap_content"

View file

@ -15,6 +15,7 @@
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
@ -32,7 +33,8 @@
android:layout_weight="1"
android:singleLine="true"
android:selectAllOnFocus="true"
android:inputType="text"/>
android:inputType="text"
tools:ignore="NestedWeights"/>
<Button android:id="@+id/query_button"
style="@android:style/Widget.Holo.Button.Borderless.Small"

View file

@ -17,6 +17,7 @@
<!-- ScrollView wrapper is to accommodate small screens. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -43,7 +44,8 @@
android:layout_height="wrap_content"
android:scaleType="center"
android:src="@drawable/share_via_barcode"
android:paddingBottom="@dimen/standard_padding"/>
android:paddingBottom="@dimen/standard_padding"
tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="fill_parent"

View file

@ -19,6 +19,7 @@ package com.google.zxing.client.android;
import com.google.zxing.ResultPoint;
import com.google.zxing.client.android.camera.CameraManager;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
@ -76,6 +77,7 @@ public final class ViewfinderView extends View {
this.cameraManager = cameraManager;
}
@SuppressLint("DrawAllocation")
@Override
public void onDraw(Canvas canvas) {
if (cameraManager == null) {