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.util.PreferenceUtil;
import com.melegy.redscreenofdeath.RedScreenOfDeath;
import org.jellyfin.apiclient.AppInfo;
import org.jellyfin.apiclient.Jellyfin;
@ -27,7 +26,6 @@ public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
RedScreenOfDeath.init(this);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
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) {
switch (state) {
case BottomSheetBehavior.STATE_SETTLING | BottomSheetBehavior.STATE_COLLAPSED:
Log.i(TAG, "onStateChanged: IS_SETTLING | IS_COLLAPSING");
PlayerBottomSheetFragment playerBottomSheetFragment = (PlayerBottomSheetFragment) getSupportFragmentManager().findFragmentByTag("PlayerBottomSheet");
if (playerBottomSheetFragment == null) break;
playerBottomSheetFragment.scrollOnTop();
break;
case BottomSheetBehavior.STATE_HIDDEN:

View file

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

View file

@ -18,55 +18,49 @@
android:paddingBottom="8dp">
<!-- Album -->
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="Albums" />
<TextView
android:id="@+id/album_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/album_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp" />
android:text="Albums" />
<TextView
android:id="@+id/album_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/album_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp" />
</LinearLayout>
<LinearLayout
@ -76,55 +70,49 @@
android:paddingBottom="8dp">
<!-- Artist -->
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="Artists" />
<TextView
android:id="@+id/artist_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/artist_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp" />
android:text="Artists" />
<TextView
android:id="@+id/artist_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/artist_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp" />
</LinearLayout>
<LinearLayout
@ -135,54 +123,47 @@
android:paddingBottom="8dp">
<!-- Genre -->
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="Genres" />
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="Genres" />
<TextView
android:id="@+id/genre_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/genre_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp" />
<TextView
android:id="@+id/genre_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/genre_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp" />
</LinearLayout>
<LinearLayout
@ -193,52 +174,46 @@
android:paddingBottom="8dp">
<!-- Playlist -->
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp">
<TextView
style="@style/HeadlineTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="Playlists" />
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="Playlists" />
<TextView
android:id="@+id/playlist_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
<TextView
android:id="@+id/playlist_catalogue_text_view_clickable"
style="@style/SubheadTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp"
android:text="See all" />
</LinearLayout>
<!-- slideview -->
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/playlist_view_pager"
android:layout_width="match_parent"
android:layout_height="212dp"
android:clipToPadding="false"
android:paddingTop="8dp"
android:paddingBottom="8dp" />
</LinearLayout>
<!-- slideview -->
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/playlist_view_pager"
android:layout_width="match_parent"
android:layout_height="212dp"
android:clipToPadding="false"
android:paddingTop="8dp"
android:paddingBottom="8dp" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>