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


C# Bundle.GetInt方法代码示例

本文整理汇总了C#中Bundle.GetInt方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.GetInt方法的具体用法?C# Bundle.GetInt怎么用?C# Bundle.GetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bundle的用法示例。


在下文中一共展示了Bundle.GetInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnActivityCreated

        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            //Current position should survive screen rotations.
            if (savedInstanceState != null)
            {
                mCategory = savedInstanceState.GetInt("category");
                mCurPosition = savedInstanceState.GetInt("listPosition");
            }

            PopulateTitles(mCategory);
            ListView lv = ListView;
            lv.ChoiceMode = ChoiceMode.Single;
            lv.CacheColorHint = Color.Transparent;
            lv.ItemLongClick += (o, e) =>
            {
                String title = (String)((TextView)e.View).Text;

                // Set up clip data with the category||entry_id format.
                String textData = String.Format("{0}||{1}", mCategory, e.Position);
                ClipData data = ClipData.NewPlainText(title, textData);
                e.View.StartDrag(data, new MyDragShadowBuilder(e.View), null, 0);
            };

            SelectPosition(mCurPosition);
        }
开发者ID:BitStab,项目名称:Monodroid-Custom-Auto-Complete,代码行数:27,代码来源:TitlesFragment.cs

示例2: Server

        public Server(Bundle b)
            : this(b.GetInt("SERVER_ID"),
				b.GetString("SERVER_NAME"),
				b.GetString("SERVER_SCHEME"),
				b.GetString("SERVER_HOSTNAME"),
				b.GetInt("SERVER_PORT"),
				b.GetString("SERVER_USER"),
				b.GetString("SERVER_PASS"),
			b.GetInt("SERVER_GID"))
        {
        }
开发者ID:decriptor,项目名称:yastroid,代码行数:11,代码来源:Server.cs

示例3: OnCreate

        public override void OnCreate (Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            if (savedInstanceState != null) {
                digitsEntered = savedInstanceState.GetInt (DigitsEnteredKey, digitsEntered);
                newDuration = new Duration (
                    savedInstanceState.GetInt (NewDurationHoursKey, newDuration.Hours),
                    savedInstanceState.GetInt (NewDurationMinutesKey, newDuration.Minutes));
            }

            oldDuration = GetDuration ();
        }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:13,代码来源:ChangeTimeEntryDurationDialogFragment.cs

示例4: OnCreate

        public override void OnCreate (Bundle state)
        {
            base.OnCreate (state);

            if (state != null) {
                digitsEntered = state.GetInt (DigitsEnteredKey, digitsEntered);
                newDuration = new Duration (
                    state.GetInt (NewDurationHoursKey, newDuration.Hours),
                    state.GetInt (NewDurationMinutesKey, newDuration.Minutes));
            }

            LoadData ();
        }
开发者ID:karabatov,项目名称:mobile,代码行数:13,代码来源:ChangeTimeEntryDurationDialogFragment.cs

示例5: OnCreate

        protected override void OnCreate(Bundle savedInstanceState) {
            base.OnCreate(savedInstanceState);
            SetContentView(R.Layout.fragment_stack);

            // Watch for button clicks.
            Button button = (Button)FindViewById(R.Id.new_fragment); 
            button.Click += (s, x) => AddFragmentToStack();
  
            button = (Button)FindViewById(R.Id.home);
            button.Click += (s, x) =>
            {
                // If there is a back stack, pop it all.
                FragmentManager fm = GetSupportFragmentManager();
                if (fm.GetBackStackEntryCount() > 0)
                {
                    fm.PopBackStack(fm.GetBackStackEntryAt(0).GetId(),
                    Android.Support.V4.App.FragmentManager.POP_BACK_STACK_INCLUSIVE);
                }
            };

            if (savedInstanceState == null) {
                // Do first time initialization -- Add initial fragment.
                Fragment newFragment = CountingFragment.NewInstance(mStackLevel);
                FragmentTransaction ft = GetSupportFragmentManager().BeginTransaction();
                ft.Add(R.Id.simple_fragment, newFragment).Commit();
            } else {
                mStackLevel = savedInstanceState.GetInt("level");
            }
        }
开发者ID:Xtremrules,项目名称:dot42,代码行数:29,代码来源:FragmentStackSupport.cs

示例6: logResponseCode

        protected void logResponseCode(String method, Bundle response) 
		{
            var responseCode = (Consts.ResponseCode)(response.GetInt(Consts.BILLING_RESPONSE_RESPONSE_CODE));
            
			if (Consts.DEBUG) 
                Log.Error("BillingService", method + " received " + responseCode.ToString());            
        }
开发者ID:ddebilt,项目名称:play.billing,代码行数:7,代码来源:BillingRequest.cs

示例7: OnRestoreInstanceState

        protected override void OnRestoreInstanceState(Bundle outState)
        {
            photo_index = outState.GetInt ("photo_index");
            ShowPhoto (photo_index);

            base.OnRestoreInstanceState (outState);
        }
开发者ID:abombss,项目名称:monodroid-samples,代码行数:7,代码来源:MultiResolution.cs

示例8: 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
			button = FindViewById<Button> (Resource.Id.myButton);

			button.Click += delegate {
				Log.Error(TAG, "First delegate!");
				count++;
				UpdateCountsView ();
			};

			button.Click += (sender, e) => {
				Log.Error(TAG, "Second delegate!");
			};

//			button.SetOnClickListener (this);

			if (bundle != null) {
				count = bundle.GetInt (EXTRA_COUNT, 0);
				UpdateCountsView ();
			}
		}
开发者ID:pelotasplus,项目名称:Codepot2015.Xamarin,代码行数:28,代码来源:MainActivity.cs

示例9: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            if (bundle != null)
            {
                current_theme = bundle.GetInt("theme");

                switch (current_theme)
                {
                    case Resource.Style.ThemeCurrent:
                        current_theme = Resource.Style.ThemeCurrentDialog;
                        break;
                    case Resource.Style.ThemeCurrentDialog:
                        current_theme = Resource.Style.ThemeCurrentDialogWhenLarge;
                        break;
                    case Resource.Style.ThemeCurrentDialogWhenLarge:
                        current_theme = Resource.Style.Theme;
                        break;
                    default:
                        current_theme = Resource.Style.ThemeCurrent;
                        break;
                }

                SetTheme(current_theme);
            }

            SetContentView(Resource.Layout.activity_recreate);

            // Watch for button clicks
            var button = FindViewById<Button>(Resource.Id.recreate);
            button.Click += delegate { Recreate(); };
        }
开发者ID:xamarin,项目名称:monodroid-samples,代码行数:33,代码来源:ActivityRecreate.cs

示例10: OnCreate

 public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate (savedInstanceState);
     if (savedInstanceState != null) {
         drawable_res_id = savedInstanceState.GetInt("drawable_res_id", 0);
     }
 }
开发者ID:89sos98,项目名称:PullToRefresharp,代码行数:7,代码来源:ImageFragment.cs

示例11: OnActivityCreated

        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            var detailsFrame = Activity.FindViewById<View>(Resource.Id.details);

            // If running on a tablet, then the layout in Resources/Layout-Large will be loaded.
            // That layout uses fragments, and defines the detailsFrame. We use the visiblity of
            // detailsFrame as this distinguisher between tablet and phone.
            _isDualPane = detailsFrame != null && detailsFrame.Visibility == ViewStates.Visible;

            var adapter = new ArrayAdapter<String>(Activity, Android.Resource.Layout.SimpleListItemChecked, Shakespeare.Titles);
            ListAdapter = adapter;

            if (savedInstanceState != null)
            {
                _currentPlayId = savedInstanceState.GetInt("current_play_id", 0);
            }

            if (_isDualPane)
            {
                ListView.ChoiceMode = ChoiceMode.Single;
                ShowDetails(_currentPlayId);
            }
        }
开发者ID:peter-dangelo,项目名称:XamarinAndroidFragments,代码行数:25,代码来源:TitlesFragment.cs

