0

I checkout code from svn and I resolved the run time issues and run the application. Then for me blank screen is coming for every first launch the app and for others it's not happening.

I added below line to fix runtime error

aaptOptions {
        cruncherEnabled = false
}
Jon Adams
  • 24,464
  • 18
  • 82
  • 120
Subramanyam G
  • 103
  • 1
  • 1
  • 10

3 Answers3

1

Add the following theme in your styles.xml and apply it for the splash Activity

<style name="AppTranslucent" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
    <item name="android:windowIsTranslucent">true</item>
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>
LvN
  • 701
  • 1
  • 6
  • 22
  • But my SplashActivity is extending FragmentActivity and I have to use the same one. Becasue customer is not accepting to change the AppcompatAcitivity. – Subramanyam G Jul 20 '16 at 14:29
  • FragmentActivity is the parent class of AppCompatActivity so there is no problem in using both. Were you able to run your app with the above theme.? – LvN Jul 21 '16 at 04:52
0

Add this in your style.xml,

<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">

    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowIsTranslucent">true</item>

</style>

In manifest file, call this style.xml as android:theme="@style/Theme.Transparent" within your Splash screen activity

It will solve your problem.

Andolasoft Inc
  • 1,296
  • 1
  • 7
  • 16
  • But my SplashActivity is extending FragmentActivity and I have to use the same one. Becasue customer is not accepting to change the AppcompatAcitivity. – Subramanyam G Jul 20 '16 at 14:29
0

Try this.. Add the NoTitleBar theme to you Splash

   <activity

        android:name=".SplashScreenActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"
    / >
Arjun saini
  • 4,223
  • 3
  • 23
  • 51