Skip to content

Commit 9cd16f0

Browse files
committed
Handle warnigns and errors from lint
1 parent c8154e9 commit 9cd16f0

File tree

9 files changed

+199
-132
lines changed

9 files changed

+199
-132
lines changed

app/app.iml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,17 @@
8686
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
8787
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
8888
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
89-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.0/jars" />
90-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.0/jars" />
91-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/24.2.0/jars" />
92-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/24.2.0/jars" />
93-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.0/jars" />
94-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.0/jars" />
95-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/24.2.0/jars" />
96-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/24.2.0/jars" />
97-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/24.2.0/jars" />
98-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.0/jars" />
99-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.0/jars" />
89+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars" />
91+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/24.2.1/jars" />
92+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/24.2.1/jars" />
93+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.1/jars" />
94+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.1/jars" />
95+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/24.2.1/jars" />
96+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/24.2.1/jars" />
97+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/24.2.1/jars" />
98+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars" />
99+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars" />
100100
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.nventify.imagizerandroid/ImagizerAndroidClient/0.1.1/jars" />
101101
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
102102
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
@@ -105,6 +105,7 @@
105105
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
106106
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
107107
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
108+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
108109
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
109110
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
110111
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
@@ -120,22 +121,22 @@
120121
<orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" />
121122
<orderEntry type="sourceFolder" forTests="false" />
122123
<orderEntry type="library" exported="" name="ImagizerClient-0.1.4" level="project" />
123-
<orderEntry type="library" exported="" name="support-media-compat-24.2.0" level="project" />
124-
<orderEntry type="library" exported="" name="recyclerview-v7-24.2.0" level="project" />
125-
<orderEntry type="library" exported="" name="support-compat-24.2.0" level="project" />
126-
<orderEntry type="library" exported="" name="support-v4-24.2.0" level="project" />
127-
<orderEntry type="library" exported="" name="support-core-ui-24.2.0" level="project" />
128-
<orderEntry type="library" exported="" name="support-core-utils-24.2.0" level="project" />
129-
<orderEntry type="library" exported="" name="appcompat-v7-24.2.0" level="project" />
124+
<orderEntry type="library" exported="" name="support-v4-24.2.1" level="project" />
125+
<orderEntry type="library" exported="" name="support-compat-24.2.1" level="project" />
126+
<orderEntry type="library" exported="" name="support-media-compat-24.2.1" level="project" />
127+
<orderEntry type="library" exported="" name="animated-vector-drawable-24.2.1" level="project" />
128+
<orderEntry type="library" exported="" name="support-fragment-24.2.1" level="project" />
129+
<orderEntry type="library" exported="" name="support-core-ui-24.2.1" level="project" />
130+
<orderEntry type="library" exported="" name="recyclerview-v7-24.2.1" level="project" />
131+
<orderEntry type="library" exported="" name="appcompat-v7-24.2.1" level="project" />
132+
<orderEntry type="library" exported="" name="support-vector-drawable-24.2.1" level="project" />
133+
<orderEntry type="library" exported="" name="support-core-utils-24.2.1" level="project" />
130134
<orderEntry type="library" exported="" name="jsr305-3.0.0" level="project" />
131135
<orderEntry type="library" exported="" name="universal-image-loader-1.9.5" level="project" />
132-
<orderEntry type="library" exported="" name="support-fragment-24.2.0" level="project" />
133-
<orderEntry type="library" exported="" name="support-annotations-24.2.0" level="project" />
134-
<orderEntry type="library" exported="" name="support-vector-drawable-24.2.0" level="project" />
135-
<orderEntry type="library" exported="" name="animated-vector-drawable-24.2.0" level="project" />
136-
<orderEntry type="library" exported="" name="design-24.2.0" level="project" />
136+
<orderEntry type="library" exported="" name="support-annotations-24.2.1" level="project" />
137137
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
138138
<orderEntry type="library" exported="" name="ImagizerAndroidClient-0.1.1" level="project" />
139139
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
140+
<orderEntry type="library" exported="" name="design-24.2.1" level="project" />
140141
</component>
141142
</module>

app/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ android {
1616
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1717
}
1818
}
19+
20+
lintOptions {
21+
disable 'GoogleAppIndexingWarning'
22+
disable 'IconMissingDensityFolder'
23+
}
1924
}
2025
dependencies {
2126
compile fileTree(dir: 'libs', include: ['*.jar'])
2227
testCompile 'junit:junit:4.12'
23-
compile 'com.android.support:appcompat-v7:24.2.0'
24-
compile 'com.android.support:design:24.2.0'
28+
compile 'com.android.support:appcompat-v7:24.2.1'
29+
compile 'com.android.support:design:24.2.1'
2530
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'
2631
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
2732
compile 'com.nventify.imagizerandroid:ImagizerAndroidClient:0.1.1'

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.nventfiy.imagizerandroidexample">
4-
54
<uses-permission android:name="android.permission.INTERNET" />
65

6+
77
<application
88
android:name=".MyApplication"
9-
android:allowBackup="true"
109
android:configChanges="orientation|keyboardHidden"
1110
android:icon="@mipmap/ic_launcher"
1211
android:label="@string/app_name"

app/src/main/res/drawable/my_drawable.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

app/src/main/res/layout/content_compare.xml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,45 @@
3030
<ToggleButton
3131
android:layout_width="80dp"
3232
android:layout_height="wrap_content"
33-
android:text="Imagizer"
33+
android:text="@string/imagizer"
3434
android:id="@+id/switch1"
3535
android:checked="false"
3636
android:textOff="Imagizer"
3737
android:textOn="Imagizer"
3838
android:layout_alignParentLeft="true"
3939
android:layout_alignParentStart="true"
4040
android:layout_alignParentTop="true"
41-
android:textSize="12dp" />
41+
android:textSize="12sp" />
4242

4343
<ToggleButton
4444
android:layout_width="60dp"
4545
android:layout_height="wrap_content"
46-
android:text="Webp"
46+
android:text="@string/webp"
4747
android:id="@+id/switch2"
4848
android:checked="false"
4949
android:textOff="Webp"
5050
android:textOn="Webp"
5151
android:layout_toEndOf="@+id/switch1"
52-
android:textSize="12dp" />
52+
android:layout_toRightOf="@+id/switch1"
53+
android:textSize="12sp"
54+
/>
5355

5456
<TextView
5557
android:id="@+id/qualityLabel"
5658
android:layout_width="wrap_content"
5759
android:layout_height="wrap_content"
58-
android:layout_gravity="right"
60+
android:layout_gravity="end"
5961
android:paddingTop="4dp"
60-
android:text="Quality: "
62+
android:text="@string/quality"
6163
android:textAppearance="?android:attr/textAppearanceSmall"
6264
android:textColor="#000000"
6365
android:layout_alignWithParentIfMissing="false"
6466
android:layout_alignParentTop="false"
6567
android:layout_toLeftOf="@+id/spinner"
6668
android:layout_toStartOf="@+id/spinner"
6769
android:labelFor="@id/spinner"
68-
android:layout_marginTop="14dp" />
70+
android:layout_marginTop="14dp"
71+
tools:ignore="RelativeOverlap" />
6972

7073
<Spinner
7174
android:id="@+id/spinner"
@@ -76,7 +79,7 @@
7679
android:layout_alignParentRight="true"
7780
android:layout_alignParentEnd="true"
7881
android:layout_alignTop="@+id/qualityLabel"
79-
android:gravity="right" />
82+
android:gravity="end" />
8083

8184
</RelativeLayout>
8285

@@ -110,7 +113,7 @@
110113
android:layout_width="wrap_content"
111114
android:layout_height="wrap_content"
112115
android:layout_gravity="start"
113-
android:text="Original download size:"
116+
android:text="@string/original_download_size"
114117
android:textAppearance="?android:attr/textAppearanceMedium" />
115118

116119
<Space />
@@ -120,7 +123,7 @@
120123
android:layout_width="wrap_content"
121124
android:layout_height="wrap_content"
122125
android:layout_gravity="end"
123-
android:text="0 kb"
126+
android:text="@string/_0_kb"
124127
android:textAppearance="?android:attr/textAppearanceMedium" />
125128
</TableRow>
126129

@@ -131,7 +134,7 @@
131134
android:layout_width="wrap_content"
132135
android:layout_height="wrap_content"
133136
android:layout_gravity="start"
134-
android:text="Imagizer download size:"
137+
android:text="@string/imagizer_download_size"
135138
android:textAppearance="?android:attr/textAppearanceMedium" />
136139

137140
<Space />
@@ -141,7 +144,7 @@
141144
android:layout_width="wrap_content"
142145
android:layout_height="wrap_content"
143146
android:layout_gravity="end"
144-
android:text="0 kb"
147+
android:text="@string/_0_kb"
145148
android:textAppearance="?android:attr/textAppearanceMedium" />
146149
</TableRow>
147150

@@ -152,7 +155,7 @@
152155
android:layout_width="wrap_content"
153156
android:layout_height="wrap_content"
154157
android:layout_gravity="start"
155-
android:text="Size reduction:"
158+
android:text="@string/size_reduction"
156159
android:textAppearance="?android:attr/textAppearanceMedium" />
157160

158161
<Space />
@@ -162,7 +165,7 @@
162165
android:layout_width="wrap_content"
163166
android:layout_height="wrap_content"
164167
android:layout_gravity="end"
165-
android:text="0%"
168+
android:text="@string/_0"
166169
android:textAppearance="?android:attr/textAppearanceMedium" />
167170
</TableRow>
168171

@@ -175,9 +178,10 @@
175178
android:layout_alignParentLeft="true"
176179
android:layout_alignParentStart="true"
177180
android:layout_below="@+id/tableLayout2"
178-
android:layout_marginTop="10dp" />
181+
android:layout_marginTop="10dp"
182+
tools:ignore="ContentDescription" />
179183

180-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
184+
<LinearLayout
181185
android:id="@+id/linearLayout"
182186
android:layout_width="match_parent"
183187
android:layout_height="wrap_content"
@@ -193,7 +197,8 @@
193197
android:layout_marginEnd="5dp"
194198
android:layout_marginRight="5dp"
195199
android:layout_marginTop="8dp"
196-
android:layout_weight="50" />
200+
android:layout_weight="50"
201+
tools:ignore="ContentDescription" />
197202

198203
<ImageView
199204
android:id="@+id/imageView3"
@@ -202,7 +207,8 @@
202207
android:layout_marginLeft="5dp"
203208
android:layout_marginStart="5dp"
204209
android:layout_marginTop="7dp"
205-
android:layout_weight="50" />
210+
android:layout_weight="50"
211+
tools:ignore="ContentDescription" />
206212

207213
</LinearLayout>
208214

@@ -216,7 +222,7 @@
216222
android:layout_marginTop="10dp"
217223
tools:ignore="ContentDescription" />
218224

219-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
225+
<LinearLayout
220226
android:layout_below="@+id/imageView4"
221227
android:layout_width="match_parent"
222228
android:layout_height="wrap_content"
@@ -234,7 +240,8 @@
234240
android:layout_marginEnd="5dp"
235241
android:layout_marginRight="5dp"
236242
android:layout_marginTop="10dp"
237-
android:layout_weight="50" />
243+
android:layout_weight="50"
244+
tools:ignore="ContentDescription" />
238245

239246
<ImageView
240247
android:id="@+id/imageView6"
@@ -257,7 +264,7 @@
257264
android:layout_marginTop="10dp"
258265
tools:ignore="ContentDescription" />
259266

260-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
267+
<LinearLayout
261268
android:layout_width="match_parent"
262269
android:layout_height="wrap_content"
263270
android:layout_alignParentLeft="true"

0 commit comments

Comments
 (0)