I have an android app which displays a white screen for 2 seconds on startup. My other apps don't do this, but this one does. I have also implemented a splashscreen with the hope that it would fix this. Should I increase my splash screen sleep time? Thanks.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Make a style in you style.xml as follows :
and use it with your activity in AndroidManifest as:
Just mention the transparent theme to the starting activity in the AndroidManifest.xml file.
Like:
and extend that screen with
Activity
class in place ofAppCompatActivity
.like :
The white background is coming from the Apptheme.You can show something useful like your application logo instead of white screen.it can be done using custom theme.in your app Theme just add
attribute. The attribute value may be a image or layered list or any color.
You should read this great post by Cyril Mottier: Android App launching made gorgeous
You need to customise your
Theme
in style.xml and avoid to customise in youronCreate
as ActionBar.setIcon/setTitle/etc.See also the Documentation on Performance Tips by Google.
Use
Trace View
andHierarchy Viewer
to see the time to display your Views: Android Performance Optimization / Performance Tuning On AndroidUse
AsyncTask
to display some views.The user543 answer is perfect
But:
You'r LAUNCHER Activity must extands Activity, not AppCompatActivity as it came by default!
you should disable Instant Run android studio Settings.
File>Settings>Build,Execution, Deployment>Instant Run unCheck all options shown there.
Note: White screen Issue due to Instant Run is only for Debug builds,this Issue will not appear on release builds.