I am using the new Android Design Library based on this example chrisbanes/cheesesquare in github and here
I have run the example and I am having problems with Toolb
Here is some working workaround for API 21:
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
marginResult = 0;
int resourceId = getResources().getIdentifier(getString(R.string.identifier_status_bar_height), getString(R.string.identifier_dimen), getString(R.string.identifier_android));
if (resourceId > 0) {
marginResult = getResources().getDimensionPixelSize(resourceId)*2;
}
CollapsingToolbarLayout.LayoutParams params = (CollapsingToolbarLayout.LayoutParams) mToolbar.getLayoutParams();
params.topMargin -= marginResult;
mToolbar.setLayoutParams(params);}