提交 9492f8bb 编写于 作者: R Robert Papp

Fix LINT warnings and errors

上级 2a77dcba
......@@ -151,7 +151,7 @@ public class LruBitmapPool implements BitmapPool {
@Override
public void clearMemory() {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "clearMemory");
}
trimToSize(0);
......@@ -160,7 +160,7 @@ public class LruBitmapPool implements BitmapPool {
@SuppressLint("InlinedApi")
@Override
public void trimMemory(int level) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "trimMemory, level=" + level);
}
if (level >= android.content.ComponentCallbacks2.TRIM_MEMORY_MODERATE) {
......
......@@ -31,6 +31,7 @@ public final class BitmapPreFiller {
this.defaultFormat = defaultFormat;
}
@SuppressWarnings("deprecation")
public void preFill(PreFillType.Builder... bitmapAttributeBuilders) {
if (current != null) {
current.cancel();
......
......@@ -188,6 +188,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
if (degreesToRotate == 90 || degreesToRotate == 270) {
// If we're rotating the image +-90 degrees, we need to downsample accordingly so the image width is
// decreased to near our target's height and the image height is decreased to near our target width.
//noinspection SuspiciousNameCombination
exactSampleSize = getSampleSize(inHeight, inWidth, targetWidth, targetHeight);
} else {
exactSampleSize = getSampleSize(inWidth, inHeight, targetWidth, targetHeight);
......@@ -247,6 +248,7 @@ public abstract class Downsampler implements BitmapDecoder<InputStream> {
return false;
}
@SuppressWarnings("deprecation")
private static Bitmap.Config getConfig(InputStream is, DecodeFormat format) {
// Changing configs can cause skewing on 4.1, see issue #128.
if (format == DecodeFormat.ALWAYS_ARGB_8888 || format == DecodeFormat.PREFER_ARGB_8888
......
......@@ -7,7 +7,7 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:icon="@android:drawable/sym_def_app_icon"
android:allowBackup="false"
android:theme="@style/Theme.AppCompat">
......
......@@ -14,6 +14,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:cursorVisible="true"
android:textSize="16sp"
......
......@@ -2,4 +2,6 @@
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fullscreen_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:contentDescription="@string/fullscreen_description"
/>
......@@ -8,4 +8,5 @@
<string name="medium">Medium</string>
<string name="list">List</string>
<string name="image_description">An image from the list of results for a search query</string>
<string name="fullscreen_description">Full screen view of an image</string>
</resources>
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
dependencies {
compile project(':library')
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.code.gson:gson:2.3'
}
android {
......
......@@ -5,7 +5,7 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@android:drawable/sym_def_app_icon"
android:largeHeap="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
......
......@@ -3,4 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fullscreen_gif"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:contentDescription="@string/fullscreen_description"
/>
......@@ -3,4 +3,5 @@
<string name="app_name">GiphySample</string>
<string name="image_description">An image from the list of results for a search query</string>
<string name="giphy_logo_description">An animated version of the Giphy company logo</string>
<string name="fullscreen_description">Full screen view of an image</string>
</resources>
......@@ -6,7 +6,7 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@android:drawable/sym_def_app_icon"
android:label="@string/app_name">
<activity
android:name=".MainActivity"
......
......@@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:src="@drawable/ic_launcher"
android:src="@android:drawable/sym_def_app_icon"
android:gravity="center" />
</item>
<item android:top="20dp" android:bottom="20dp" android:drawable="@drawable/dot_dot_dot" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册