Prettify theme, add relaunch to settings on change
This commit is contained in:
parent
a1335aecfb
commit
835ef01a70
@ -135,20 +135,25 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||
mSelectedId = savedInstanceState == null ? mSelectedId : savedInstanceState.getInt(SELECTED_ITEM_ID);
|
||||
navigationView.setCheckedItem(mSelectedId);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
mDrawerHandler.removeCallbacksAndMessages(null);
|
||||
mDrawerHandler.postDelayed(() -> navigate(mSelectedId), 250);
|
||||
}
|
||||
|
||||
navigationView.setNavigationItemSelectedListener(this);
|
||||
|
||||
Bundle extras = getIntent().getExtras();
|
||||
if (extras != null) {
|
||||
navigate(R.id.settings);
|
||||
Logger.dh("MainActivity: Intent has extras " + getIntent().getExtras().getString("Relaunch"));
|
||||
String toLaunch = "";
|
||||
toLaunch = getIntent().getExtras().getString("Relaunch");
|
||||
if (toLaunch.equals("Settings")) {
|
||||
Logger.dh("MainActivity: Intent has extras " + getIntent().getExtras().getString("Relaunch"));
|
||||
mSelectedId = R.id.settings;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
mDrawerHandler.removeCallbacksAndMessages(null);
|
||||
navigate(mSelectedId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,7 +16,7 @@
|
||||
<color name="dh_primary">#3F51B5</color>
|
||||
<color name="dh_primary_dark">#303F9F</color>
|
||||
<color name="dh_primary_light">#C5CAE9</color>
|
||||
<color name="dh_accent">#9C6DFF</color>
|
||||
<color name="dh_accent">#448AFF</color>
|
||||
|
||||
<color name="dh_primary_text">#dedede</color>
|
||||
<color name="dh_secondary_text">#8A8A8A</color>
|
||||
@ -24,8 +24,8 @@
|
||||
<color name="dh_divider">#313131</color>
|
||||
<color name="dh_alertWarn">#FF9800</color>
|
||||
<color name="dh_alertOk">@color/dh_accent</color>
|
||||
<color name="dh_alertNeutral">#2196F3</color>
|
||||
<color name="dh_alertFail">#FF5722</color>
|
||||
<color name="dh_alertNeutral">@color/dh_primary_light</color>
|
||||
<color name="dh_alertFail">@color/red500</color>
|
||||
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user