Skip to content

Commit

Permalink
Fix for weird effects on some devices
Browse files Browse the repository at this point in the history
- Use margin instead of padding for the TranslucentStyle. Padding was messing up on some devices
  • Loading branch information
rubengees committed Feb 5, 2016
1 parent fb2d61f commit 1b25f5c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {
}
dependencies {
compile ('com.github.rubengees:introduction:1.1.5@aar'){
compile ('com.github.rubengees:introduction:1.1.6@aar'){
transitive = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha8'
classpath 'com.android.tools.build:gradle:2.0.0-beta2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 10
targetSdkVersion 23
versionCode 11
versionName "1.1.5"
versionCode 12
versionName "1.1.6"
consumerProguardFiles 'proguard-rules.pro'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ public void applyStyleOnActivityView(@NonNull Activity activity, @NonNull ViewGr
SystemBarTintManager tintManager = new SystemBarTintManager(activity);
SystemBarTintManager.SystemBarConfig config = tintManager.getConfig();

RelativeLayout.LayoutParams params =
(RelativeLayout.LayoutParams) bottomBar.getLayoutParams();
params.height = params.height + config.getPixelInsetBottom();
bottomBar.setLayoutParams(params);

bottomBar.setPadding(0, -config.getPixelInsetBottom(), config.getPixelInsetRight(), 0);
RelativeLayout.MarginLayoutParams params =
(RelativeLayout.MarginLayoutParams) bottomBar.getLayoutParams();
params.bottomMargin = params.bottomMargin + config.getPixelInsetBottom();
params.rightMargin = params.rightMargin + config.getPixelInsetRight();
}

@Override
Expand Down

0 comments on commit 1b25f5c

Please sign in to comment.