繁体   English   中英

如何为Android应用创建标题屏幕? 例如,当应用程序像Facebook一样加载时

[英]How do you create a title screen for an android app? E.g. When the app is loading like Facebook

嗨,我正在开发一个应用程序,但是在应用程序启动时却找不到如何创建标题/加载屏幕的方法? 是新活动还是新功能? 任何帮助表示赞赏,谢谢。

您需要启动画面。 谷歌上有很多关于它的话题。

它实际上称为启动屏幕,应该类似于:

class SplashScreen extends Activity{
 /* in oncreate do all the function u want and after that finish this activity*/
public void oncreate(){
 new BackGroundProcess.execute(arguments)// async task to load data
 intent i = new Intent(SplashScreen.this,OtherActivity.class);
 startActivity(i);
 finish();
}
}

class BackGroundProcess extends AsyncTask<arguments>
{
       public onPreExecute(){
         // start your progress dialog here
       }
       public doInBackground(){
          //loadDataHere
       }
       public onPostExecute(){
         // stop your progress dialog here
       }
}

寻求帮助,您可以尝试这个这个

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM