Merge "Only adds translucent status bar according to theme values." into nyc-dev
am: 9cf94182fc
* commit '9cf94182fce16a7de28369263b5ced06a989f71e':
Only adds translucent status bar according to theme values.
This commit is contained in:
@@ -69,16 +69,18 @@ public class SettingsDrawerActivity extends Activity {
|
|||||||
|
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
getWindow().addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
TypedArray theme = getTheme().obtainStyledAttributes(android.R.styleable.Theme);
|
||||||
getWindow().addFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
if (!theme.getBoolean(android.R.styleable.Theme_windowNoTitle, false)) {
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
getWindow().addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||||
|
getWindow().addFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||||
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
}
|
||||||
super.setContentView(R.layout.settings_with_drawer);
|
super.setContentView(R.layout.settings_with_drawer);
|
||||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
if (mDrawerLayout == null) {
|
if (mDrawerLayout == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.action_bar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.action_bar);
|
||||||
TypedArray theme = getTheme().obtainStyledAttributes(android.R.styleable.Theme);
|
|
||||||
if (theme.getBoolean(android.R.styleable.Theme_windowNoTitle, false)) {
|
if (theme.getBoolean(android.R.styleable.Theme_windowNoTitle, false)) {
|
||||||
toolbar.setVisibility(View.GONE);
|
toolbar.setVisibility(View.GONE);
|
||||||
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||||
|
|||||||
Reference in New Issue
Block a user