CopyPastor

Detecting plagiarism made easy.

Score: 1.9958496512099466; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2016-10-20
by Nikunj Paradva

Original Post

Original - Posted on 2015-03-26
by Michael



            
Present in both answers; Present only in the new answer; Present only in the old answer;

This works perfectly for me
- - - -
// Create/Set toolbar as actionbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar);
// Check if the version of Android is Lollipop or higher if (Build.VERSION.SDK_INT >= 21) {
// Set the status bar to dark-semi-transparentish getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// Set paddingTop of toolbar to height of status bar. // Fixes statusbar covers toolbar issue toolbar.setPadding(0, getStatusBarHeight(), 0, 0); }
- - - -
// A method to find height of the status bar public int getStatusBarHeight() { int result = 0; int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) { result = getResources().getDimensionPixelSize(resourceId); } return result; } Reference [here](http://blog.raffaeu.com/archive/2015/04/11/android-and-the-transparent-status-bar.aspx) for more details
This works perfectly for me
- - - -
// Create/Set toolbar as actionbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar);
// Check if the version of Android is Lollipop or higher if (Build.VERSION.SDK_INT >= 21) {
// Set the status bar to dark-semi-transparentish getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// Set paddingTop of toolbar to height of status bar. // Fixes statusbar covers toolbar issue toolbar.setPadding(0, getStatusBarHeight(), 0, 0); }
- - - -
// A method to find height of the status bar public int getStatusBarHeight() { int result = 0; int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) { result = getResources().getDimensionPixelSize(resourceId); } return result; }

        
Present in both answers; Present only in the new answer; Present only in the old answer;