一、启动页面 AppStart
2013-06-27 11:19
204 查看
/** * 应用程序启动类:显示欢迎界面并跳转到主界面 * @author liux (http://my.oschina.net/liux) * @version 1.0 * @created 2012-3-21 */ public class AppStart extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final View view = View.inflate(this, R.layout.start, null); setContentView(view); //渐变展示启动屏 ------------------------------------------------------- 分析 1 AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f); aa.setDuration(2000); view.startAnimation(aa); aa.setAnimationListener(new AnimationListener() { @Override public void onAnimationEnd(Animation arg0) { redirectTo(); } @Override public void onAnimationRepeat(Animation animation) {} @Override public void onAnimationStart(Animation animation) {} }); //兼容低版本cookie(1.5版本以下,包括1.5.0,1.5.1) AppContext appContext = (AppContext)getApplication(); String cookie = appContext.getProperty("cookie"); //-----------------------------------------------分析 2 if(StringUtils.isEmpty(cookie)) { String cookie_name = appContext.getProperty("cookie_name"); String cookie_value = appContext.getProperty("cookie_value"); if(!StringUtils.isEmpty(cookie_name) && !StringUtils.isEmpty(cookie_value)) { cookie = cookie_name + "=" + cookie_value; appContext.setProperty("cookie", cookie); appContext.removeProperty("cookie_domain","cookie_name","cookie_value","cookie_version","cookie_path"); } } } /** * 跳转到... */ private void redirectTo(){ Intent intent = new Intent(this, Main.class); startActivity(intent); finish(); } }
1、动画渐变显示启动界面
2、获取cookie
appContext.getProperty("cookie") 调用流程:
动画结束后跳转到 Main
相关文章推荐
- Android Application Launch [ 创建进程--〉绑定App-->启动Activity/Start Service/...]
- 利用通知实现App从推送消息启动的页面跳转
- 网页判断判断是否安装APP并启动,没有安装就跳转到下载页面
- nexus资源库在安装完毕,启动时有时会出现:The nexus-webapp service was launched, but failed to start."错误
- PhoneGap 启动慢 未显示App页面前 黑屏处理解决方案
- app启动页面的问题
- 如何找到Android app启动activity和页面元素信息
- Nexus 启动失败 nexus-webapp service was launched, but failed to start.
- Android开发之提高应用启动速度splash页面瞬间响应 避免APP启动闪白屏
- app 启动页面
- iOS开发有关app启动时的动态页面展示(非启动页面)
- 摘要:App 启动加载广告页面思路
- App启动加载广告页面思路
- html5页面启动手机上的app
- Android 通过URL scheme 实现点击浏览器中的URL链接,启动特定的App,并调转页面传递参数
- 判断APP是否第一次启动,分别跳转不同页面
- Android从Web页面启动App
- 获取APP的Launch Image,实现启动页面的过渡动画。
- Nexus 启动失败 nexus-webapp service was launched, but failed to start.
- 关于app#启动页面#splash页面#开屏广告#的小结