CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Reposted on 2016-11-08
by Abhi

Original Post

Original - Posted on 2016-11-08
by Abhi



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

[![enter image description here][1]][1] Like you tube.. initially they show icon screen instead of white screen. And after 2 seconds shows home screen.
first create an XML drawable in res/drawable.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/gray"/> <item> <bitmap android:gravity="center" android:src="@mipmap/ic_launcher"/> </item> </layer-list>


Next, you will set this as your splash activity’s background in the theme. Navigate to your styles.xml file and add a new theme for your splash activity
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> </style> <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:windowBackground">@drawable/background_splash</item> </style> </resources>

In your new SplashTheme, set the window background attribute to your XML drawable. Configure this as your splash activity’s theme in your AndroidManifest.xml:
<activity android:name=".SplashActivity" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
This link gives what you want. step by step procedure. [https://www.bignerdranch.com/blog/splash-screens-the-right-way/][1]

[1]: https://www.bignerdranch.com/blog/splash-screens-the-right-way/
[![enter image description here][1]][1]

Like you tube.. initially they show icon screen instead of white screen. And after 2 seconds shows home screen.
first create an XML drawable in res/drawable.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/gray"/> <item> <bitmap android:gravity="center" android:src="@mipmap/ic_launcher"/> </item> </layer-list>


Next, you will set this as your splash activity’s background in the theme. Navigate to your styles.xml file and add a new theme for your splash activity
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> </style> <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:windowBackground">@drawable/background_splash</item> </style> </resources>

In your new SplashTheme, set the window background attribute to your XML drawable. Configure this as your splash activity’s theme in your AndroidManifest.xml:
<activity android:name=".SplashActivity" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
This link gives what you want. step by step procedure. [https://www.bignerdranch.com/blog/splash-screens-the-right-way/][2]

[1]: https://i.stack.imgur.com/5jQIU.gif [2]: https://www.bignerdranch.com/blog/splash-screens-the-right-way/
**UPDATE:**
The `layer-list` can be even simpler like this (which also accepts vector drawables for the centered logo, unlike the `<bitmap>` tag):
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Background color --> <item android:drawable="@color/gray"/> <!-- Logo at the center of the screen --> <item android:drawable="@mipmap/ic_launcher" android:gravity="center"/> </layer-list>

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