예제 #1
0
        /// <summary>
        /// Called to have the fragment instantiate its user interface view.
        /// </summary>
        /// <param name="inflater">The <see cref="LayoutInflater"/> object that can be used to inflate any views in the fragment.</param>
        /// <param name="container">
        /// If non-null, this is the parent view that the fragment's UI should be attached to.
        /// The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view.
        /// </param>
        /// <param name="savedInstanceState">
        /// If non-null, this fragment is being re-constructed from a previous saved state as given here.
        /// </param>
        /// <returns>
        /// The created view.
        /// </returns>
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Context        contextThemeWrapper = new ContextThemeWrapper(_mainActivity, Resource.Style.HistoryDialogTheme);
            LayoutInflater localInflater       = inflater.CloneInContext(contextThemeWrapper);

            return(base.OnCreateView(localInflater, container, savedInstanceState));
        }
예제 #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            if (this.Context == null)
            {
                throw new Exception("this.Context == null");
            }

            themeWrapper = new ContextThemeWrapper(this.Context, R.Style.ConnTextView);

            var view = inflater.CloneInContext(themeWrapper).Inflate(R.Layout.connections, container, false);

            connParent = view.FindViewById <LinearLayout>(R.Id.connparent);

            textView = new TextView(themeWrapper);
            connParent.AddView(textView);

            if (AppConfig.Current.GetBool(AppConfig.tip_cxn, true))
            {
                MainActivity.MakeSnackbar(R.String.long_press_cxn_to_stop, Android.Support.Design.Widget.Snackbar.LengthLong)
                .SetAction(R.String.got_it, v => {
                    AppConfig.Current.Set(AppConfig.tip_cxn, false);
                })
                .Show();
            }

            sorting  = AppConfig.Current.GetBool(AppConfig.conn_sort_by_speed, sorting);
            moreInfo = AppConfig.Current.GetBool(AppConfig.conn_more_info, moreInfo);

            return(view);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                var contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper

                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.ButtomSheetAddPhoto, container, false);

                InitComponent(view);

                AddPhoto.Click     += AddPhotoOnClick;
                SkipTextView.Click += SkipTextViewOnClick;

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
예제 #4
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                var contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper

                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.ButtomSheetGift, container, false);

                InitComponent(view);
                SetRecyclerViewAdapters();

                BtnGetPremium.Click += BtnGetPremiumOnClick;
                BtnBuyCredits.Click += BtnBuyCreditsOnClick;

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                //    View view = inflater.Inflate(Resource.Layout.ButtomSheetJobhFilter, container, false);
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.ButtomSheetJobhFilter, container, false);

                InitComponent(view);

                LayoutJobType.Click    += LayoutJobTypeOnClick;
                LayoutCategories.Click += LayoutCategoriesOnClick;
                IconBack.Click         += IconBackOnClick;
                BtnApply.Click         += BtnApplyOnClick;

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        //public override void OnCreate(Bundle savedInstanceState)
        //{
        //    base.OnCreate(savedInstanceState);
        //    // Create your fragment here
        //    //GlobalContext = (HomeActivity)Activity;
        //}

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                // create ContextThemeWrapper from the original Activity Context with the custom theme
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.ButtomSheetSearchFilter, container, false);

                //Get Value And Set Toolbar
                InitComponent(view);

                CurrencySymbol = ListUtils.SettingsSiteList?.CurrencySymbol ?? "$";

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                base.OnCreateView(inflater, container, savedInstanceState);

                // Set our view from the "DialogRatePageLayout" layout resource
                // var view = inflater.Inflate(Resource.Layout.DialogRatePageLayout, container, false);

                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme);
                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.DialogRatePageLayout, container, false);

                // Get values
                InitComponent(view);

                return(view);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
                return(null !);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.BottomSheetNearByFilter, container, false);
                // View view = inflater.Inflate(Resource.Layout.BottomSheetNearByFilter, container, false);

                InitComponent(view);
                SetRecyclerViewAdapters();

                IconBack.Click += IconBackOnClick;

                ButtonOffline.Click      += ButtonOfflineOnClick;
                ButtonOnline.Click       += ButtonOnlineOnClick;
                BothStatusButton.Click   += BothStatusButtonOnClick;
                BtnApply.Click           += BtnApplyOnClick;
                ResetTextView.Click      += ResetTextViewOnClick;
                LayoutRelationship.Click += LayoutRelationshipOnClick;

                GetFilter();

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.FilterLastChatDialog, container, false);
                // View view = inflater.Inflate(Resource.Layout.BottomSheetFilterLastChat, container, false);

                InitComponent(view);

                IconBack.Click += IconBackOnClick;

                ButtonOffline.Click    += ButtonOfflineOnClick;
                ButtonOnline.Click     += ButtonOnlineOnClick;
                BothStatusButton.Click += BothStatusButtonOnClick;
                BtnApply.Click         += BtnApplyOnClick;
                LayoutType.Click       += LayoutTypeOnClick;
                GetFilter();

                return(view);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                var contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper

                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.ButtomSheetSearchFilter, container, false);

                //Get Value And Set Toolbar
                InitComponent(view);

                IconBack.Click           += IconBackOnClick;
                LocationLayout.Click     += LocationLayoutOnClick;
                ButtonMan.Click          += ButtonManOnClick;
                ButtonGirls.Click        += ButtonGirlsOnClick;
                ButtonBoth.Click         += ButtonBothOnClick;
                ButtonApply.Click        += ButtonApplyOnClick;
                ResetTextView.Click      += ResetTextViewOnClick;
                AgeSeekBar.DragCompleted += AgeSeekBarOnDragCompleted;

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.TogglDialog);
            var wrappedInflater     = inflater.CloneInContext(contextThemeWrapper);

            var view = wrappedInflater.Inflate(Resource.Layout.UpcomingEventsNotificationSettingsFragment, container, false);

            InitializeViews(view);

            return(view);
        }
예제 #12
0
        public override View OnCreateView(LayoutInflater contextInflater, ViewGroup container,
                                          Bundle savedInstanceState)
        {
            var contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.BottomSheetStyle);
            var prefs = new PreferenceWrapper(Context);

            contextThemeWrapper.Theme.ApplyStyle(AccentColourMap.GetOverlayId(prefs.AccentColour), true);
            StyledInflater = contextInflater.CloneInContext(contextThemeWrapper);

            return(StyledInflater.Inflate(_layout, container, false));
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Context contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.None);

            // clone the inflater using the ContextThemeWrapper
            LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

            // inflate the layout using the cloned inflater, not default inflater
            var view = localInflater.Inflate(Resource.Layout.SplashscreenLayout, container, false);


            return(view);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);

            var contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.TogglDialog);
            var wrappedInflater     = inflater.CloneInContext(contextThemeWrapper);

            var view = wrappedInflater.Inflate(Resource.Layout.SelectUserCalendarsFragment, container, false);

            InitializeViews(view);

            return(view);
        }
예제 #15
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            if (this.Context == null)
            {
                throw new Exception("this.Context == null");
            }

            themeWrapper = new ContextThemeWrapper(this.Context, R.Style.ConnTextView);

            var view = inflater.CloneInContext(themeWrapper).Inflate(R.Layout.connections, container, false);

            connParent = view.FindViewById <LinearLayout>(R.Id.connparent);

            return(view);
        }
예제 #16
0
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     try
     {
         Context        contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
         LayoutInflater localInflater       = inflater.CloneInContext(contextThemeWrapper);
         View           view = localInflater?.Inflate(Resource.Layout.NativeShareBottomDialog, container, false);
         return(view);
     }
     catch (Exception exception)
     {
         Methods.DisplayReportResultTrack(exception);
         return(null !);
     }
 }
