本文整理汇总了C#中Bundle.GetStringArrayList方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.GetStringArrayList方法的具体用法?C# Bundle.GetStringArrayList怎么用?C# Bundle.GetStringArrayList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle.GetStringArrayList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var root = inflater.Inflate(Resource.Layout.shows_add_show_fragment, container, false);
SetUpSwipeView(root);
GridView = root.FindViewById<GridView>(Resource.Id.addShowFragmentGridView);
SetUpAdapter();
//SetUpEmptyView(root);
if (savedInstanceState == null)
{
ShowsList = new List<TVShow>();
_pageNumber = 1;
//var downloadTask =
PopulateShowsAsync();
}
else
{
var myJsonString = savedInstanceState.GetString(Bundle_SHOWLIST);
ShowsList = JsonConvert.DeserializeObject<TVShowList>(myJsonString).tvShowList;
TrakkedShowsTMDBIDs = savedInstanceState.GetStringArrayList(Bundle_TRAKKEDLIST)?.ToEnumerable().ToList();
_pageNumber = savedInstanceState.GetInt(Bundle_PAGENUMBER, 1);
UpdateAdapter();
}
GridView.ItemClick += (object sender, AdapterView.ItemClickEventArgs e) =>
{
var intent = new Intent(Activity, typeof (ShowOverviewActivity));
//Change to show
intent.PutExtra("TMDBID", "" + ShowsList[e.Position].TMDBID);
StartActivity(intent);
};
GridView.Scroll += (sender, args) =>
{
if (args.FirstVisibleItem + args.VisibleItemCount >= args.TotalItemCount
&& Adapter.Count > 15 && !_reachedBottomOfGridView)
{
_reachedBottomOfGridView = true;
GetNextPage();
Console.WriteLine("I reached bottom of grid view");
}
};
return root;
}
示例2: Setup
public override void Setup(Bundle b)
{
bool showUserNotification;
if (!Boolean.TryParse(b.GetString(ShowUserNotificationsKey), out showUserNotification))
{
showUserNotification = true; //default to true
}
ShowUserNotifications = showUserNotification;
Url = b.GetString(UrlKey);
AllFields = b.GetString(AllFieldsKey);
ProtectedFieldsList = b.GetStringArrayList(ProtectedFieldsListKey);
}
示例3: RestoreState
private void RestoreState(Bundle savedInstanceState)
{
if (savedInstanceState != null)
{
_showPassword = savedInstanceState.GetBoolean(ShowpasswordKey, false);
MakePasswordMaskedOrVisible();
_keyFileOrProvider = savedInstanceState.GetString(KeyFileOrProviderKey);
_password = FindViewById<EditText>(Resource.Id.password).Text = savedInstanceState.GetString(PasswordKey);
_pendingOtps = new List<string>(savedInstanceState.GetStringArrayList(PendingOtpsKey));
string otpInfoString = savedInstanceState.GetString(OtpInfoKey);
if (otpInfoString != null)
{
XmlSerializer xs = new XmlSerializer(typeof(OtpInfo));
_otpInfo = (OtpInfo)xs.Deserialize(new StringReader(otpInfoString));
var enteredOtps = savedInstanceState.GetStringArrayList(EnteredOtpsKey);
ShowOtpEntry(enteredOtps);
}
UpdateKeyProviderUiState();
}
}