When the Android App is started, the image is being loaded (source code ),
, QQ, beautiful every day and other programs, displayed an image, and then jump to the relevant interface. This function is actually very simple ....
Create two new activities, LoadingActivity and MainActivity. Set LoadingActivity to android. intent. action. MAIN. Use TimerTesk or Thread to display LoadingActivity for several seconds and then jump to the MainActivity interface.
LoadingActivity:
new Timer().schedule(new TimerTask() {@Overridepublic void run() {startActivity(new Intent(LoadingActivity.this, MainActivity.class));finish();overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);}}, 2000);
Set the LoadingActivity Style
<style name="customLoading"> <item name="android:windowFullscreen">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowNoTitle">true</item> <item name="android:background">@drawable/loading</item></style>
Yes... of course there are many implementation methods. You should find them online.
Source code: http://download.csdn.net/detail/tangcheng_ OK /7616001
Original article, reproduced please indicate the source: http://blog.csdn.net/tangcheng_ OK