Fix for the small gap between statusbar and header for some users

This commit is contained in:
Karim Abou Zeid 2015-06-15 12:33:52 +02:00
commit 589f81d1c3
2 changed files with 4 additions and 3 deletions

View file

@ -26,8 +26,8 @@ android {
applicationId "com.kabouzeid.gramophone"
minSdkVersion 16
targetSdkVersion 22
versionCode 37
versionName "0.9.21b dev-1"
versionCode 38
versionName "0.9.22b dev-1"
}
buildTypes {

View file

@ -87,7 +87,8 @@ public abstract class AbsThemeActivity extends AppCompatActivity implements KabV
protected final void setStatusBarColor(int color) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
getWindow().setStatusBarColor(Util.shiftColorDown(color));
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// also do this on Lollipop in case the user modified the statusbar height
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
final View statusBar = getWindow().getDecorView().getRootView().findViewById(R.id.status_bar);
if (statusBar != null) statusBar.setBackgroundColor(color);
}