How to reduce black screen while app starting in ionic 3?

Hi, Today I am going to teach how to reduce the black screen while app starting in ionic 3?

      While developing the app in ionic, before the splash screen one black or blank screen appears for a second.Here I am having a solution to how to overcome this issues.

       Below image is my problem I am facing while app starting.
     
screenshot_2017-10-20-17-57-13_720-1

Solution:
             Actually this, not an ionic framework issues. we want to change some style line in Android Manifest file we can overcome this issues.
 Go to platform/android/AndroidMainfest.xml .
And search android:theme="android:style/Theme.DeviceDefault.NoActionBar".

            Android will load a blank layout before it loads based on the theme you have set for it. The solution is to the theme of the splash activity to a transparent one.
          
And change it to like this android:theme="android:style/Theme.Translucent.NoActionBar".



How to reduce black screen while app starting in ionic 3? How to reduce black screen while app starting in ionic 3? Reviewed by Sudhan on November 08, 2017 Rating: 5

7 comments:

  1. Hi,
    Too bad it does not works for me.
    When I build I get this error : /platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:76:28-71: AAPT: String types not allowed (at 'theme' with value 'android:style/Theme.Translucent.NoActionBar').

    Any suggestion ?

    Alex.

    ReplyDelete
    Replies
    1. My error: AAPT: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Translucent.NoActionBar').



















      Delete
  2. can you pls show your platform/android/AndroidMainfest.xml file.

    ReplyDelete
  3. For ios any idea some black screen appear?

    ReplyDelete
  4. Sorry I needed to removed tags in order to posted AndroidMainfest.xml content.

    My error: AAPT: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Translucent.NoActionBar').

    xml version='1.0' encoding='utf-8'
    manifest android:hardwareAccelerated="true" android:versionCode="45" android:versionName="0.0.45" package="my.com.webbpages" xmlns:android="http://schemas.android.com/apk/res/android"
    supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"
    uses-permission android:name="android.permission.INTERNET"
    application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true"
    activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.Translucent.NoActionBar" android:windowSoftInputMode="adjustResize"
    intent-filter android:label="@string/launcher_name"
    action android:name="android.intent.action.MAIN"
    category android:name="android.intent.category.LAUNCHER"
    intent-filter
    activity
    activity android:name="com.sarriaroman.PhotoViewer.PhotoActivity" android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen"
    application
    uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"
    uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
    uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
    manifest

    ReplyDelete

LightBlog
Powered by Blogger.