版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
報名android基礎Day11(新特性資源總連接 (掌握簡FragmentView,他有自己的FragmentActivityUI設計在大屏Activity里面的邏輯進行分離。Andorid3.0Fragment4.0fragment一定要指定 和class屬性而且必須在onCreateView()方法里面創(chuàng)建生命周onAttach()fragment附加在Activity之上 onCreateVIew()創(chuàng)建要顯式的控件onActivityCreated()Activity的生命周期開 fragment和Activity就在一起 onResume()顯式臺onPause()暫停onStop()停止onDestoryView()銷毀自身的控件 onDeatch()與Activity分離案Fragment 替換publicclassMainActivityextendsActivityimplementsOnClickListenerprotectedvoidonCreate(BundlesavedInstanceState){//FrameLayout替換為FragmentManagerfmgetFragmentManager();//Fragment管理器FragmentTransactionft=fm.beginTransaction();//Fragment事務ft.replace(R.id.frame,newFragment1());//替換mit();//提Viewtv_city=findViewById(R.id.tv_city);Viewtv_yule=findViewById(R.id.tv_yule);Viewtv_sport=findViewById(R.id.tv_sport);}publicvoidonClick(Viewv)//獲取當前顯示的FragmentManagerfm=getFragmentManager();Fragmentfragment=fm.findFragmentById(R.id.frame);switch(v.getId()){caseif(!(fragmentinstanceof//替getFragmentManager().beginTransaction().replace(R.id.frame,newFragment1())}caseif(!(fragmentinstanceof//替getFragmentManager().beginTransaction().replace(R.id.frame,new}caseif(!(fragmentinstanceof//替getFragmentManager().beginTransaction().replace(R.id.frame,newFragment3())}}}低版本使用(了解ActionBarandroid3.0ActionBarandroid對標題欄進行了封裝(掌握)屬性動tween::?rotation,rotationX,rotationY:旋轉(zhuǎn),rotation2D旋轉(zhuǎn)角度,3D?scaleX,scaleY:?x,yViewViewleft,top?alpha:publicvoidaction(View//bt執(zhí)行一個平移動 往下移動 ObjectAnimatoranimator=ObjectAnimator.ofFloat(bt,"translationY",//2D ObjectAnimatoranimator=ObjectAnimator.ofFloat(bt,"rotation",//3D ObjectAnimatoranimator=ObjectAnimator.ofFloat(bt,"rotationX",// ObjectAnimatoranimator=ObjectAnimator.ofFloat(bt,"scaleX", ObjectAnimatoranimator=ObjectAnimator.ofFloat(bt,"alpha",///*AnimatorSetset=newObjectAnimatoranimator1=ObjectAnimator.ofFloat(bt,"translationY",200);ObjectAnimatoranimator2=ObjectAnimator.ofFloat(bt,"trans
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024-2030年中國電機檢測產(chǎn)業(yè)經(jīng)營狀況監(jiān)測及發(fā)展行情走勢預測研究報告
- 2024-2030年中國電子書閱讀器行業(yè)市場發(fā)展分析及發(fā)展趨勢與投資前景研究報告
- 2024-2030年中國電動工具行業(yè)市場深度調(diào)研及發(fā)展策略研究報告
- 2024-2030年中國生鮮電商行業(yè)運營策略分析及投資價值評估研究報告
- 2024-2030年中國甜品店市場經(jīng)營管理風險及投資規(guī)模預測研究報告
- 2024-2030年中國玻璃鋼船艇行業(yè)經(jīng)營前景預測及發(fā)展趨勢預判研究報告
- 2024-2030年中國現(xiàn)磨豆?jié){機市場營銷策略探討與需求潛力預測研究報告
- 2024-2030年中國環(huán)保LED燈泡行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略研究報告
- 教育行業(yè)在線教育平臺搭建服務合同
- 教育培訓公司教育服務合同
- 第7課存在句課件初中日語人教版第一冊
- 自考《獸醫(yī)法規(guī)14239》考試復習題庫(必備版)
- 化學(基礎模塊)中職PPT完整全套教學課件
- 新民主主義革命理論PPT2023版毛澤東思想和中國特色社會主義理論體系概論課件
- 四、廚房工具我會用(教案)-三年級勞動教育課
- 獻身國防事業(yè)志愿書高中版三篇
- 習近平總書記關(guān)于教育的重要論述研究(安慶師范大學版)學習通超星課后章節(jié)答案期末考試題庫2023年
- 文化公園水體日常保潔作業(yè)方案
- 京東集團員工手冊-京東
- 2023年質(zhì)量知識考試參考題庫500題(含各題型)
- 朱自清散文解讀教學課件
評論
0/150
提交評論