Fixed tabs options

This commit is contained in:
h4h13 2019-07-31 12:18:55 +05:30
parent f3fb927dc0
commit 640ac4d4c3
5 changed files with 15 additions and 11 deletions

File diff suppressed because one or more lines are too long

View file

@ -15,11 +15,11 @@
package code.name.monkey.retromusic.adapter;
import android.annotation.SuppressLint;
import android.content.res.ColorStateList;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.TextView;
import android.widget.Toast;
@ -27,8 +27,11 @@ import androidx.annotation.NonNull;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.checkbox.MaterialCheckBox;
import java.util.List;
import code.name.monkey.appthemehelper.ThemeStore;
import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.model.CategoryInfo;
import code.name.monkey.retromusic.util.SwipeAndDragHelper;
@ -113,13 +116,14 @@ public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapte
}
static class ViewHolder extends RecyclerView.ViewHolder {
CheckBox checkBox;
MaterialCheckBox checkBox;
TextView title;
View dragView;
ViewHolder(View view) {
super(view);
checkBox = view.findViewById(R.id.checkbox);
checkBox.setBackgroundTintList(ColorStateList.valueOf(ThemeStore.Companion.accentColor(checkBox.getContext())));
title = view.findViewById(R.id.title);
dragView = view.findViewById(R.id.drag_view);
}

View file

@ -35,13 +35,13 @@ import java.util.*
class LibraryPreference : ATEDialogPreference {
constructor(context: Context) : super(context) {}
constructor(context: Context) : super(context)
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
init {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
@ -63,7 +63,7 @@ class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
if (savedInstanceState != null) {
categoryInfos = savedInstanceState.getParcelableArrayList(PreferenceUtil.LIBRARY_CATEGORIES)
} else {
categoryInfos = PreferenceUtil.getInstance().getLibraryCategoryInfos()
categoryInfos = PreferenceUtil.getInstance().libraryCategoryInfos
}
adapter = CategoryInfoAdapter(categoryInfos)
@ -73,7 +73,6 @@ class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
adapter.attachToRecyclerView(recyclerView)
return MaterialDialog(context!!, BottomSheet())
.title(code.name.monkey.retromusic.R.string.library_categories)
.customView(view = view)

View file

@ -355,6 +355,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
mediaButtonReceiverComponentName,
mediaButtonReceiverPendingIntent);
mediaSession.setCallback(new MediaSessionCompat.Callback() {
@Override
public void onPlay() {
play();

View file

@ -28,7 +28,7 @@
android:paddingRight="16dp"
tools:gravity="start|center_vertical">
<code.name.monkey.appthemehelper.common.views.ATECheckBox
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@ -37,7 +37,7 @@
android:focusable="false"
android:gravity="center_vertical" />
<TextView
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"