示例12: OnCreateView

        //@Override
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            if (mPos == -1 && savedInstanceState != null)
                mPos = savedInstanceState.GetInt("mPos");
            TypedArray imgs = Resources.ObtainTypedArray(Resource.Array.birds_img);
            mImgRes = imgs.GetResourceId(mPos, -1);

            GridView gv = (GridView)inflater.Inflate(Resource.Layout.list_grid, null);
            gv.SetBackgroundResource(Android.Resource.Color.Black);
            gv.Adapter=new GridAdapter(this);
            //gv.setOnItemClickListener(new OnItemClickListener() {
            //    @Override
            //    public void onItemClick(AdapterView<?> parent, View view, int position,
            //            long id) {
            //        if (getActivity() == null)
            //            return;
            //        ResponsiveUIActivity activity = (ResponsiveUIActivity) getActivity();
            //        activity.onBirdPressed(mPos);
            //    }			
            //});

            gv.ItemClick += delegate { 
                 if (this.Activity == null)
                     return;
                 ResponsiveUIActivity activity = (ResponsiveUIActivity)this.Activity;
                 activity.onBirdPressed(mPos);
            };
            return gv;
        }
开发者ID:skywolf888,项目名称:SlidingMenu.Net,代码行数:30,代码来源:BirdGridFragment.cs

示例13: OnCreate

		public override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			if (null != savedInstanceState) {
				scrollPosition = savedInstanceState.GetInt ("scroll_position");
			}
		}
开发者ID:heb264,项目名称:ITC539_VEL,代码行数:8,代码来源:fragments.cs

示例14: OnActivityCreated

        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            Setts sett = Common.GetSettings ();
            DateTimeFormatInfo dfi = DateTimeFormatInfo.CurrentInfo;
            Calendar cal = dfi.Calendar;
            int week = (cal.GetWeekOfYear (DateTime.Today, dfi.CalendarWeekRule, dfi.FirstDayOfWeek) - sett.weekOfStart)%3;

            var choosenHospitals = HospitalManager.GetChoosenHospitals(week, DateTime.Today.DayOfWeek);

            var doctors = DoctorManager.GetDoctors ();

            docs = new List<string> ();
            chdocs = new List<Doctor> ();

            for (int d = 0; d < doctors.Count; d++) {
                for (int h = 0; h < choosenHospitals.Count; h++) {
                    if (doctors [d].HospitalID == choosenHospitals [h].ID) {
                        chdocs.Add (doctors [d]);
                        docs.Add(doctors [d].FirstName + ' ' + doctors [d].SecondName + ' ' + doctors [d].ThirdName);
                    }
                }
            }

            var detailsFrame = Activity.FindViewById<View>(Resource.Id.details);
            _isDualPane = detailsFrame != null && detailsFrame.Visibility == ViewStates.Visible;

            var adapter = new ArrayAdapter<String>(Activity, Android.Resource.Layout.SimpleListItemChecked, docs/*Shakespeare.Titles*/);
            ListAdapter = adapter;

            //progress.Dismiss();

            if (savedInstanceState != null)
            {
                _currentPlayId = savedInstanceState.GetInt("current_play_id", chdocs[0].ID);
            }

            if (_isDualPane)
            {
                ListView.ChoiceMode = ChoiceMode.Single;
                ShowDetails(chdocs[_currentPlayId].ID);
            }

            /////////////////////////////////////////////////////////////////////////////////
            if (presents == null) {
                var progress = ProgressDialog.Show (Activity, "Loading prsentations", "Please Wait (about 15 seconds)", true);

                new Thread (new ThreadStart (() => {
                    Thread.Sleep (15 * 1000);
                    Activity.RunOnUiThread (() => {
                        presents = Presentations.GetPresentations ();
                        progress.Dismiss ();
                    });
                })).Start ();
            }
            /////////////////////////////////////////////////////////////////////////////////
        }
开发者ID:pafik13,项目名称:DailyShower,代码行数:58,代码来源:TitlesFragment.cs

示例15: OnCreate

        /// <inheritdoc />
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            if (savedInstanceState != null)
            {
                currentSelectedPosition = savedInstanceState.GetInt(StateSelectedPosition);
            }
        }
开发者ID:djtms,项目名称:D3-Android-by-ZTn,代码行数:10,代码来源:NavigationDrawerFragment.cs


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