本文整理汇总了C#中Bundle.PutString方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.PutString方法的具体用法?C# Bundle.PutString怎么用?C# Bundle.PutString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle.PutString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAuthToken
// Getting an authentication token is not supported //throws NetworkErrorException
public override Bundle GetAuthToken(AccountAuthenticatorResponse response, Account account, string authTokenType, Bundle options)
{
var result = new Bundle();
var am = AccountManager.Get(mContext.ApplicationContext);
var authToken = am.PeekAuthToken(account, authTokenType);
if (string.IsNullOrEmpty(authToken))
{
var password = am.GetPassword(account);
if (!string.IsNullOrEmpty(password))
{
authToken = AuthTokenLoader.SignIn(mContext, account.Name, password);
}
}
if (!string.IsNullOrEmpty(authToken))
{
result.PutString(AccountManager.KeyAccountName, account.Name);
result.PutString(AccountManager.KeyAccountType, account.Type);
result.PutString(AccountManager.KeyAuthtoken, authToken);
}
else
{
var intent = new Intent(mContext, typeof(LoginActivity));
intent.PutExtra(AccountManager.KeyAccountAuthenticatorResponse, response);
intent.PutExtra(LoginActivity.EXTRA_TOKEN_TYPE, authTokenType);
var bundle = new Bundle();
bundle.PutParcelable(AccountManager.KeyIntent, intent);
}
return result;
}
示例2: InitView
private void InitView()
{
//设置标题栏
var btn_header_back = FindViewById<Button> (Resource.Id.btn_header_back);
btn_header_back.Click += (sender, e) =>
{
this.Finish();
OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
};
var tv_header_title = FindViewById<TextView> (Resource.Id.tv_header_title);
tv_header_title.Text = "账户安全";
//登录密码
var rl_person_loginPwd = FindViewById<RelativeLayout>(Resource.Id.rl_person_loginPwd);
rl_person_loginPwd.Click += (sender, e) =>
{
var intent = new Intent(this,typeof(SendSecurityCodeActivity));
var sendbundle = new Bundle();
sendbundle.PutString("SendType","ModifyPwd");//修改密码
sendbundle.PutString("PhoneNumber",Global.MyInfo.PhoneNumberOne);
intent.PutExtras(sendbundle);
StartActivity(intent);
OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
};
//修改支付密码
var rl_person_payPwd = FindViewById<RelativeLayout>(Resource.Id.rl_person_payPwd);
rl_person_payPwd.Click += (sender, e) =>
{
var intent = new Intent(this,typeof(SendSecurityCodeActivity));
var sendbundle = new Bundle();
sendbundle.PutString("SendType","ModifyPayPwd");//设置支付密码
sendbundle.PutString("PhoneNumber",Global.MyInfo.PhoneNumberOne);
intent.PutExtras(sendbundle);
StartActivity(intent);
OverridePendingTransition(Android.Resource.Animation.SlideInLeft,Android.Resource.Animation.SlideOutRight);
};
tv_payPwd = FindViewById<TextView> (Resource.Id.tv_payPwd);
//手机绑定
var rl_person_phoneBind = FindViewById<RelativeLayout>(Resource.Id.rl_person_phoneBind);
rl_person_phoneBind.Click += (sender, e) =>
{
};
tv_phoneBind = FindViewById<TextView> (Resource.Id.tv_phoneBind);
//身份认证
var rl_person_identity = FindViewById<RelativeLayout>(Resource.Id.rl_person_identity);
rl_person_identity.Click += (sender, e) =>
{
};
tv_identity = FindViewById<TextView> (Resource.Id.tv_identity);
}
示例3: OnSaveInstanceState
/// <Docs>Bundle in which to place your saved state.</Docs>
/// <summary>
/// Raises the save instance state event.
/// </summary>
/// <param name="outState"> Activity's bundle
/// </param>
protected override void OnSaveInstanceState (Bundle outState)
{
outState.PutString ("editText", editText.Text);
outState.PutString ("masterCodeText", masterCodeText.Text);
outState.PutString ("serviceCodeText", serviceCodeText.Text);
base.OnSaveInstanceState (outState);
}
示例4: makeRequestBundle
protected Bundle makeRequestBundle(string method)
{
var request = new Bundle();
request.PutString(Consts.BILLING_REQUEST_METHOD, method);
request.PutInt(Consts.BILLING_REQUEST_API_VERSION, 2);
request.PutString(Consts.BILLING_REQUEST_PACKAGE_NAME, Service.PackageName);
return request;
}
示例5: Instance
public static ConfirmationDialog Instance(string title, string message)
{
ConfirmationDialog dialog = new ConfirmationDialog();
Bundle arguments = new Bundle();
arguments.PutString(MESSAGE, message);
arguments.PutString(TITLE, title);
dialog.Arguments = arguments;
return dialog;
}
示例6: Instance
public static ErrorDialog Instance(string title, string errors)
{
ErrorDialog dialog = new ErrorDialog();
Bundle arguments = new Bundle();
arguments.PutString(ERRORS, errors);
arguments.PutString(TITLE, title);
dialog.Arguments = arguments;
return dialog;
}
示例7: SaveViewFieldsValues
private void SaveViewFieldsValues(Bundle outState) {
outState.PutAll(outState);
outState.PutString(keyAdvertisementTitleText, advertisementTitle.Text);
outState.PutString(keyAdvertisementDescriptionText, advertisementDescription.Text);
outState.PutBoolean(keyRdBtnOnlyForSellValue, rdBtnOnlyForSell.Checked);
outState.PutString(keyAdvertisementPriceValue, advertisementPrice.Text);
outState.PutString(keyPhotoView1Path, mPhotoPath);
outState.PutBoolean(keyPhotoIsTakingValue, photoIsTaking);
}
示例8: NewInstance
public static MessageDialog NewInstance(string message, string title)
{
var dialog = new MessageDialog();
var args = new Bundle();
args.PutString(MESSAGE, message);
args.PutString(TITLE, title);
dialog.Arguments = args;
return dialog;
}
示例9: OnCreate
protected override void OnCreate(Bundle savedInstanceState)
{
//Log.Info(tag, "STUFF WILL HAPPEN");
base.OnCreate (savedInstanceState);
string username = "";
string password = "";
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Login);
// Get our button from the layout resource,
// and attach an event to it
Button login = FindViewById<Button> (Resource.Id.LoginButton);
TextView userName = FindViewById<TextView> (Resource.Id.UserName);
TextView passWord = FindViewById<TextView> (Resource.Id.Password);
userName.TextChanged += (object sender, Android.Text.TextChangedEventArgs e) => {
username = e.Text.ToString();
};
passWord.TextChanged += (object sender, Android.Text.TextChangedEventArgs e) => {
password = e.Text.ToString();
};
login.Click += async (sender, e) => {
try{
var login_er =new LoginUtility();
Task<LoginResponse> asdfg = login_er.LoginAsync(username, password);
LoginResponse result = await asdfg;
if(result.validate){
Intent intent = new Intent(this, typeof(HomeScreenActivity));
var b = new Bundle();
b.PutString("user",result.username);
b.PutString("key",result.KEY);
intent.PutExtras(b);
StartActivity(intent);
LoginInfo.username = result.username;
LoginInfo.KEY = result.KEY;
}else{
Android.App.AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog alertDialog = builder.Create();
alertDialog.SetTitle("Login Failed");
alertDialog.SetMessage("Login Failed, Please Try Again");
alertDialog.Show();
//Log.Info(tag, "STUFF WILL HAPPEN"+ result.ToString());
}
}
catch (AndroidException){
}
};
}
示例10: NavigateToNextScreen
void NavigateToNextScreen()
{
// Navigate to video player
var extras = new Bundle();
extras.PutString("nextView", "LevelSelectActivity");
extras.PutString("videoPath", DataHolder.Current.Common.IntroVideoPath);
var intent = new Intent(this, typeof(VideoActivity));
intent.PutExtras(extras);
StartActivity(intent);
}
示例11: NewInstance
public static InputDialogFragment NewInstance(Activity context, string title, string message, Action<int> okAction)
{
var frag = new InputDialogFragment();
var args = new Bundle();
args.PutString("title", title);
args.PutString("message", message);
frag.Arguments = args;
_actionOk = okAction;
_context = context;
return frag;
}
示例12: listView_ItemClick
void listView_ItemClick(object sender, AdapterView.ItemLongClickEventArgs e){
// content to pass to dialog fragment
var bundle1 = new Bundle();
bundle1.PutString ("MH", list[e.Position].MaMH);
bundle1.PutBoolean ("check", true);
bundle1.PutString ("NamHoc", list[e.Position].NamHoc);
bundle1.PutString ("HocKy", list[e.Position].HocKy);
Intent myintent = new Intent (Activity, typeof(Remider));
myintent.PutExtra ("RemindValue", bundle1);
StartActivity (myintent);
}
示例13: CreateProjectDialogFragment
public CreateProjectDialogFragment (TimeEntryModel timeEntry, WorkspaceModel workspace, int color)
{
var args = new Bundle ();
if (timeEntry != null) {
args.PutString (TimeEntryIdArgument, timeEntry.Id.ToString ());
}
args.PutString (WorkspaceIdArgument, workspace.Id.ToString ());
args.PutInt (ProjectColorArgument, color);
Arguments = args;
}
示例14: response_Clicked
// Обработка текста письма и передача его в Activity1
private void response_Clicked(object sender, EventArgs e)
{
count = 0;
Intent intent = new Intent(this, typeof(Activity1));
Bundle extras = new Bundle();
extras.PutString("answer", letter.Text);
extras.PutString("id", count.ToString());
intent.PutExtras(extras);
count++;
StartActivity(intent);
}
示例15: MoreData
private void MoreData(string index, string SelectCity)
{
Intent deviceList = new Intent(this, typeof(Detail));
Bundle bundle = new Bundle(); // Bundle的底层是一个HashMap<String, Object
bundle.PutString("index",index);
bundle.PutString("SelectCity", SelectCity);
deviceList.PutExtra("bundle", bundle);
StartActivity(deviceList);
}