예제 #17
0
 public static Tuple <View, IList <IDataBinding> > CreateBindableView(
     [NotNull] this LayoutInflater layoutInflater, int layoutResId, ViewGroup viewGroup, bool attachToRoot,
     IViewFactory viewFactory = null)
 {
     Should.NotBeNull(layoutInflater, "layoutInflater");
     if (viewFactory == null)
     {
         viewFactory = ServiceProvider.IocContainer.Get <IViewFactory>();
     }
     using (LayoutInflater inflater = layoutInflater.CloneInContext(layoutInflater.Context))
         using (var bindingFactory = new BindingFactory(BindingServiceProvider.BindingProvider, viewFactory))
         {
             inflater.Factory = bindingFactory;
             View view = inflater.Inflate(layoutResId, viewGroup, attachToRoot);
             return(Tuple.Create(view, bindingFactory.Bindings));
         }
 }
예제 #18
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater?.Inflate(Resource.Layout.Animination_Fragment, container, false);
                return(view);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.TogglDialog);
            var wrappedInflater     = inflater.CloneInContext(contextThemeWrapper);

            var view = wrappedInflater.Inflate(Resource.Layout.UpcomingEventsNotificationSettingsFragment, container, false);

            InitializeViews(view);

            setupRecyclerView();

            adapter
            .ItemTapObservable
            .Subscribe(ViewModel.SelectOption.Inputs)
            .DisposedBy(DisposeBag);

            return(view);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                // create ContextThemeWrapper from the original Activity Context with the custom theme
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(ActivityContext, Resource.Style.SettingsThemeDark) : new ContextThemeWrapper(ActivityContext, Resource.Style.SettingsTheme);

                // clone the inflater using the ContextThemeWrapper
                var localInflater = inflater.CloneInContext(contextThemeWrapper);

                var view = base.OnCreateView(localInflater, container, savedInstanceState);

                return(view);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                //View view = inflater.Inflate(Resource.Layout.ButtomSheetSearchFilter, container, false);

                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.ButtomSheetSearchFilter, container, false);
                InitComponent(view);
                SetRecyclerViewAdapters();

                IconBack.Click += IconBackOnClick;

                LayoutLocation.Click       += LayoutLocationOnClick;
                LayoutVerified.Click       += LayoutVerifiedOnClick;
                LayoutStatus.Click         += LayoutStatusOnClick;
                LayoutProfilePicture.Click += LayoutProfilePictureOnClick;
                AgeSwitch.CheckedChange    += AgeSwitchOnCheckedChange;
                AgeSeekBar.DragCompleted   += AgeSeekBarOnDragCompleted;
                BtnApply.Click             += BtnApplyOnClick;

                AgeSeekBar.SetSelectedMinValue(10);
                AgeSeekBar.SetSelectedMaxValue(70);

                AgeSwitch.Checked = false;

                GetFilter();

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
예제 #22
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context        contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.MyTheme);
                LayoutInflater localInflater       = inflater.CloneInContext(contextThemeWrapper);
                // Set our view from the "Last_Calls_Fragment" layout resource
                View view = localInflater.Inflate(Resource.Layout.Last_Calls_Fragment, container, false);

                //Get values
                LastCallsRecyler  = (RecyclerView)view.FindViewById(Resource.Id.lastcallsrecyler);
                LastCalls_Empty   = (LinearLayout)view.FindViewById(Resource.Id.lastcall_LinerEmpty);
                Icon_lastmesseges = (AppCompatTextView)view.FindViewById(Resource.Id.calls_icon);

                IMethods.Set_TextViewIcon("1", Icon_lastmesseges, IonIcons_Fonts.AndroidCall);
                Icon_lastmesseges.SetTextColor(Android.Graphics.Color.ParseColor(AppSettings.MainColor));

                LastCallsRecyler.SetItemAnimator(null);

                LastCallsRecyler.Visibility = ViewStates.Visible;
                LastCalls_Empty.Visibility  = ViewStates.Gone;

                mLayoutManager = new LinearLayoutManager(this.Context);
                LastCallsRecyler.SetLayoutManager(mLayoutManager);
                mAdapter            = new Last_Calls_Adapter(this.Context);
                mAdapter.mCallUser  = new ObservableCollection <Classes.Call_User>();
                mAdapter.CallClick += MAdapterOnCallClick;

                LastCallsRecyler.SetAdapter(mAdapter);

                Get_CallUser();

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                // create ContextThemeWrapper from the original Activity Context with the custom theme
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);

                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.properties_dialog, container, false);
                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }

            // Use this to return your custom view for this Fragment
            //return inflater.Inflate(Resource.Layout.properties_dialog, container, false);
        }
예제 #24
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context        contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                LayoutInflater localInflater       = inflater.CloneInContext(contextThemeWrapper);
                View           view = localInflater.Inflate(Resource.Layout.MainFragmentLayout, container, false);

                ContextProfile = (TikProfileFragment)ParentFragment;
                GlobalContext  = (HomeActivity)Activity;

                InitComponent(view);
                SetRecyclerViewAdapters();

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
예제 #25
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context        contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                LayoutInflater localInflater       = inflater.CloneInContext(contextThemeWrapper);
                View           view = localInflater.Inflate(Resource.Layout.MoreMenuVideoDialogLayout, container, false);

                LibrarySynchronizer = new LibrarySynchronizer(Activity);
                Controller          = VideoController.GetInstance();

                InitComponent(view);
                AddOrRemoveEvent(true);

                return(view);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
예제 #26
0
        /**
         * Create and return the user interface view for this fragment.
         */
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            int  theme        = Arguments.GetInt("theme");
            int  initialYear  = Arguments.GetInt("year");
            int  initialMonth = Arguments.GetInt("month");
            int  initialDay   = Arguments.GetInt("day");
            Date minDate      = (Date)Arguments.GetSerializable("minDate");
            Date maxDate      = (Date)Arguments.GetSerializable("maxDate");

            // Unless we inflate using a cloned inflater with a Holo theme,
            // on Lollipop devices the DatePicker will be the new-style
            // DatePicker, which is not what we want. So we will
            // clone the inflater that we're given but with our specified
            // theme, then inflate the layout with this new inflater.

            Context contextThemeWrapper = new ContextThemeWrapper(Activity, theme == SlideDateTimePicker._holoDark ?Android.Resource.Style.ThemeHolo : Android.Resource.Style.ThemeHoloLight);

            LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

            View view = localInflater.Inflate(Resource.Layout.FragmentDateLayout, container, false);

            _datePicker = view.FindViewById <CustomDatePicker>(Resource.Id.datePicker);
            // block keyboard popping up on touch
            _datePicker.DescendantFocusability = DescendantFocusability.BlockDescendants;
            _datePicker.Init(initialYear, initialMonth, initialDay, this);

            if (minDate != null)
            {
                _datePicker.MinDate = minDate.Time;
            }

            if (maxDate != null)
            {
                _datePicker.MaxDate = maxDate.Time;
            }

            return(view);
        }
예제 #27
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context        contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                LayoutInflater localInflater       = inflater.CloneInContext(contextThemeWrapper);
                View           view = localInflater.Inflate(Resource.Layout.NativeShareBottomDialog, container, false);

                DataPost = JsonConvert.DeserializeObject <PostDataObject>(Arguments.GetString("ItemData") ?? "");

                TypePost = JsonConvert.DeserializeObject <PostModelType>(Arguments.GetString("TypePost"));

                InitComponent(view);
                AddOrRemoveEvent(true);

                return(view);
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
                return(null !);
            }
        }
