本文整理汇总了C#中Bundle.PutInt方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.PutInt方法的具体用法?C# Bundle.PutInt怎么用?C# Bundle.PutInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle.PutInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateArguments
public static Bundle CreateArguments(int errorCode, int requestCode)
{
Bundle args = new Bundle();
args.PutInt(GooglePlayServicesErrorDialogFragment.ARG_ERROR_CODE, errorCode);
args.PutInt(GooglePlayServicesErrorDialogFragment.ARG_REQUEST_CODE, requestCode);
return args;
}
示例2: NewInstance
public static RegisterUserFragment NewInstance(GoFragments go)
{
var fragment = new RegisterUserFragment ();
var args = new Bundle ();
switch (go) {
case GoFragments.InitFragment:
args.PutInt ("Go", 0);
break;
case GoFragments.SubastaFragment:
args.PutInt ("Go", 1);
break;
default:
args.PutInt ("Go", 0);
break;
}
fragment.Arguments = args;
return fragment;
}
示例3: OnSaveInstanceState
public override void OnSaveInstanceState (Bundle outState)
{
base.OnSaveInstanceState (outState);
outState.PutInt (DigitsEnteredKey, digitsEntered);
outState.PutInt (NewDurationHoursKey, newDuration.Hours);
outState.PutInt (NewDurationMinutesKey, newDuration.Minutes);
}
示例4: Create
public static DialogFragment Create(int errorCode, int requestCode)
{
DialogFragment fragment = new GooglePlusErrorDialogFragment();
Bundle args = new Bundle();
args.PutInt(GooglePlusErrorDialogFragment.ARG_ERROR_CODE, errorCode);
args.PutInt(GooglePlusErrorDialogFragment.ARG_REQUEST_CODE, requestCode);
fragment.SetArguments(args);
return fragment;
}
示例5: NewInstance
public static MessageDialog NewInstance(int message, int title)
{
var dialog = new MessageDialog();
var args = new Bundle();
args.PutInt(MESSAGE, message);
args.PutInt(TITLE, title);
dialog.Arguments = args;
return dialog;
}
示例6: newInstance
public static TrickSelectorPreMenuDialogFragment newInstance(int position, int rank)
{
var frag = new TrickSelectorPreMenuDialogFragment();
args = new Bundle();
args.PutInt("Rank", rank);
args.PutInt("Pos", position);
frag.Arguments = args;
return frag;
}
示例7: NewInstance
public static ValueChooserDialogFragment NewInstance(int id, int titleId, int itemsArrayId)
{
ValueChooserDialogFragment fragment = new ValueChooserDialogFragment();
Bundle args = new Bundle();
args.PutInt(ARG_ID, id);
args.PutInt(ARG_TITLE, titleId);
args.PutInt(ARG_ITEMS_ARRAY, itemsArrayId);
fragment.Arguments = args;
return fragment;
}
示例8: NewInstance
public static TimePickerFragment NewInstance(DateTime date)
{
TimePickerFragment fragment = new TimePickerFragment();
fragment.mDate = date;
Bundle args = new Bundle();
args.PutInt(EXTRA_HOUR, date.Hour);
args.PutInt(EXTRA_MINUTE, date.Minute);
fragment.Arguments = args;
return fragment;
}
示例9: NewInstance
public static DatePickerFragment NewInstance(DateTime date)
{
DatePickerFragment fragment = new DatePickerFragment();
fragment.mDate = date;
Bundle args = new Bundle();
args.PutInt(EXTRA_YEAR, date.Year);
args.PutInt(EXTRA_MONTH, date.Month);
args.PutInt(EXTRA_DAY, date.Day);
fragment.Arguments = args;
return fragment;
}
示例10: NewInstance
/**
* Create a new instance of DetailFragment.
* @param resourceId The resource ID of the Drawable image to show
* @param title The title of the image
* @param x The horizontal position of the grid item in pixel
* @param y The vertical position of the grid item in pixel
* @param width The width of the grid item in pixel
* @param height The height of the grid item in pixel
* @return a new instance of DetailFragment
*/
public static DetailFragment NewInstance (int resourceId, string title, int x, int y, int width, int height)
{
var fragment = new DetailFragment ();
var args = new Bundle ();
args.PutInt (ARG_RESOURCE_ID, resourceId);
args.PutString (ARG_TITLE, title);
args.PutInt (ARG_X, x);
args.PutInt (ARG_Y, y);
args.PutInt (ARG_WIDTH, width);
args.PutInt (ARG_HEIGHT, height);
fragment.Arguments = args;
return fragment;
}
示例11: NewInstance
public static DatePickerFragment NewInstance(Action<int, int, int> OnDateSet, int year, int monthOfYear, int dayOfMonth)
{
var fragment = new DatePickerFragment();
fragment._onDateSet = OnDateSet;
var args = new Bundle();
args.PutInt("year", year);
args.PutInt("monthOfYear", monthOfYear - 1);
args.PutInt("dayOfMonth", dayOfMonth);
fragment.Arguments = args;
return fragment;
}
示例12: NewInstance
public static TimeFragment NewInstance(int theme,int hour,int minute,
bool isClientSpecified24HourTime,bool is24HourTime)
{
TimeFragment t = new TimeFragment ();
Bundle b = new Bundle ();
b.PutInt ("theme", theme);
b.PutInt ("hour", hour);
b.PutInt ("minute", minute);
b.PutBoolean ("isClientSpecified24HourTime", isClientSpecified24HourTime);
b.PutBoolean ("is24HourTime", is24HourTime);
t.Arguments = b;
return t;
}
示例13: NewInstance
/**
* Return an instance of TimeFragment with its bundle filled with the
* constructor arguments. The values in the bundle are retrieved in
* {@link #onCreateView()} below to properly initialize the TimePicker.
*
* @param theme
* @param hour
* @param minute
* @param isClientSpecified24HourTime
* @param is24HourTime
* @return
*/
public static TimeFragment NewInstance(int Theme, int Hour, int Minute,bool IsClientSpecified24HourTime, bool Is24HourTime)
{
TimeFragment timeFragment = new TimeFragment();
Bundle bundle = new Bundle();
bundle.PutInt("theme", Theme);
bundle.PutInt("hour", Hour);
bundle.PutInt("minute", Minute);
bundle.PutBoolean("isClientSpecified24HourTime", IsClientSpecified24HourTime);
bundle.PutBoolean("is24HourTime", Is24HourTime);
timeFragment.Arguments=bundle;
return timeFragment;
}
示例14: newInstance
/**
* Return an instance of DateFragment with its bundle filled with the
* constructor arguments. The values in the bundle are retrieved in
* {@link #onCreateView()} below to properly initialize the DatePicker.
*
* @param theme
* @param year
* @param month
* @param day
* @param minDate
* @param maxDate
* @return an instance of DateFragment
*/
public static DateFragment newInstance(int Theme, int Year, int Month,int Day, Date MinDate, Date MaxDate)
{
DateFragment dateFragment = new DateFragment();
Bundle b = new Bundle();
b.PutInt("theme", Theme);
b.PutInt("year", Year);
b.PutInt("month", Month);
b.PutInt("day", Day);
b.PutSerializable("minDate", MinDate);
b.PutSerializable("maxDate", MaxDate);
dateFragment.Arguments=b;
return dateFragment;
}
示例15: SaveGameAndPlayer
protected void SaveGameAndPlayer()
{
// Create an array to store player into
List<GamePlayer> attendees = new List<GamePlayer>();
int listItemCount = _playersListView.ChildCount;
for (int i = 0; i < listItemCount; i++)
{
CheckBox cbox = (_playersListView.GetChildAt(i)).FindViewById<CheckBox>(Resource.Id.playerCheckbox);
if (cbox.Checked)
{
attendees.Add(new GamePlayer()
{
PlayerId = (int)GameData.PlayerService.Players[i].Id,
PlayerAlias = GameData.PlayerService.Players[i].Name,
Score = 0
});
}
}
Game game = new Game()
{
Name = Arguments.GetString("game_name"),
Players = attendees
};
GameData.Service.SaveGame(game);
//StartActivity(typeof(GamesActivity));
var fragment = new GameFragment();
Bundle bundle = new Bundle();
bundle.PutInt("game_id", (int)game.Id);
fragment.Arguments = bundle;
var trans = Activity.SupportFragmentManager.BeginTransaction();
trans.Add(Resource.Id.fragmentContainer, fragment, "GameFragment");
trans.Commit();
}