本文整理汇总了C#中Bundle类的典型用法代码示例。如果您正苦于以下问题:C# Bundle类的具体用法?C# Bundle怎么用?C# Bundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bundle类属于命名空间,在下文中一共展示了Bundle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Create your application here
SetContentView(new SampleView(this));
}
示例2: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
}
示例3: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
示例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 ();
};
}
示例5: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.Splash);
ThreadPool.QueueUserWorkItem (o => LoadActivity ());
}
示例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;
};
}
示例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;
}
示例8: OnCreate
protected override void OnCreate(Bundle bundle)
{
Thread.Sleep (1500);
base.OnCreate (bundle);
StartActivity (typeof(Pay_Main));
}
示例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;
}
示例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);
}
示例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;
}
示例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
}
示例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;
}
示例14: OnViewCreated
public override void OnViewCreated (View view, Bundle savedInstanceState)
{
base.OnViewCreated (view, savedInstanceState);
ListView.SetClipToPadding (false);
ListAdapter = new SettingsAdapter ();
}
示例15: NewInstance
public static WelcomeFragment NewInstance ()
{
var f = new WelcomeFragment ();
var b = new Bundle ();
f.Arguments = b;
return f;
}