Fix some lint problems

This commit is contained in:
CappielloAntonio 2021-04-27 11:47:23 +02:00
parent c5ad7f282e
commit 81581c623d
4 changed files with 133 additions and 162 deletions

View file

@ -8,7 +8,6 @@ import androidx.preference.PreferenceManager;
import com.cappielloantonio.play.helper.ThemeHelper; import com.cappielloantonio.play.helper.ThemeHelper;
import com.cappielloantonio.play.util.PreferenceUtil; import com.cappielloantonio.play.util.PreferenceUtil;
import com.melegy.redscreenofdeath.RedScreenOfDeath;
import org.jellyfin.apiclient.AppInfo; import org.jellyfin.apiclient.AppInfo;
import org.jellyfin.apiclient.Jellyfin; import org.jellyfin.apiclient.Jellyfin;
@ -27,7 +26,6 @@ public class App extends Application {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
RedScreenOfDeath.init(this);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
String themePref = sharedPreferences.getString("themePref", ThemeHelper.DEFAULT_MODE); String themePref = sharedPreferences.getString("themePref", ThemeHelper.DEFAULT_MODE);

View file

@ -171,10 +171,8 @@ public class MainActivity extends BaseActivity {
public void onStateChanged(@NonNull View view, int state) { public void onStateChanged(@NonNull View view, int state) {
switch (state) { switch (state) {
case BottomSheetBehavior.STATE_SETTLING | BottomSheetBehavior.STATE_COLLAPSED: case BottomSheetBehavior.STATE_SETTLING | BottomSheetBehavior.STATE_COLLAPSED:
Log.i(TAG, "onStateChanged: IS_SETTLING | IS_COLLAPSING");
PlayerBottomSheetFragment playerBottomSheetFragment = (PlayerBottomSheetFragment) getSupportFragmentManager().findFragmentByTag("PlayerBottomSheet"); PlayerBottomSheetFragment playerBottomSheetFragment = (PlayerBottomSheetFragment) getSupportFragmentManager().findFragmentByTag("PlayerBottomSheet");
if (playerBottomSheetFragment == null) break; if (playerBottomSheetFragment == null) break;
playerBottomSheetFragment.scrollOnTop(); playerBottomSheetFragment.scrollOnTop();
break; break;
case BottomSheetBehavior.STATE_HIDDEN: case BottomSheetBehavior.STATE_HIDDEN:

View file

@ -48,6 +48,6 @@
android:gravity="center" android:gravity="center"
android:text="Offline mode" android:text="Offline mode"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="6dp" android:textSize="6sp"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>

View file

@ -18,11 +18,6 @@
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<!-- Album --> <!-- Album -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Label and button --> <!-- Label and button -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -67,7 +62,6 @@
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:paddingBottom="8dp" /> android:paddingBottom="8dp" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -76,11 +70,6 @@
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<!-- Artist --> <!-- Artist -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Label and button --> <!-- Label and button -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -125,7 +114,6 @@
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:paddingBottom="8dp" /> android:paddingBottom="8dp" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/library_genres_sector" android:id="@+id/library_genres_sector"
@ -135,11 +123,6 @@
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<!-- Genre --> <!-- Genre -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Label and button --> <!-- Label and button -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -181,8 +164,6 @@
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingEnd="8dp" /> android:paddingEnd="8dp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -193,11 +174,6 @@
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<!-- Playlist --> <!-- Playlist -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Label and button --> <!-- Label and button -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -240,5 +216,4 @@
android:paddingBottom="8dp" /> android:paddingBottom="8dp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>