CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2016-11-23
by nzala

Original Post

Original - Posted on 2014-11-27
by Suvitruf - Andrei Apanasik



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

Add an id to AppBarLayout. e.g `android:id=“@+id/mAppBarLayout”` Inside your activity (e.g. MainActivity.java) class-
Create a new variable
private AppBarLayout mAppBarLayout; Inside onCreate method add the following lines-
mAppBarLayout=(AppBarLayout)findViewById(R.id.mAppBarLayout); Now, add the following line to remove elevation-
mAppBarLayout.setElevation(0); /
You can set your own style for Activity for this:
<!-- Your main theme with ActionBar shadow. --> <style name="MyAppTheme" parent="android:Theme.Holo.Light"> .... </style> <!-- Theme without ActionBar shadow (inherits main theme) --> <style name="MyNoActionBarShadowTheme" parent="MyAppTheme"> <item name="windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item> </style> So in Manifest.xml you can set different style for all Activities:
<!-- Activity with ActionBar shadow --> <activity android:name=".ShadowActivity" android:theme="@style/MyAppTheme"/> <!-- Activity without ActionBar shadow --> <activity android:name=".NoShadowActivity" android:theme="@style/MyNoActionBarShadowTheme"/> Or you can set the right theme programmatically in onCreate() method:
@Override protected void onCreate(Bundle savedInstanceState) { setTheme(R.style.MyNoActionBarShadowTheme); super.onCreate(savedInstanceState); //... }
You can set your own style for Activity for this:
<!-- Your main theme with ActionBar shadow. --> <style name="MyAppTheme" parent="android:Theme.Holo.Light"> .... </style> <!-- Theme without ActionBar shadow (inherits main theme) --> <style name="MyNoActionBarShadowTheme" parent="MyAppTheme"> <item name="windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item> </style>

So in Manifest.xml you can set different style for all Activities:
<!-- Activity with ActionBar shadow --> <activity android:name=".ShadowActivity" android:theme="@style/MyAppTheme"/> <!-- Activity without ActionBar shadow --> <activity android:name=".NoShadowActivity" android:theme="@style/MyNoActionBarShadowTheme"/>


Or you can set the right theme programmatically in onCreate() method:
@Override protected void onCreate(Bundle savedInstanceState) { setTheme(R.style.MyNoActionBarShadowTheme); super.onCreate(savedInstanceState); //... }

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