예제 #28
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                Context contextThemeWrapper = AppSettings.SetTabDarkTheme ? new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Dark_Base) : new ContextThemeWrapper(Activity, Resource.Style.MyTheme_Base);
                // clone the inflater using the ContextThemeWrapper
                LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

                View view = localInflater.Inflate(Resource.Layout.BottomSheetMarketFilter, container, false);

                TypeFilter = Arguments.GetString("TypeFilter");
                switch (TypeFilter)
                {
                case "Market":
                    ContextMarket = (TabbedMarketActivity)Activity;
                    break;

                case "NearbyShops":
                    ContextNearbyShops = (NearbyShopsActivity)Activity;
                    break;

                case "NearbyBusiness":
                    ContextNearbyBusiness = (NearbyBusinessActivity)Activity;
                    break;
                }

                InitComponent(view);

                return(view);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);

            var contextThemeWrapper = new ContextThemeWrapper(Activity, Resource.Style.TogglDialog);
            var wrappedInflater     = inflater.CloneInContext(contextThemeWrapper);

            var view = wrappedInflater.Inflate(Resource.Layout.SelectUserCalendarsFragment, container, false);

            InitializeViews(view);

            setupRecyclerView();

            cancelButton
            .Rx()
            .BindAction(ViewModel.Close)
            .DisposedBy(DisposeBag);

            doneButton
            .Rx()
            .BindAction(ViewModel.Done)
            .DisposedBy(DisposeBag);

            ViewModel
            .Calendars
            .Select(calendars => calendars.ToList())
            .Subscribe(userCalendarsAdapter.Rx().Items())
            .DisposedBy(DisposeBag);

            userCalendarsAdapter
            .ItemTapObservable
            .Subscribe(ViewModel.SelectCalendar.Inputs)
            .DisposedBy(DisposeBag);

            return(view);
        }
예제 #30
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            string question = Arguments.GetString(MODULE_NAME, "");

            base.OnCreateView(inflater, container, savedInstanceState);

            Context contextThemeWrapper;

            switch (CSISystemContext.Theme)
            {
            case "Light":
                contextThemeWrapper = new ContextThemeWrapper(BaseActivity, Resource.Style.MyTheme_Light_Base);
                break;

            default:
                contextThemeWrapper = new ContextThemeWrapper(BaseActivity, Resource.Style.MyTheme_Base);
                break;
            }

            // clone the inflater using the ContextThemeWrapper
            LayoutInflater localInflater = inflater.CloneInContext(contextThemeWrapper);

            // Inflate this fragment from the "flashcard_layout"
            View view = localInflater.Inflate(Resource.Layout.CSIModule, container, false);

            GridView ModuleGrid = view.FindViewById <GridView>(Resource.Id.ModuleGrid);

            ModuleGridViewerAdapter GridAdapter = new ModuleGridViewerAdapter((Android.Support.V4.App.Fragment) this, ModuleGrid);

            if (Module == null)
            {
                MainActivity act = (MainActivity)BaseActivity;
                Module = act.Modules[act.ModulePage.CurrentItem];
            }
            foreach (ModuleAction Action in Module.ModuleActions)
            {
                if (Action.Visible)
                {
                    GridAdapter.ActionItems.Add(Action);
                }
            }
            ModuleGrid.Adapter = GridAdapter;


            ModuleGrid.ItemClick += delegate(object sender, ItemClickEventArgs args)
            {
                ModuleAction Action = (ModuleAction)GridAdapter.ActionItems[args.Position];
                //Toast.MakeText(ModuleGrid.Context, Action.ActionName, ToastLength.Short).Show();
                if (Action.InvokeCommands.Length > 0)
                {
                    foreach (string command in Action.InvokeCommands)
                    {
                        if (Action.Enabled)
                        {
                            if (!BaseActivity.InvokeCommand(command))
                            {
                                return;
                            }
                        }
                    }
                }
                else if (Action.ActivityType != null)
                {
                    Bundle bundle = CSISystemContext.BuildBundle();
                    Intent intent = new Intent(Application.Context, Action.ActivityType);
                    intent.PutExtra("CSISystemContext", bundle);
                    StartActivity(intent);
                }
            };

            return(view);
        }