-
-
Save medhdj/19a1dc3a23af71cb18ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//change de.keyboardsurfer.android.widget.crouton.Manager class | |
// add this method below 'handleTranslucentActionBar()' method | |
private void handleActionBarOverlay(ViewGroup.MarginLayoutParams params, Activity activity) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { | |
final boolean flags = activity.getWindow().hasFeature(Window.FEATURE_ACTION_BAR_OVERLAY); | |
if (flags) { | |
final int actionBarContainerId = Resources.getSystem().getIdentifier("action_bar_container", "id", "android"); | |
final View actionBarContainer = activity.findViewById(actionBarContainerId); | |
// The action bar is present: the app is using a Holo theme. | |
if (actionBarContainer != null) { | |
final ViewGroup.MarginLayoutParams marginParams = (ViewGroup.MarginLayoutParams) params; | |
marginParams.topMargin = actionBarContainer.getBottom(); | |
} | |
} | |
} | |
} | |
//add call the method(below handleTranslucentActionBar call position): | |
handleTranslucentActionBar((ViewGroup.MarginLayoutParams) params, activity); | |
handleActionBarOverlay((ViewGroup.MarginLayoutParams) params, activity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment