成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

高仿小米商城splash動畫

移動開發
高仿小米商城splash界面,動畫效果和小米商城完全一樣,僅限于學習交流使用,請勿做其他用途。

源碼簡介

高仿小米商城splash界面,動畫效果和小米商城完全一樣,僅限于學習交流使用,請勿做其他用途。
源碼運行截圖

源碼片段:

  1. package com.example.testsplashview; 
  2.   
  3. import android.content.BroadcastReceiver; 
  4. import android.content.Context; 
  5. import android.content.Intent; 
  6. import android.content.IntentFilter; 
  7. import android.os.Bundle; 
  8. import android.os.Handler; 
  9. import android.support.v4.app.Fragment; 
  10. import android.support.v4.app.FragmentActivity; 
  11. import android.support.v4.app.FragmentManager; 
  12. import android.support.v4.app.FragmentTransaction; 
  13. import android.support.v4.content.LocalBroadcastManager; 
  14. import android.widget.Toast; 
  15.   
  16. public class WelcomeActivity extends FragmentActivity 
  17.   private static final long EXIT_DURATION_BETWEEN_BACKKEY_PRESSED = 1000L; 
  18.   private int mBackKeyPressedCount; 
  19.   private Fragment[] mFragments; 
  20.   private BroadcastReceiver mPageShowReceiver = new BroadcastReceiver() { 
  21.       
  22.     @Override 
  23.     public void onReceive(Context context, Intent paramIntent) { 
  24.                String str = paramIntent.getAction(); 
  25.               if("page0_animation_done".equals(str)){ 
  26.                   Intent intent =new Intent(); 
  27.                   intent.setClass(getApplicationContext(), MainActivity.class); 
  28.                   startActivity(intent); 
  29.                   finish(); 
  30.               } 
  31.               if ("page1_animation_done".equals(str)) 
  32.                 getSupportFragmentManager().beginTransaction().remove(page1).commitAllowingStateLoss(); 
  33.               if ("page2_animation_done".equals(str)) 
  34.                 getSupportFragmentManager().beginTransaction().remove(page2).commitAllowingStateLoss(); 
  35.               if ("page3_animation_done".equals(str)) 
  36.                 getSupportFragmentManager().beginTransaction().remove(page3).commitAllowingStateLoss(); 
  37.               if ("page4_animation_done".equals(str)) 
  38.                 getSupportFragmentManager().beginTransaction().remove(page4).commitAllowingStateLoss(); 
  39.     } 
  40. }; 
  41.   private BaseInShowPage page0; 
  42.   private BaseInShowPage page1; 
  43.   private BaseInShowPage page2; 
  44.   private BaseInShowPage page3; 
  45.   private BaseInShowPage page4; 
  46.   @Override 
  47.   public void onBackPressed() 
  48.   { 
  49.     mBackKeyPressedCount = (1 + mBackKeyPressedCount); 
  50.     if (mBackKeyPressedCount == 2){ 
  51.       finish(); 
  52.     }else
  53.       new Handler().postDelayed(new Runnable() { 
  54.           
  55.         @Override 
  56.         public void run() { 
  57.             mBackKeyPressedCount = 0
  58.         } 
  59.       }, EXIT_DURATION_BETWEEN_BACKKEY_PRESSED); 
  60.     } 
  61.   } 
  62.   @Override 
  63.   protected void onCreate(Bundle paramBundle) 
  64.   { 
  65.     super.onCreate(paramBundle); 
  66.     setContentView(R.layout.welcome_fragment); 
  67.     IntentFilter localIntentFilter = new IntentFilter(); 
  68.     localIntentFilter.addAction("page0_animation_done"); 
  69.     localIntentFilter.addAction("page1_animation_done"); 
  70.     localIntentFilter.addAction("page2_animation_done"); 
  71.     localIntentFilter.addAction("page3_animation_done"); 
  72.     localIntentFilter.addAction("page4_animation_done"); 
  73.     LocalBroadcastManager.getInstance(this).registerReceiver(mPageShowReceiver, localIntentFilter); 
  74.     if (paramBundle != null
  75.       return
  76.     page4 = new Page4(); 
  77.     page3 = new Page3(); 
  78.     page2 = new Page2(); 
  79.     page1 = new Page1(); 
  80.     page0 = new Page0(); 
  81.     Fragment[] arrayOfFragment = new Fragment[5]; 
  82.     arrayOfFragment[0] = page0; 
  83.     arrayOfFragment[1] = page4; 
  84.     arrayOfFragment[2] = page3; 
  85.     arrayOfFragment[3] = page2; 
  86.     arrayOfFragment[4] = page1; 
  87.     mFragments = arrayOfFragment; 
  88.     for (int i = 0; i < mFragments.length; i++) 
  89.       getSupportFragmentManager().beginTransaction().add(R.id.fragmentview, mFragments[i]).addToBackStack(null).commit(); 
  90.   } 
  91.   @Override 
  92.   protected void onDestroy() 
  93.   { 
  94.     super.onDestroy(); 
  95.     LocalBroadcastManager.getInstance(this).unregisterReceiver(mPageShowReceiver); 
  96.   } 

源碼鏈接:http://down.51cto.com/data/1975262

責任編輯:chenqingxiang 來源: 網絡整理
相關推薦

2015-12-09 11:07:16

商城源碼android

2015-10-20 16:01:47

華為商城源碼android

2015-03-10 17:47:48

小米手機小米4惡意軟件

2015-10-28 13:40:28

高仿百度糯米源碼

2015-07-21 15:22:20

點贊仿知乎按鈕動畫

2015-03-31 18:19:37

餓了么動畫效果

2015-09-01 16:37:21

360手機衛士高仿

2015-10-12 11:25:20

android大眾點評下拉動畫

2015-10-12 11:19:35

墨跡天氣引導界面android

2015-02-06 18:29:09

仿滴滴打車android

2017-01-15 14:52:15

Android交互動畫視覺效果

2014-05-15 17:09:21

小米平板小米電視2新品發布

2015-12-09 11:22:24

高仿今日頭條android源碼

2025-03-14 10:28:54

2015-07-06 10:25:48

Windows 98CSS樣式庫

2013-12-09 11:00:37

小米雷軍

2015-09-01 16:48:44

ios暴風視頻播放器

2021-03-29 22:12:04

小米小米11 Pro小米11 Ultra

2020-08-13 16:52:11

小米MIUI

2013-09-13 10:11:34

Android巴拉谷歌
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 最新国产精品精品视频 | 日本啊v在线 | 欧美精品video | 区一区二区三在线观看 | 黄网站在线播放 | 国产一级特黄aaa大片评分 | 精品亚洲一区二区 | 久久婷婷色 | 国产一区二区电影 | av天天爽| 九九久久精品视频 | 国产成人一区二区三区 | 在线看av的网址 | 在线免费观看毛片 | 91免费看片神器 | 国产在线观看 | 日本三级日产三级国产三级 | 日本不卡一区二区三区在线观看 | 免费在线精品视频 | 成人a在线观看 | 国产成人精品一区二区三 | 久久久影院 | 亚洲综合色视频在线观看 | 日韩精品一区二区三区中文在线 | 岛国午夜| www.天天操 | 久久精品毛片 | 久久一二 | 欧美精品在线一区二区三区 | 精品一区二区三区在线视频 | 91精品国产高清一区二区三区 | 欧美精品一区三区 | 亚洲精品99 | 狠狠插狠狠操 | 成人av一区 | 精品一二三区在线观看 | 国产高清视频 | 一区二区三区中文字幕 | 成人黄色a| 久久美女视频 | 国产免费一区二区三区 |