91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 14.11MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-07-02
  • 語言: Java
  • 標(biāo)簽: xamarin??

資源簡介

xamarin android 使用fragment底部導(dǎo)航欄,原文鏈接http://blog.csdn.net/kebi007/article/month/2017/04

資源截圖

代碼片段和文件信息

using?System;
using?Android.App;
using?Android.Content;
using?Android.Runtime;
using?Android.Views;
using?Android.Widget;
using?Android.OS;
using?FragmentDemo.Fragments;
using?Android.Support.V7.App;
using?Android.Util;
namespace?FragmentDemo
{
????[Activity(Label?=?“FragmentDemo“?MainLauncher?=?true?Icon?=?“@drawable/icon“?Theme?=?“@android:style/Theme.Light.NotitleBar“)]
????public?class?MainActivity?:?Activity
????{
????????private?TextView?txt_chat;
????????private?TextView?txt_contacts;
????????private?TextView?txt_more;
????????private?frameLayout?ly_content;
????????private?MyFragment?fg1?fg2?fg3;
????????private?FragmentManager?fManager;
????????protected?override?void?OnCreate(Bundle?bundle)
????????{
????????????base.OnCreate(bundle);
????????????SetContentView(Resource.Layout.Main);
????????????ly_content?=?(frameLayout)FindViewById(Resource.Id.ly_content);
????????????MyFragment?fg?=?new?MyFragment(“第一個fragment“);
????????????txt_chat?=?(TextView)FindViewById(Resource.Id.txt_chat);
????????????txt_contacts?=?(TextView)FindViewById(Resource.Id.txt_contacts);
????????????txt_more?=?(TextView)FindViewById(Resource.Id.txt_more);
????????????bindViews();
????????????txt_chat.PerformClick();
????????}
????????//ui組件初始化與事件綁定
????????private?void?bindViews()
????????{
??????????
????????????txt_chat.Click?+=?(s?e)?=>?{?onclick(txt_chat);?};
????????????txt_contacts.Click?+=?delegate?{?onclick(txt_contacts);?};
????????????txt_more.Click?+=?delegate?{?onclick(txt_more);?};
????????}
????????//隱藏所有Fragment
????????private?void?hideAllFragment(FragmentTransaction?fragmentTransaction)
????????{
????????????if?(fg1?!=?null)?fragmentTransaction.Hide(fg1);
????????????if?(fg2?!=?null)?fragmentTransaction.Hide(fg2);
????????????if?(fg3?!=?null)?fragmentTransaction.Hide(fg3);
????????}
????????//重置所有文本的選中狀態(tài)
????????private?void?setSelected()
????????{
????????????txt_chat.Selected?=false;
????????????txt_contacts.Selected?=?false;
????????????txt_more.Selected?=?false;
????????}
????????//單擊事件
????????public?void?onclick(View?v)
????????{?
????????????????FragmentTransaction?fTransaction?=?FragmentManager.BeginTransaction();
????????????????hideAllFragment(fTransaction);
????????????????switch?(v.Id)
????????????????{
????????????????????case?Resource.Id.txt_chat:
????????????????????????setSelected();
????????????????????????txt_chat.Selected?=?true;
????????????????????????if?(fg1?==?null)
????????????????????????{
????????????????????????????fg1?=?new?MyFragment(“聊天Fragment“);
????????????????????????????fTransaction.Add(Resource.Id.ly_content?fg1);
????????????????????????}
????????????????????????else{fTransaction.Show(fg1);}break;
????????????????????case?Resource.Id.txt_contacts:
????????????????????????setSelected();
????????????????????????txt_contacts.Selected?=?true;
????????????????????????if?(fg2?==?null)
????????????????????????{
??????????????????????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????620??2016-11-20?20:03??FragmentDemo\Assets\AboutAssets.txt

?????文件??????58368??2017-04-21?02:06??FragmentDemo\bin\Debug\FragmentDemo.dll

?????文件???????2693??2017-04-21?02:06??FragmentDemo\bin\Debug\FragmentDemo.dll.mdb

?????文件????6234028??2017-04-21?02:07??FragmentDemo\bin\Debug\FragmentDemo.FragmentDemo-Signed.apk

?????文件????6269154??2017-04-21?02:06??FragmentDemo\bin\Debug\FragmentDemo.FragmentDemo.apk

?????文件??????28160??2017-04-21?02:06??FragmentDemo\bin\Debug\FragmentDemo.pdb

?????文件??????44745??2017-04-21?02:06??FragmentDemo\bin\Debug\Java.Interop.dll.mdb

?????文件????7604642??2017-04-21?02:06??FragmentDemo\bin\Debug\Mono.Android.dll.mdb

?????文件????1496781??2017-04-21?02:06??FragmentDemo\bin\Debug\mscorlib.dll.mdb

?????文件?????137422??2017-04-21?02:06??FragmentDemo\bin\Debug\System.ComponentModel.Composition.dll.mdb

?????文件?????359097??2017-04-21?02:06??FragmentDemo\bin\Debug\System.Core.dll.mdb

?????文件?????768028??2017-04-21?02:06??FragmentDemo\bin\Debug\System.dll.mdb

?????文件??????48067??2017-04-21?02:06??FragmentDemo\bin\Debug\System.Net.Http.dll.mdb

?????文件?????322073??2017-04-21?02:06??FragmentDemo\bin\Debug\System.Runtime.Serialization.dll.mdb

?????文件??????89254??2017-04-21?02:06??FragmentDemo\bin\Debug\System.ServiceModel.Internals.dll.mdb

?????文件?????953244??2017-04-21?02:06??FragmentDemo\bin\Debug\System.xml.dll.mdb

?????文件??????50083??2017-04-21?02:06??FragmentDemo\bin\Debug\System.xml.Linq.dll.mdb

?????文件????1973248??2016-01-19?18:12??FragmentDemo\bin\Debug\Xamarin.Android.Support.v4.dll

?????文件?????888320??2016-01-19?18:12??FragmentDemo\bin\Debug\Xamarin.Android.Support.v7.AppCompat.dll

?????文件???????5803??2017-04-21?00:07??FragmentDemo\FragmentDemo.csproj

?????文件????????261??2016-11-20?20:16??FragmentDemo\FragmentDemo.csproj.user

?????文件????????872??2017-04-21?01:53??FragmentDemo\Fragments\MyFragment.cs

?????文件????????160??2016-11-20?20:03??FragmentDemo\GettingStarted.Xamarin

?????文件???????3816??2017-04-21?02:06??FragmentDemo\MainActivity.cs

?????文件????????290??2016-11-21?21:35??FragmentDemo\packages.config

?????文件????????313??2016-11-21?23:55??FragmentDemo\Properties\AndroidManifest.xml

?????文件???????1094??2016-11-20?20:03??FragmentDemo\Properties\AssemblyInfo.cs

?????文件???????1736??2016-11-20?20:03??FragmentDemo\Resources\AboutResources.txt

?????文件????????269??2016-11-20?23:44??FragmentDemo\Resources\drawable\tab_menu_chat.xml

?????文件????????277??2016-11-20?23:44??FragmentDemo\Resources\drawable\tab_menu_contacts.xml

............此處省略30個文件信息

評論

共有 條評論