• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Bundle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Bundle的典型用法代码示例。如果您正苦于以下问题:C# Bundle类的具体用法?C# Bundle怎么用?C# Bundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Bundle类属于命名空间,在下文中一共展示了Bundle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Create your application here
            SetContentView(new SampleView(this));
        }
开发者ID:Rinnion,项目名称:PaintOnCanvas,代码行数:7,代码来源:Activity1.cs


示例2: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);
        }
开发者ID:flolovebit,项目名称:xamarin-evolve-2014,代码行数:7,代码来源:MainActivity.cs


示例3: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
开发者ID:xDelivered-Patrick,项目名称:Xamarin.Forms.Essentials,代码行数:7,代码来源:MainActivity.cs


示例4: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);

			mCustomConfig = FindViewById <CheckBox> (Resource.Id.custom_app_limits);
		
			bool customChecked = 
				PreferenceManager.GetDefaultSharedPreferences (this).GetBoolean (
					CUSTOM_CONFIG_KEY, false);

			if (customChecked) mCustomConfig.Checked = true;

			mMultiEntryValue = FindViewById <TextView> (Resource.Id.multi_entry_id);
			mChoiceEntryValue = FindViewById <TextView> (Resource.Id.choice_entry_id);
			mBooleanEntryValue = FindViewById <TextView> (Resource.Id.boolean_entry_id);

			/**
    		* Saves custom app restriction to the shared preference.
    	 	*
    		* This flag is used by {@code GetRestrictionsReceiver} to determine if a custom app
    	 	* restriction activity should be used.
    	 	*
    	 	* @param view
    	 	*/
			mCustomConfig.Click += delegate (object sender, EventArgs e) {
				var editor = PreferenceManager.GetDefaultSharedPreferences (this).Edit ();
				editor.PutBoolean (CUSTOM_CONFIG_KEY, mCustomConfig.Checked).Commit ();
			};
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:30,代码来源:MainActivity.cs


示例5: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Splash);
			ThreadPool.QueueUserWorkItem (o => LoadActivity ());

		}
开发者ID:gustavonv,项目名称:git-github.com-gustavonv-prefsmatrix.com.br,代码行数:7,代码来源:Splash.cs


示例6: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.Main);

			// Get our button from the layout resource,
			// and attach an event to it
			GetButton = FindViewById<Button> (Resource.Id.GetButton);
			ResultTextView = FindViewById<TextView> (Resource.Id.ResultTextView);
			ResultEditText = FindViewById<EditText> (Resource.Id.ResultEditText);
			DownloadedImageView = FindViewById<ImageView> (Resource.Id.DownloadedImageView);

			GetButton.Click += async (sender, e) => {
				
				Task<int> sizeTask = DownloadHomePageAsync();

				ResultTextView.Text = "Loading...";
				ResultEditText.Text = "Loading...\n";

				DownloadedImageView.SetImageResource ( Android.Resource.Drawable.IcMenuGallery);

				var length = await sizeTask;

				ResultTextView.Text = "length:  " + length;

			};

		}
开发者ID:aragorn55,项目名称:ClassSampleCode,代码行数:30,代码来源:MainActivity.cs


示例7: OnCreate

		protected override async void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.Main);
            SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
            this.CompatMode();

			// Initialize DataHolder if needed
			if (DataHolder.Current == null) {
				DataHolder.Current = new DataHolder ();

				// Load levels from JSON
				await DataHolder.Current.LoadLevelAsync(1);
                await DataHolder.Current.LoadLevelAsync(2);
                await DataHolder.Current.LoadLevelAsync(3);
                await DataHolder.Current.LoadLevelAsync(4);
                await DataHolder.Current.LoadLevelAsync(5);
                await DataHolder.Current.LoadLevelAsync(6);
                await DataHolder.Current.LoadLevelAsync(7);
                await DataHolder.Current.LoadLevelAsync(8);
                await DataHolder.Current.LoadLevelAsync(9);
			}

			var startButton = FindViewById<FloatingActionButton> (Resource.Id.btnStart);
			startButton.Click += StartButton_Click;
		}
开发者ID:fawuser,项目名称:IRMGARD,代码行数:26,代码来源:MainActivity.cs


示例8: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            Thread.Sleep (1500);
            base.OnCreate (bundle);

            StartActivity (typeof(Pay_Main));
        }
开发者ID:MatejVukosav,项目名称:GdjeMiJeAuto,代码行数:7,代码来源:Splash_screen.cs


示例9: OnCreate

		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);

			// Set our view from the "main" layout resource
			SetContentView(Resource.Layout.MarkUp);

			// Get our buttonTransform from the layout resource,
			// and attach an event to it
			Button		buttonTransform = FindViewById<Button>(Resource.Id.Transform);
			Android.Webkit.WebView browser = FindViewById<Android.Webkit.WebView>(Resource.Id.webView1);
			
			string html = "";
			html = BusinessLogicObject.MarkUpHTML;

			if (Android.OS.Build.VERSION .Release.StartsWith("2."))
			{
			// http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
			// In 2.x platforms loadData() fails in some cases (it requires the html to be escaped), 
			// use loadDataWithBaseURL() instead and pass null for baseUrl and historyUrl:
			
				//html = Java.Net.URLEncoder.Encode(BusinessLogicObject.MarkUpHTML).Replace("\\+", " ");
				browser.LoadDataWithBaseURL(null, html, "text/html", "utf-8", null);

			}
			else
			{
				browser.LoadData(BusinessLogicObject.MarkUpHTML, mime, encoding);			
			}

			buttonTransform.Click += new EventHandler(buttonTransform_Click);

			return;
		}
开发者ID:moljac,项目名称:MonoVersal.MarkDown,代码行数:34,代码来源:ActivityMarkUp.cs


示例10: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			dice1 = new Dice(1, 1, 6);
			dice2 = new Dice(2, 1, 6);
			audio = new PlayAudio (this);
		
			base.OnCreate (bundle);

			game = LbManager.GetGame(Intent.GetIntExtra ("Battle", -1), Intent.GetIntExtra("Scenario", -1));

			// set our layout to be the home screen
			SetContentView(Resource.Layout.General);		

			imgBack = FindViewById<ImageView> (Resource.Id.titleSubLbBack);
			imgLb = FindViewById<ImageView> (Resource.Id.titleSubLb);

			// title
			txtBattleName = FindViewById<TextView>(Resource.Id.titleSubBattleName);
			txtScenarioName = FindViewById<TextView>(Resource.Id.titleSubScenarioName);
			
			imgGeneral2Die1 = FindViewById<ImageView> (Resource.Id.imgGeneral2Die1);
			imgGeneral2Die2 = FindViewById<ImageView> (Resource.Id.imgGeneral2Die2);
			btnGeneral2DiceRoll = FindViewById<Button>(Resource.Id.btnGeneral2DiceRoll);

			imgGeneral1Die1 = FindViewById<ImageView> (Resource.Id.imgGeneral1Die1);
			btnGeneral1DiceRoll = FindViewById<Button>(Resource.Id.btnGeneral1DiceRoll);
		}
开发者ID:jcapuano328,项目名称:LB.mono,代码行数:27,代码来源:GeneralActivity.cs


示例11: OnCreateView

		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			if (container == null) {
				// Currently in a layout without a container, so no reason to create our view.
				return null;
			}

			var view = inflater.Inflate(Resource.Layout.speaker_screen, container, false);

			var speaker = EvolveData.SpeakerData [ShownSpeakerIndex];

			headshotImageView = view.FindViewById<ImageView> (Resource.Id.headshotImageView);
			var headshot = GetHeadShot (speaker.HeadshotUrl);
			headshotImageView.SetImageDrawable (headshot);

			speakerNameTextView = view.FindViewById<TextView> (Resource.Id.speakerNameTextView);
			speakerNameTextView.Text = speaker.Name;

			companyNameTextView = view.FindViewById<TextView> (Resource.Id.companyNameTextView);
			companyNameTextView.Text = speaker.Company;

			twitterHandleView = view.FindViewById<TextView> (Resource.Id.twitterTextView);
			twitterHandleView.Text = "@" + speaker.TwitterHandle;

			return view;
		}
开发者ID:ctsxamarintraining,项目名称:Xamarin,代码行数:26,代码来源:SpeakerDetailsFragment.cs


示例12: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			
			base.OnCreate (bundle);
			//prerutas = new IList<string> ();
			SetContentView (Resource.Layout.SliderGaleria);
			this.Window.AddFlags(WindowManagerFlags.Fullscreen);

			paginador = FindViewById<Android.Support.V4.View.ViewPager> (Resource.Id.pager);

			rutas = new List<string> ();
			prerutas = Intent.GetStringArrayListExtra ("rutas");
			posicion = Intent.GetStringExtra ("posicion");

			Log.Debug ("SliderActivity", "La posición del intent es: "+posicion);

			for(int i=0; i<prerutas.Count; i++){
				Log.Debug ("SliderActivity", "Añadiendo: "+prerutas[i]);
				rutas.Add (prerutas [i]);
			}

			Log.Debug ("SliderActivity", "Se crea la galería");
			slidergaleria = new SliderGaleria (this, rutas);

			Log.Debug ("SliderActivity", "se setea el adaptador");
			paginador.Adapter = slidergaleria;

			paginador.SetCurrentItem (Int32.Parse(posicion), false);

			Log.Debug ("SliderActivity", "Acabamos!");
			// Create your application here
		}
开发者ID:scrafty614,项目名称:XamarinStudio_Example,代码行数:32,代码来源:SliderActivity.cs


示例13: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON) {
                Finish ();
            }
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            compCode = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            branchCode = ((GlobalvarsApp)this.Application).BRANCH_CODE;
            SetContentView (Resource.Layout.ItemCodeList);
            populate (listData);
            listView = FindViewById<ListView> (Resource.Id.ICodeList);
            txtSearch= FindViewById<EditText > (Resource.Id.txtSearch);

            Button butInvBack= FindViewById<Button> (Resource.Id.butICodeBack);
            butInvBack.Click += (object sender, EventArgs e) => {
                base.OnBackPressed();
            };
            viewdlg = SetViewDelegate;
            //PerformFilteringDlg filterDlg=PerformFiltering;
            //listView.Adapter = new CusotmMasterItemListAdapter(this, listData);

            adapter = new GenericListAdapter<Item> (this, listData, Resource.Layout.ItemCodeDtlList, viewdlg);
            listView.Adapter = adapter;
            listView.ItemClick+= ListView_Click;
            txtSearch.TextChanged+= TxtSearch_TextChanged;
        }
开发者ID:mokth,项目名称:merpCS,代码行数:27,代码来源:MasterItemActivity.cs


示例14: OnViewCreated

        public override void OnViewCreated (View view, Bundle savedInstanceState)
        {
            base.OnViewCreated (view, savedInstanceState);

            ListView.SetClipToPadding (false);
            ListAdapter = new SettingsAdapter ();
        }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:7,代码来源:SettingsListFragment.cs


示例15: NewInstance

		public static WelcomeFragment NewInstance ()
		{
			var f = new WelcomeFragment ();
			var b = new Bundle ();
			f.Arguments = b;
			return f;
		}
开发者ID:tamifist,项目名称:KinderChat,代码行数:7,代码来源:WelcomeFragment.cs


示例16: OnCreate

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			ActionBar.SetTitle (Resource.String.title_devices);

			mHandler = new Handler ();

			// Use this check to determine whether BLE is supported on the device.  Then you can
			// selectively disable BLE-related features.
			if (!PackageManager.HasSystemFeature (Android.Content.PM.PackageManager.FeatureBluetoothLe)) {
				Toast.MakeText (this, Resource.String.ble_not_supported, ToastLength.Short).Show ();
				Finish ();
			}

			// Initializes a Bluetooth adapter.  For API level 18 and above, get a reference to
			// BluetoothAdapter through BluetoothManager.
			BluetoothManager bluetoothManager = (BluetoothManager) GetSystemService (Context.BluetoothService);
			mBluetoothAdapter = bluetoothManager.Adapter;

			// Checks if Bluetooth is supported on the device.
			if (mBluetoothAdapter == null) {
				Toast.MakeText (this, Resource.String.error_bluetooth_not_supported, ToastLength.Short).Show();
				Finish();
				return;
			}
		}
开发者ID:BratislavDimitrov,项目名称:monodroid-samples,代码行数:26,代码来源:DeviceScanActivity.cs


示例17: OnCreate

		public override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);

			dirPath = Pref.WorkPath;
			Refresh(forced: true);
		}
开发者ID:mcm811,项目名称:Hi5Controller.CSharp,代码行数:7,代码来源:WeldCountFragment.cs


示例18: OnCreate

        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.word);

            //ActionBar actionBar = ActionBar;
            ActionBar.SetDisplayHomeAsUpEnabled (true);
            
            var uri = Intent.Data;
            var cursor = ManagedQuery (uri, null, null, null, null);
           
            if (cursor == null) {
                Finish ();
            } else {
                cursor.MoveToFirst ();

                var word = FindViewById<TextView> (Resource.Id.word);
                var definition = FindViewById<TextView> (Resource.Id.definition);
                
                int wIndex = cursor.GetColumnIndexOrThrow (DictionaryDatabase.KEY_WORD);
                int dIndex = cursor.GetColumnIndexOrThrow (DictionaryDatabase.KEY_DEFINITION);
                
                word.Text = cursor.GetString (wIndex);
                definition.Text = cursor.GetString (dIndex);
            }
        }
开发者ID:Appercode,项目名称:monodroid-samples,代码行数:27,代码来源:WordActivity.cs


示例19: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Settings);
            ActionBar.SetDisplayHomeAsUpEnabled(true);

            counter = 0;
            var prefs =
                AndroidAppPreferences.Create(Application.Context.GetSharedPreferences(KeySndrApplication.AppPreferencesId, FileCreationMode.Private));

            editIpView = FindViewById<EditText>(Resource.Id.ipEditText);
            editPortView = FindViewById<EditText>(Resource.Id.portEditText);
            useCacheView = FindViewById<CheckBox>(Resource.Id.enableCache);

            if (!string.IsNullOrEmpty(prefs.Ip))
                editIpView.Text = prefs.Ip;
            if (prefs.Port > 0)
                editPortView.Text = prefs.Port.ToString();
            useCacheView.Checked = prefs.UseCache;

            probe = new Probe("KeySndrServer");
            probe.BeaconsUpdated += Probe_BeaconsUpdated;


            t = new Timer(1000);
            t.Elapsed += TimerOnElapsed;
            if (Intent.Extras == null || !Intent.Extras.ContainsKey("search"))
                return;
        }
开发者ID:samiy-xx,项目名称:KeySndr.Clients,代码行数:29,代码来源:SettingsActivity.cs


示例20: OnCreate

		protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Admin_Collection_CollectionManagementPage);
            SetViewModel(Container.Locator.AdminCollectionManagementViewModel);
        }
开发者ID:india-rose,项目名称:xamarin-indiarose,代码行数:7,代码来源:CollectionManagementActivity.cs



注:本文中的Bundle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BundleCollection类代码示例发布时间:2022-05-24
下一篇:
C# Bullet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap