当前位置: 首页>>代码示例>>C#>>正文


C# Bundle.GetStringArrayList方法代码示例

本文整理汇总了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;
        }
开发者ID:patrickpetropoulos,项目名称:TrakkerApp,代码行数:49,代码来源:AddShowFragment.cs

示例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);
        }
开发者ID:pythe,项目名称:wristpass,代码行数:13,代码来源:AppTask.cs

示例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();

            }
        }
开发者ID:pythe,项目名称:wristpass,代码行数:28,代码来源:PasswordActivity.cs


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