Skip to content

Commit 0823948

Browse files
Fix all Lint errors and warnings
1 parent 606f06b commit 0823948

File tree

5 files changed

+29
-34
lines changed

5 files changed

+29
-34
lines changed

app/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ android {
1616
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1717
}
1818
}
19+
lintOptions {
20+
warningsAsErrors true
21+
}
1922
}
2023

2124
dependencies {

app/lint.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<lint>
3+
<issue id="GoogleAppIndexingWarning" severity="ignore"/>
4+
<issue id="GradleDependency" severity="informational"/>
5+
<issue id="OldTargetApi" severity="informational"/>
6+
</lint>

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<uses-permission android:name="android.permission.INTERNET" />
77

88
<application
9-
android:allowBackup="true"
9+
android:allowBackup="false"
10+
android:fullBackupContent="false"
1011
android:icon="@drawable/ic_launcher"
1112
android:label="@string/app_name"
1213
android:theme="@style/AppTheme"

app/src/main/java/name/cpr/ExampleActivity.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,15 @@ public void toggledFullscreen(boolean fullscreen)
5050
attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
5151
attrs.flags |= WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
5252
getWindow().setAttributes(attrs);
53-
if (android.os.Build.VERSION.SDK_INT >= 14)
54-
{
55-
//noinspection all
56-
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
57-
}
53+
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
5854
}
5955
else
6056
{
6157
WindowManager.LayoutParams attrs = getWindow().getAttributes();
6258
attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;
6359
attrs.flags &= ~WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
6460
getWindow().setAttributes(attrs);
65-
if (android.os.Build.VERSION.SDK_INT >= 14)
66-
{
67-
//noinspection all
68-
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
69-
}
61+
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
7062
}
7163

7264
}
Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1-
<RelativeLayout
1+
<LinearLayout
22
xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="match_parent"
44
android:layout_height="match_parent"
5-
android:background="#000000" >
5+
android:orientation="vertical"
6+
android:layout_centerInParent="true" >
67

7-
<LinearLayout
8+
<ProgressBar
89
android:layout_width="wrap_content"
910
android:layout_height="wrap_content"
10-
android:orientation="vertical"
11-
android:layout_centerInParent="true" >
11+
android:layout_gravity="center"
12+
android:indeterminate="true"
13+
style="?android:attr/progressBarStyleLarge" />
1214

13-
<ProgressBar
14-
android:layout_width="wrap_content"
15-
android:layout_height="wrap_content"
16-
android:layout_gravity="center"
17-
android:indeterminate="true"
18-
style="?android:attr/progressBarStyleLarge" />
19-
20-
<TextView
21-
android:layout_width="wrap_content"
22-
android:layout_height="wrap_content"
23-
android:layout_marginTop="8dp"
24-
android:layout_marginBottom="24dp"
25-
android:textAppearance="?android:attr/textAppearanceMedium"
26-
android:textColor="#a3a3a3"
27-
android:text="@string/loading_video" />
28-
29-
</LinearLayout>
15+
<TextView
16+
android:layout_width="wrap_content"
17+
android:layout_height="wrap_content"
18+
android:layout_marginTop="8dp"
19+
android:layout_marginBottom="24dp"
20+
android:textAppearance="?android:attr/textAppearanceMedium"
21+
android:textColor="#a3a3a3"
22+
android:text="@string/loading_video" />
3023

31-
</RelativeLayout>
24+
</LinearLayout>

0 commit comments

Comments
 (0)