Fix queue changing
This commit is contained in:
parent
69c76556a2
commit
891f1bce34
34 changed files with 1007 additions and 132 deletions
|
@ -56,7 +56,7 @@ public class LicenseActivity extends AbsBaseActivity {
|
|||
WebView webView = findViewById(R.id.license);
|
||||
try {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
InputStream json = getAssets().open("index.html");
|
||||
InputStream json = getAssets().open("oldindex.html");
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(json, StandardCharsets.UTF_8));
|
||||
String str;
|
||||
while ((str = in.readLine()) != null) {
|
||||
|
|
|
@ -121,8 +121,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
}
|
||||
};
|
||||
private final IntentFilter mIntentFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);
|
||||
@Nullable
|
||||
MainActivityFragmentCallbacks currentFragment;
|
||||
private MainActivityFragmentCallbacks currentFragment;
|
||||
private boolean blockRequestPermissions = false;
|
||||
private MaterialCab cab;
|
||||
private AppBarLayout mAppBarLayout;
|
||||
|
@ -231,11 +230,9 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
registerReceiver(mBroadcastReceiver, mIntentFilter);
|
||||
PreferenceUtil.getInstance(this).registerOnSharedPreferenceChangedListener(this);
|
||||
|
||||
if (getIntent().hasExtra(EXPAND_PANEL) && PreferenceUtil.getInstance(this).isExpandPanel()) {
|
||||
if (getIntent().getBooleanExtra(EXPAND_PANEL, false)) {
|
||||
expandPanel();
|
||||
getIntent().putExtra(EXPAND_PANEL, false);
|
||||
}
|
||||
if (getIntent().hasExtra(EXPAND_PANEL) && getIntent().getBooleanExtra(EXPAND_PANEL, false) && PreferenceUtil.getInstance(this).isExpandPanel()) {
|
||||
expandPanel();
|
||||
getIntent().putExtra(EXPAND_PANEL, false);
|
||||
}
|
||||
appUpdateManager.getAppUpdateInfo()
|
||||
.addOnSuccessListener(appUpdateInfo -> {
|
||||
|
|
|
@ -32,12 +32,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil;
|
|||
|
||||
public class WhatsNewActivity extends AbsBaseActivity {
|
||||
|
||||
AppBarLayout appBarLayout;
|
||||
|
||||
Toolbar toolbar;
|
||||
|
||||
WebView webView;
|
||||
|
||||
private static String colorToCSS(int color) {
|
||||
return String.format(Locale.getDefault(), "rgba(%d, %d, %d, %d)", Color.red(color), Color.green(color),
|
||||
Color.blue(color), Color.alpha(color)); // on API 29, WebView doesn't load with hex colors
|
||||
|
@ -62,9 +56,9 @@ public class WhatsNewActivity extends AbsBaseActivity {
|
|||
setNavigationbarColorAuto();
|
||||
setTaskDescriptionColorAuto();
|
||||
|
||||
webView = findViewById(R.id.webView);
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
appBarLayout = findViewById(R.id.appBarLayout);
|
||||
WebView webView = findViewById(R.id.webView);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
AppBarLayout appBarLayout = findViewById(R.id.appBarLayout);
|
||||
|
||||
toolbar.setBackgroundColor(ATHUtil.INSTANCE.resolveColor(this, R.attr.colorSurface));
|
||||
//setSupportActionBar(toolbar);
|
||||
|
@ -92,7 +86,7 @@ public class WhatsNewActivity extends AbsBaseActivity {
|
|||
final String accentColorString = colorToCSS(ThemeStore.Companion.accentColor(this));
|
||||
final String accentTextColor = colorToCSS(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.INSTANCE.isColorLight(accentColor)));
|
||||
final String changeLog = buf.toString()
|
||||
.replace("{style-placeholder}", String.format("body { background-color: %s; color: %s; } li {color: %s;} .colorHeader {background-color: %s; color: %s;} .tag {color: %s;}", backgroundColor, contentColor, textColor, accentColorString, accentTextColor,accentColorString ))
|
||||
.replace("{style-placeholder}", String.format("body { background-color: %s; color: %s; } li {color: %s;} .colorHeader {background-color: %s; color: %s;} .tag {color: %s;}", backgroundColor, contentColor, textColor, accentColorString, accentTextColor, accentColorString))
|
||||
.replace("{link-color}", colorToCSS(ThemeStore.Companion.accentColor(this)))
|
||||
.replace("{link-color-active}", colorToCSS(ColorUtil.INSTANCE.lightenColor(ThemeStore.Companion.accentColor(this))));
|
||||
webView.loadData(changeLog, "text/html", "UTF-8");
|
||||
|
|
|
@ -18,6 +18,7 @@ import code.name.monkey.retromusic.fragments.MiniPlayerFragment
|
|||
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen.*
|
||||
import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
|
||||
import code.name.monkey.retromusic.fragments.player.TestPlayerFragment
|
||||
import code.name.monkey.retromusic.fragments.player.adaptive.AdaptiveFragment
|
||||
import code.name.monkey.retromusic.fragments.player.blur.BlurPlayerFragment
|
||||
import code.name.monkey.retromusic.fragments.player.card.CardFragment
|
||||
|
@ -241,6 +242,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(),
|
|||
TINY -> TinyPlayerFragment()
|
||||
PEAK -> PeakPlayerFragment()
|
||||
CIRCLE -> CirclePlayerFragment()
|
||||
EXAMPLE -> TestPlayerFragment()
|
||||
else -> PlayerFragment()
|
||||
} // must implement AbsPlayerFragment
|
||||
supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue