v2.2.00
This commit is contained in:
parent
ca4e9e7ef0
commit
767d0d918d
9 changed files with 509 additions and 26 deletions
|
@ -6,7 +6,6 @@ import android.os.Bundle;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
|
@ -41,7 +40,7 @@ import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
|||
public class MainOptionsBottomSheetDialogFragment extends RoundedBottomSheetDialogFragment {
|
||||
|
||||
private static final String TAG = "MainOptionsBottomSheetD";
|
||||
private static ButterKnife.Setter<TextView, Integer> textColor = (view, value, index) -> view.setTextColor(ColorStateList.valueOf(value));
|
||||
private static ButterKnife.Setter<MaterialButton, Integer> textColor = (view, value, index) -> view.setTextColor(ColorStateList.valueOf(value));
|
||||
|
||||
|
||||
@BindViews({R.id.action_folders, R.id.action_about, R.id.action_buy_pro, R.id.action_rate,
|
||||
|
|
|
@ -174,12 +174,12 @@ public abstract class AbsThemeActivity extends ATHActivity implements Runnable {
|
|||
}
|
||||
|
||||
public void setImmersiveFullscreen() {
|
||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||
if (PreferenceUtil.getInstance().getFullScreenMode()) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(flags);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ import android.widget.FrameLayout;
|
|||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StyleRes;
|
||||
|
@ -22,6 +24,7 @@ import code.name.monkey.appthemehelper.ThemeStore;
|
|||
import code.name.monkey.appthemehelper.util.VersionUtils;
|
||||
import code.name.monkey.retromusic.R;
|
||||
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity;
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||
import code.name.monkey.retromusic.util.RetroUtil;
|
||||
|
||||
/**
|
||||
|
@ -30,23 +33,6 @@ import code.name.monkey.retromusic.util.RetroUtil;
|
|||
@SuppressLint("RestrictedApi")
|
||||
public class RoundedBottomSheetDialogFragment extends AppCompatDialogFragment {
|
||||
|
||||
/* @Override
|
||||
public int getTheme() {
|
||||
//noinspection ConstantConditions
|
||||
if (PreferenceUtil.getInstance().getGeneralTheme() == R.style.Theme_RetroMusic_Light) {
|
||||
return R.style.BottomSheetDialogTheme;
|
||||
} else if (PreferenceUtil.getInstance().getGeneralTheme() == R.style.Theme_RetroMusic_Color) {
|
||||
int color = ThemeStore.primaryColor(getContext());
|
||||
if (ColorUtil.isColorLight(color)) {
|
||||
return R.style.BottomSheetDialogTheme;
|
||||
} else {
|
||||
return R.style.BottomSheetDialogThemeDark;
|
||||
}
|
||||
} else {
|
||||
return R.style.BottomSheetDialogTheme;
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
@ -95,7 +81,7 @@ public class RoundedBottomSheetDialogFragment extends AppCompatDialogFragment {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
int width = getContext().getResources().getDimensionPixelSize(R.dimen.bottom_sheet_width);
|
||||
getWindow().setLayout(width > 0 ? width : ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
Objects.requireNonNull(getWindow()).setLayout(width > 0 ? width : ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue