// Use OnDestroy instead of OnDestroyView because OnDestroyView will be
        // called before the animation completes. This causes tons of tiny issues.
        public override void OnDestroy()
        {
            if (_rootView != null)
            {
                UnhookEvents();

                var adapter = _viewPager.Adapter;
                _viewPager.Adapter = null;
                adapter.Dispose();

                _viewPager.RemoveOnPageChangeListener(this);
                _scrollview.RemoveView(_viewPager);

                _toolbarAppearanceTracker.Dispose();
                _tabLayoutAppearanceTracker.Dispose();
                _toolbarTracker.Dispose();
                _tablayout.Dispose();
                _toolbar.Dispose();
                _viewPager.Dispose();
                _scrollview.Dispose();
                _rootView.Dispose();
            }

            _toolbarAppearanceTracker   = null;
            _tabLayoutAppearanceTracker = null;
            _toolbarTracker             = null;
            _tablayout  = null;
            _toolbar    = null;
            _viewPager  = null;
            _scrollview = null;
            _rootView   = null;

            base.OnDestroy();
        }
Beispiel #2
0
        private void SetupViews()
        {
            this.progress = new ProgressDialogHelper(this);
            this.advertisementDetailsWrapperLayout = FindViewById <RelativeLayout>(Resource.Id.advertisementDetailsWrapperLayout);
            this.distanceTextView = FindViewById <TextView>(Resource.Id.distanceDetailsTextView);
            this.sellerNetworkStateInfoImageView = FindViewById <ImageView>(Resource.Id.sellerNetworkState);
            this.forSellOrChangeInfoTextView     = FindViewById <TextView>(Resource.Id.forSellOrChangeInfo);
            this.startConversationBtn            = FindViewById <ImageView>(Resource.Id.startConvesationBtn);
            this.price                  = FindViewById <TextView>(Resource.Id.advertisementDeatilsPrice);
            this.title                  = FindViewById <TextView>(Resource.Id.advertisementDetailsTitle);
            this.description            = FindViewById <TextView>(Resource.Id.advertisementDetailsDescription);
            this.sellerName             = FindViewById <TextView>(Resource.Id.textViewUserNameAdvertDetails);
            this.textViewCityName       = FindViewById <TextView>(Resource.Id.textViewCityName);
            this.textViewAdvertStatus   = FindViewById <TextView>(Resource.Id.textViewAdvertStatus);
            this.btnContactBottom       = FindViewById <Button>(Resource.Id.btnContactBottom);
            this.userPhoto              = FindViewById <CircleImageView>(Resource.Id.profile_image_on_advert_det);
            this.userPhoto.Click       += (s, e) => TogleLayouts();
            this.nestedScrollViewLayout = FindViewById <NestedScrollView>(Resource.Id.nestedScrollViewLayout);
            this.userAdvertsLayout      = FindViewById <RelativeLayout>(Resource.Id.userAdvertisementsRecyclerViewWrapper);
            textViewSizeValue           = FindViewById <TextView>(Resource.Id.textViewSizeValue);
            advertisementsRecyclerView  = FindViewById <RecyclerView>(Resource.Id.advertisementsRecyclerViewOnAdvertDetails);
            var mLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.Vertical);

            advertisementsRecyclerView.SetLayoutManager(mLayoutManager);

            photosRecyclerView = FindViewById <RecyclerView>(Resource.Id.photosRecyclerViewOnAdvertDetails);
            var photoRecyclerLayoutManager = new LinearLayoutManager(this);

            photoRecyclerLayoutManager.Orientation = LinearLayoutManager.Horizontal;
            photosRecyclerView.SetLayoutManager(photoRecyclerLayoutManager);

            this.nestedScrollViewLayout.RequestLayout();
        }
        protected override void LoadSyncElements()
        {
            base.LoadSyncElements();

            var credit   = JsonConvert.DeserializeObject <Shared.Models.Credit>(Intent.GetStringExtra("credit"));
            var payments = JsonConvert.DeserializeObject <List <PaymentModel> >(credit.ListPayment ?? "");

            var duration = FindViewById <TextView>(Resource.Id.calculate_result_duration);

            duration.Text = credit.DurationInMonth.ToString("N", CultureInfo.CurrentCulture);

            var procent = FindViewById <TextView>(Resource.Id.calculate_result_percent);

            procent.Text = credit.Procent.ToString("N", CultureInfo.CurrentCulture);

            var amount = FindViewById <TextView>(Resource.Id.calculate_result_amount);

            amount.Text = credit.Amount.ToString("N", CultureInfo.CurrentCulture);

            var type = FindViewById <TextView>(Resource.Id.calculate_result_type);

            type.Text = credit.TypeCredit;

            var amountWithPercent = FindViewById <TextView>(Resource.Id.calculate_result_amount_with_percent);

            amountWithPercent.Text = payments.Sum(w => w.Summ).ToString("N", CultureInfo.CurrentCulture);

            var recyclerView = FindViewById <RecyclerView>(Resource.Id.calculate_result_payment);

            recyclerView.SetLayoutManager(new NotCanScrollableLinearLayoutManager(this, LinearLayoutManager.Vertical, false));
            recyclerView.AddItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.Vertical));
            recyclerView.SetAdapter(new CalculaterResultAdapter(payments.ToArray()));

            _nestedScrollView = FindViewById <NestedScrollView>(Resource.Id.nested);
        }
 private void DestroyBasic()
 {
     try
     {
         YourImage           = null !;
         BtnAddImage         = null !;
         PassportImage       = null !;
         BtnAddImagePassport = null !;
         NameEdit            = null !;
         MessagesEdit        = null !;
         BtnSubmit           = null !;
         TextTitleVerified   = null !;
         VerifiedIcon        = null !;
         ScrollView          = null !;
         VerifiedLinear      = null !;
         NotVerifiedLinear   = null !;
         PathYourImage       = "";
         PathPassportImage   = "";
         TypeImage           = null !;
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
 public static void ScrollToEnd(this NestedScrollView scrollView)
 {
     scrollView.Post(() =>
     {
         scrollView.FullScroll((int)FocusSearchDirection.Down);
     });
 }
        private void InitComponent()
        {
            try
            {
                YourImage   = FindViewById <ImageView>(Resource.Id.Image);
                BtnAddImage = FindViewById <Button>(Resource.Id.btn_AddPhoto);

                PassportImage       = FindViewById <ImageView>(Resource.Id.ImagePassport);
                BtnAddImagePassport = FindViewById <Button>(Resource.Id.btn_Passport);

                NameEdit     = FindViewById <EditText>(Resource.Id.Name_text);
                MessagesEdit = FindViewById <EditText>(Resource.Id.Messages_Edit);
                BtnSubmit    = FindViewById <Button>(Resource.Id.submitButton);

                TextTitleVerified = FindViewById <TextView>(Resource.Id.textTitileVerified);
                VerifiedIcon      = FindViewById <TextView>(Resource.Id.verifiedIcon);
                ScrollView        = FindViewById <NestedScrollView>(Resource.Id.ScrollView);
                VerifiedLinear    = FindViewById <LinearLayout>(Resource.Id.verified);
                NotVerifiedLinear = FindViewById <LinearLayout>(Resource.Id.notVerified);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, VerifiedIcon, IonIconsFonts.CheckmarkCircled);
                VerifiedIcon.SetTextColor(Color.ParseColor(AppSettings.MainColor));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
 private void DestroyBasic()
 {
     try
     {
         YourImage           = null;
         BtnAddImage         = null;
         PassportImage       = null;
         BtnAddImagePassport = null;
         NameEdit            = null;
         MessagesEdit        = null;
         BtnSubmit           = null;
         TextTitleVerified   = null;
         VerifiedIcon        = null;
         ScrollView          = null;
         VerifiedLinear      = null;
         NotVerifiedLinear   = null;
         PathYourImage       = "";
         PathPassportImage   = "";
         TypeImage           = null;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
Beispiel #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var info = FamiStudioForm.Instance != null ? FamiStudioForm.Instance.ActiveDialog as PropertyDialogActivityInfo : null;

            if (savedInstanceState != null || info == null)
            {
                Finish();
                return;
            }

            dlg = info.Dialog;
            dlg.CloseRequested += Dlg_CloseRequested;

            var appBarLayoutParams = new AppBarLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, DroidUtils.GetSizeAttributeInPixel(this, Android.Resource.Attribute.ActionBarSize));

            appBarLayoutParams.ScrollFlags = 0;

            toolbar = new AndroidX.AppCompat.Widget.Toolbar(new ContextThemeWrapper(this, Resource.Style.ToolbarTheme));
            toolbar.LayoutParameters = appBarLayoutParams;
            toolbar.SetTitleTextAppearance(this, Resource.Style.LightGrayTextMediumBold);
            SetSupportActionBar(toolbar);

            ActionBar actionBar = SupportActionBar;

            if (actionBar != null)
            {
                actionBar.SetDisplayHomeAsUpEnabled(true);
                actionBar.SetHomeButtonEnabled(true);
                actionBar.SetHomeAsUpIndicator(Android.Resource.Drawable.IcMenuCloseClearCancel);
                actionBar.Title = dlg.Title;
            }

            appBarLayout = new AppBarLayout(this);
            appBarLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent);
            appBarLayout.AddView(toolbar);

            fragmentView = new FragmentContainerView(this);
            fragmentView.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
            fragmentView.Id = FragmentViewId;

            var scrollViewLayoutParams = new CoordinatorLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);

            scrollViewLayoutParams.Behavior = new AppBarLayout.ScrollingViewBehavior(this, null);

            scrollView = new NestedScrollView(new ContextThemeWrapper(this, Resource.Style.DarkBackgroundStyle));
            scrollView.LayoutParameters = scrollViewLayoutParams;
            scrollView.AddView(fragmentView);

            coordLayout = new CoordinatorLayout(this);
            coordLayout.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
            coordLayout.AddView(appBarLayout);
            coordLayout.AddView(scrollView);

            SetContentView(coordLayout);

            SupportFragmentManager.BeginTransaction().SetReorderingAllowed(true).Add(fragmentView.Id, dlg.Properties, "PropertyDialog").Commit();
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            NestedScrollView nestedScrollView = (NestedScrollView)inflater.Inflate(Resource.Layout.fragment_widgets, container, false);

            et_main_3 = nestedScrollView.FindViewById <EditText>(Resource.Id.et_main_3);

            return(nestedScrollView);
        }
Beispiel #10
0
 public PlayerCallback(Activity context)
 {
     this.context    = context;
     sheet           = context.FindViewById <NestedScrollView>(Resource.Id.playerSheet);
     bottomView      = context.FindViewById <BottomNavigationView>(Resource.Id.bottomView);
     smallPlayer     = context.FindViewById <FrameLayout>(Resource.Id.smallPlayer);
     playerContainer = context.FindViewById(Resource.Id.playerContainer);
     snackBar        = context.FindViewById <CoordinatorLayout>(Resource.Id.snackBar);
 }
        public void OnScrollChange(NestedScrollView scrollView, int scrollX, int scrollY, int oldScrollX, int oldScrollY)
        {
            View view = (View)scrollView.GetChildAt(scrollView.ChildCount - 1);
            int  diff = (view.Bottom - (scrollView.Height + scrollView.ScrollY));

            if (diff == 0)
            {
                LoadMoreEvent(currentPage, null);
            }
        }
        private void InitComponent(View view)
        {
            try
            {
                ProUserRecyclerView        = (RecyclerView)view.FindViewById(Resource.Id.proRecyler);
                PageRecyclerView           = (RecyclerView)view.FindViewById(Resource.Id.pagerecyler);
                LastActivitiesRecyclerView = (RecyclerView)view.FindViewById(Resource.Id.lastactivitiesRecyler);

                NestedScrolled = (NestedScrollView)view.FindViewById(Resource.Id.nestedScrollView);

                FriendRequestImage1 = (ImageView)view.FindViewById(Resource.Id.image_page_1);
                FriendRequestImage2 = (ImageView)view.FindViewById(Resource.Id.image_page_2);
                FriendRequestImage3 = (ImageView)view.FindViewById(Resource.Id.image_page_3);
                FriendRequestCount  = (ImageView)view.FindViewById(Resource.Id.count_view);

                TxTFriendRequest    = (TextView)view.FindViewById(Resource.Id.tv_Friends_connection);
                TxtAllFriendRequest = (TextView)view.FindViewById(Resource.Id.tv_Friends);

                TxTMoreLastActivities  = (TextView)view.FindViewById(Resource.Id.tv_lastactivities);
                IconMoreLastActivities = (TextView)view.FindViewById(Resource.Id.iv_more_lastactivities);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconMoreLastActivities, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.IosArrowDropleft : IonIconsFonts.IosArrowDropright);

                LayoutSuggestionProUsers       = (LinearLayout)view.FindViewById(Resource.Id.layout_suggestion_Friends);
                LayoutSuggestionLastActivities = (LinearLayout)view.FindViewById(Resource.Id.layout_suggestion_lastactivities);
                LayoutFriendRequest            = (RelativeLayout)view.FindViewById(Resource.Id.layout_friend_Request);
                LayoutSuggestionPromotedPage   = (LinearLayout)view.FindViewById(Resource.Id.layout_suggestion_PromotedPage);

                LastActivitiesRecyclerView.Visibility     = ViewStates.Gone;
                LayoutSuggestionLastActivities.Visibility = ViewStates.Gone;

                if (!AppSettings.ShowLastActivities)
                {
                    LastActivitiesRecyclerView.Visibility     = ViewStates.Gone;
                    LayoutSuggestionLastActivities.Visibility = ViewStates.Gone;
                }

                if (AppSettings.ConnectivitySystem == 1)
                {
                    TxTFriendRequest.Text    = Context.GetString(Resource.String.Lbl_FollowRequest);
                    TxtAllFriendRequest.Text = Context.GetString(Resource.String.Lbl_View_All_FollowRequest);
                }

                LayoutFriendRequest.Click    += LayoutFriendRequestOnClick;
                TxTMoreLastActivities.Click  += MoreLastActivitiesOnClick;
                IconMoreLastActivities.Click += MoreLastActivitiesOnClick;

                PublisherAdView = view.FindViewById <PublisherAdView>(Resource.Id.multiple_ad_sizes_view);
                AdsGoogle.InitPublisherAdView(PublisherAdView);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
Beispiel #13
0
 public void OnScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY)
 {
     if (scrollY == 0 && oldScrollY > 0)
     {
         // Reset the RecyclerView's scroll position each time the card
         // returns to its starting position.
         RV.ScrollToPosition(0);
         CardHeaderShadow.Alpha     = 0f;
         mIsShowingCardHeaderShadow = false;
     }
 }
Beispiel #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Id = Intent.GetIntExtra("id", 0);
            articlePresenter = new ArticlePresenter(this);
            handler          = new Handler();

            StatusBarCompat.SetOrdinaryToolBar(this);
            toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);
            toolbar.SetNavigationIcon(Resource.Drawable.back_24dp);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            toolbar.SetNavigationOnClickListener(this);
            toolbar.SetOnMenuItemClickListener(this);
            swipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout);
            swipeRefreshLayout.SetColorSchemeResources(Resource.Color.primary);
            swipeRefreshLayout.SetOnRefreshListener(this);
            scrollView = FindViewById <NestedScrollView>(Resource.Id.scrollView);

            txtTitle    = FindViewById <TextView>(Resource.Id.txtTitle);
            imgAvatar   = FindViewById <ImageView>(Resource.Id.llAvatar);
            txtAuthor   = FindViewById <TextView>(Resource.Id.txtAuthor);
            txtPostdate = FindViewById <TextView>(Resource.Id.txtPostdate);
            txtBody     = FindViewById <WebView>(Resource.Id.txtBody);
            txtBody.Settings.JavaScriptEnabled        = true;
            txtBody.Settings.DomStorageEnabled        = true;
            txtBody.Settings.LoadsImagesAutomatically = true;
            txtBody.Settings.DefaultTextEncodingName  = "utf-8";
            txtBody.SetWebViewClient(BodyWebViewClient.With(this));
            txtBody.ScrollBarStyle = ScrollbarStyles.InsideOverlay;
            txtBody.Settings.SetSupportZoom(false);
            txtBody.Settings.BuiltInZoomControls = false;
            txtBody.Settings.CacheMode           = CacheModes.CacheElseNetwork;
            txtBody.Settings.SetLayoutAlgorithm(WebSettings.LayoutAlgorithm.SingleColumn);
            var jsInterface = new WebViewJSInterface(this);

            txtBody.AddJavascriptInterface(jsInterface, "openlistner");
            jsInterface.CallFromPageReceived += delegate(object sender, WebViewJSInterface.CallFromPageReceivedEventArgs e)
            {
                PhotoActivity.Start(this, e.Result.Split(','), e.Index);
            };

            txtDigg     = FindViewById <TextView>(Resource.Id.txtDigg);
            txtRead     = FindViewById <TextView>(Resource.Id.txtRead);
            txtComments = FindViewById <TextView>(Resource.Id.txtComments);
            txtBookmark = FindViewById <TextView>(Resource.Id.txtBookmark);

            swipeRefreshLayout.Post(async() =>
            {
                await articlePresenter.GetClientArticle(Id);
            });

            shareAction = new ShareAction(this).SetDisplayList(SHARE_MEDIA.Weixin, SHARE_MEDIA.WeixinCircle, SHARE_MEDIA.WeixinFavorite, SHARE_MEDIA.Sina).SetShareboardclickCallback(this);
        }
Beispiel #15
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            View outerView = base.OnCreateView(inflater, container, savedInstanceState);
            View view      = inflater.Inflate(Resource.Layout.fragment_weather_details, outerView as ViewGroup, true);

            outerView.FocusableInTouchMode = true;
            outerView.GenericMotion       += (sender, e) =>
            {
                if (e.Event.Action == MotionEventActions.Scroll && RotaryEncoder.IsFromRotaryEncoder(e.Event))
                {
                    // Don't forget the negation here
                    float delta = -RotaryEncoder.GetRotaryAxisValue(e.Event) * RotaryEncoder.GetScaledScrollFactor(Activity);

                    // Swap these axes if you want to do horizontal scrolling instead
                    scrollView.ScrollBy(0, (int)Math.Round(delta));

                    e.Handled = true;
                }

                e.Handled = false;
            };

            scrollView = view.FindViewById <NestedScrollView>(Resource.Id.scrollView);
            // Details
            detailsPanel  = view.FindViewById(Resource.Id.details_panel);
            humidity      = view.FindViewById <TextView>(Resource.Id.humidity);
            pressureState = view.FindViewById <TextView>(Resource.Id.pressure_state);
            pressure      = view.FindViewById <TextView>(Resource.Id.pressure);
            visiblity     = view.FindViewById <TextView>(Resource.Id.visibility_val);
            feelslike     = view.FindViewById <TextView>(Resource.Id.feelslike);
            windDirection = view.FindViewById <TextView>(Resource.Id.wind_direction);
            windSpeed     = view.FindViewById <TextView>(Resource.Id.wind_speed);
            sunrise       = view.FindViewById <TextView>(Resource.Id.sunrise_time);
            sunset        = view.FindViewById <TextView>(Resource.Id.sunset_time);

            // Additional Details
            precipitationPanel            = view.FindViewById <RelativeLayout>(Resource.Id.precipitation_card);
            precipitationPanel.Visibility = ViewStates.Gone;
            chanceLabel     = view.FindViewById <TextView>(Resource.Id.chance_label);
            chance          = view.FindViewById <TextView>(Resource.Id.chance_val);
            cloudinessLabel = view.FindViewById <TextView>(Resource.Id.cloudiness_label);
            cloudiness      = view.FindViewById <TextView>(Resource.Id.cloudiness);
            qpfRain         = view.FindViewById <TextView>(Resource.Id.qpf_rain_val);
            qpfSnow         = view.FindViewById <TextView>(Resource.Id.qpf_snow_val);

            // Cloudiness only supported by OWM
            cloudinessLabel.Visibility = ViewStates.Gone;
            cloudiness.Visibility      = ViewStates.Gone;

            weatherCredit = view.FindViewById <TextView>(Resource.Id.weather_credit);

            return(outerView);
        }
Beispiel #16
0
        private void InitComponent(View view)
        {
            try
            {
                ProUserRecyclerView        = (RecyclerView)view.FindViewById(Resource.Id.proRecyler);
                PageRecyclerView           = (RecyclerView)view.FindViewById(Resource.Id.pagerecyler);
                LastActivitiesRecyclerView = (RecyclerView)view.FindViewById(Resource.Id.lastactivitiesRecyler);

                NestedScrolled = (NestedScrollView)view.FindViewById(Resource.Id.nestedScrollView);

                FriendRequestImage1 = (ImageView)view.FindViewById(Resource.Id.image_page_1);
                FriendRequestImage2 = (ImageView)view.FindViewById(Resource.Id.image_page_2);
                FriendRequestImage3 = (ImageView)view.FindViewById(Resource.Id.image_page_3);

                TxTFriendRequest    = (TextView)view.FindViewById(Resource.Id.tv_Friends_connection);
                TxtAllFriendRequest = (TextView)view.FindViewById(Resource.Id.tv_Friends);

                TxTMoreLastActivities  = (TextView)view.FindViewById(Resource.Id.tv_lastactivities);
                IconMoreLastActivities = (TextView)view.FindViewById(Resource.Id.iv_more_lastactivities);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconMoreLastActivities, IonIconsFonts.ChevronRight);

                LayoutSuggestionProUsers       = (LinearLayout)view.FindViewById(Resource.Id.layout_suggestion_Friends);
                LayoutSuggestionLastActivities = (LinearLayout)view.FindViewById(Resource.Id.layout_suggestion_lastactivities);
                LayoutFriendRequest            = (RelativeLayout)view.FindViewById(Resource.Id.layout_friend_Request);
                LayoutSuggestionPromotedPage   = (LinearLayout)view.FindViewById(Resource.Id.layout_suggestion_PromotedPage);

                LastActivitiesRecyclerView.Visibility     = ViewStates.Gone;
                LayoutSuggestionLastActivities.Visibility = ViewStates.Gone;

                if (!AppSettings.ShowLastActivities)
                {
                    LastActivitiesRecyclerView.Visibility     = ViewStates.Gone;
                    LayoutSuggestionLastActivities.Visibility = ViewStates.Gone;
                }

                if (AppSettings.ConnectivitySystem == 1)
                {
                    TxTFriendRequest.Text    = Context.GetString(Resource.String.Lbl_FollowRequest);
                    TxtAllFriendRequest.Text = Context.GetString(Resource.String.Lbl_View_All_FollowRequest);
                }

                LayoutFriendRequest.Click    += LayoutFriendRequestOnClick;
                TxTMoreLastActivities.Click  += MoreLastActivitiesOnClick;
                IconMoreLastActivities.Click += MoreLastActivitiesOnClick;

                AdsGoogle.Ad_AdMobNative(Activity);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        private void SetupViews()
        {
            this.textViewAppVersion = FindViewById <TextView>(Resource.Id.textViewAppVersion);
            var version = this.ApplicationContext.PackageManager.GetPackageInfo(this.ApplicationContext.PackageName, 0).VersionName;

            this.textViewAppVersion.Text = String.Format("Wersja aplikacji: {0}", version);
            this.infoLayout             = FindViewById <NestedScrollView>(Resource.Id.appInfoLayout);
            this.contactLayout          = FindViewById <RelativeLayout>(Resource.Id.contactLayout);
            this.btnSendFeedback        = FindViewById <Button>(Resource.Id.btnSendFeedback);
            this.btnSendFeedback.Click += (s, e) =>
            {
                TogleLayouts();
            };
            this.btnSubmitSenInfo   = FindViewById <Button>(Resource.Id.btnSubmitSenInfo);
            btnSubmitSenInfo.Click += async(s, e) =>
            {
                if (selectedMessageTypeItemPosition == 0 && String.IsNullOrEmpty(telModel.Text))
                {
                    AlertsService.ShowShortToast(this, "Podaj model telefonu");
                    return;
                }
                if (String.IsNullOrEmpty(messageINfoContet.Text))
                {
                    AlertsService.ShowShortToast(this, "WprowadŸ treœæ wiadomoœci.");
                    return;
                }
                progress.ShowProgressDialog("Wysy³anie zg³oszenia...");
                var model = new NotificationFromUser();
                model.Title          = messageTypeStringContent;
                model.TelModel       = this.telModel.Text;
                model.MessageContent = this.messageINfoContet.Text;
                progress.CloseProgressDialog();
                var success = await this.feedbackService.SendNotificationFromUser(model);

                if (success)
                {
                    AlertsService.ShowLongToast(this, "Zg³oszenie zosta³o wys³ane. Dziêkujemy.");
                    ClearViews();
                    OnBackPressed();
                }
                else
                {
                    AlertsService.ShowShortToast(this, "Nie uda³o siê wys³aæ zg³oszenia.");
                }
            };
            this.messageType       = FindViewById <Spinner>(Resource.Id.messageType);
            this.telModel          = FindViewById <EditText>(Resource.Id.telModel);
            this.messageINfoContet = FindViewById <EditText>(Resource.Id.messageINfoContet);

            SetupSpinner();
        }
        public override AView OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var shellSection = ShellSection;

            if (shellSection == null)
            {
                return(null);
            }

            var root = inflater.Inflate(Resource.Layout.RootLayout, null).JavaCast <CoordinatorLayout>();

            _toolbar    = root.FindViewById <Toolbar>(Resource.Id.main_toolbar);
            _scrollview = root.FindViewById <NestedScrollView>(Resource.Id.main_scrollview);
            _tablayout  = root.FindViewById <TabLayout>(Resource.Id.main_tablayout);

            _viewPager = new FormsViewPager(Context)
            {
                LayoutParameters = new LP(LP.MatchParent, LP.MatchParent),
                EnableGesture    = false
            };

            _viewPager.AddOnPageChangeListener(this);
            _viewPager.Id = Platform.GenerateViewId();

            _viewPager.Adapter        = new ShellFragmentPagerAdapter(shellSection, ChildFragmentManager);
            _viewPager.OverScrollMode = OverScrollMode.Never;

            _tablayout.SetupWithViewPager(_viewPager);

            var currentPage  = ((IShellContentController)shellSection.CurrentItem).GetOrCreateContent();
            var currentIndex = ShellSection.Items.IndexOf(ShellSection.CurrentItem);

            _toolbarTracker      = _shellContext.CreateTrackerForToolbar(_toolbar);
            _toolbarTracker.Page = currentPage;

            _viewPager.CurrentItem = currentIndex;
            _scrollview.AddView(_viewPager);

            if (shellSection.Items.Count == 1)
            {
                _tablayout.Visibility = ViewStates.Gone;
            }

            _tabLayoutAppearanceTracker = _shellContext.CreateTabLayoutAppearanceTracker(ShellSection);
            _toolbarAppearanceTracker   = _shellContext.CreateToolbarAppearanceTracker();

            HookEvents();

            return(_rootView = root);
        }
Beispiel #19
0
        private void SetSortingOptionsLayout()
        {
            sortingOptionsLayout = FindViewById <NestedScrollView>(Resource.Id.layoutSortingOptions);

            textViewSelectedTransactionKind = FindViewById <TextView>(Resource.Id.textViewSelectedTransactionKind);
            var btnTransaction = FindViewById <ImageView>(Resource.Id.btnSelectTransactionKind);

            textViewSelectedTransactionKind.Click += BtnTransaction_Click;
            btnTransaction.Click += BtnTransaction_Click;

            textViewSelectedAdvertsStatus = FindViewById <TextView>(Resource.Id.textViewSelectedAdvertsStatus);
            var btnAdvertsStatus = FindViewById <ImageView>(Resource.Id.btnSelectAdvertsStatus);

            textViewSelectedAdvertsStatus.Click += BtnAdvertsStatus_Click;
            btnAdvertsStatus.Click += BtnAdvertsStatus_Click;

            var btnSelectCategories = FindViewById <ImageView>(Resource.Id.btnSelectCategoryForMainList);

            this.textViewSelectCategories   = FindViewById <TextView>(Resource.Id.textViewSelectedCategoryForMainList);
            textViewSelectCategories.Click += BtnSelectCategories_Click;
            btnSelectCategories.Click      += BtnSelectCategories_Click;

            this.textViewSelectedSize = FindViewById <TextView>(Resource.Id.textViewSelectedSizes);
            this.btnSize = FindViewById <ImageView>(Resource.Id.btnSize);
            textViewSelectedSize.Click += BtnSize_Click;
            btnSize.Click += BtnSize_Click;


            var btnDistance = FindViewById <ImageView>(Resource.Id.btnDistance);

            this.textViewSelectedDistance   = FindViewById <TextView>(Resource.Id.textViewSelectedDistance);
            textViewSelectedDistance.Click += BtnDistance_Click;
            btnDistance.Click += BtnDistance_Click;

            this.textViewSelectedUser = FindViewById <TextView>(Resource.Id.textViewSelectedUser);
            var btnSelectUser = FindViewById <ImageView>(Resource.Id.btnSelectUser);

            textViewSelectedUser.Click += BtnSelectUser_Click;
            btnSelectUser.Click        += BtnSelectUser_Click;


            var btnSorting = FindViewById <ImageView>(Resource.Id.btnSorting);

            this.textViewSelectedSorting   = FindViewById <TextView>(Resource.Id.textViewSelectedSorting);
            textViewSelectedSorting.Click += BtnSorting_Click;
            btnSorting.Click += BtnSorting_Click;
        }
Beispiel #20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_scroll);

            _username   = FindViewById(Resource.Id.username);
            _avatar     = FindViewById(Resource.Id.avatar);
            _follow     = FindViewById(Resource.Id.follow);
            _background = FindViewById(Resource.Id.background);
            _scrollView = FindViewById <NestedScrollView>(Resource.Id.scrollview);

            _height = (int)Resources.GetDimension(Resource.Dimension.height);

            _expectAnimMove = new ExpectAnim()
                              .Expect(_avatar)
                              .ToBe(
                TopOfParent().WithMarginDp(20),
                LeftOfParent().WithMarginDp(20),
                Scale(0.5f, 0.5f)
                )

                              .Expect(_username)
                              .ToBe(
                ToRightOf(_avatar).WithMarginDp(16),
                SameCenterVerticalAs(_avatar),

                Alpha(0.5f)
                )

                              .Expect(_follow)
                              .ToBe(
                RightOfParent().WithMarginDp(20),
                SameCenterVerticalAs(_avatar)
                )

                              .Expect(_background)
                              .ToBe(
                Height(_height).WithGravity(GravityFlags.Left, GravityFlags.Top)
                )
                              .ToAnimation();

            _scrollView.ScrollChange += (sender, args) => {
                float percent = args.ScrollY * 1f / _scrollView.MaxScrollAmount;
                _expectAnimMove.SetPercent(percent);
            };
        }
        public AutoCompleteView()
        {
            Container           = new Grid();
            SearchEntry         = new Entry();
            SuggestionsListView = new ItemsStack();
            SuggestionWrapper   = new NestedScrollView();

            // init Grid Layout
            Container.RowSpacing = 0;
            Container.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Star
            });
            Container.RowDefinitions.Add(new RowDefinition()
            {
                Height = GridLength.Star
            });
            Container.RowDefinitions.Add(new RowDefinition()
            {
                Height = 50
            });
            Container.HeightRequest = 50;

            // init Search Entry
            SearchEntry.HorizontalOptions = LayoutOptions.Fill;
            SearchEntry.VerticalOptions   = LayoutOptions.Fill;
            SearchEntry.TextChanged      += SearchEntry_TextChanged;
            SearchEntry.Unfocused        += SearchEntry_Unfocused;
            SearchEntry.Focused          += SearchEntry_Focused;

            // init Suggestions ListView
            SuggestionsListView.BackgroundColor = Color.White;
            //SuggestionsListView.ItemTapped += SuggestionsListView_ItemSelected;
            SuggestionsListView.VerticalOptions = LayoutOptions.End;
            SuggestionsListView.Spacing         = 1;

            // suggestions Listview's wrapper
            SuggestionWrapper.VerticalOptions = LayoutOptions.Fill;
            SuggestionWrapper.Orientation     = ScrollOrientation.Vertical;
            SuggestionWrapper.BackgroundColor = Color.White;
            SuggestionWrapper.Content         = SuggestionsListView;

            Container.Children.Add(SuggestionWrapper);
            Container.Children.Add(SearchEntry, 0, 1);

            this.Content = Container;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            try
            {
                if (!IsConnected())
                {
                    return(null);
                }

                View rootView = inflater.Inflate(Resource.Layout.fragment_blank, container, false);

                rv  = rootView.FindViewById <RecyclerView>(Resource.Id.rv_recycler_view);
                nsv = rootView.FindViewById <NestedScrollView>(Resource.Id.nsv);
                rv.NestedScrollingEnabled = false;
                rv.HasFixedSize           = true;

                var llm = new GridLayoutManager(this.Context, SpanCount, GridLayoutManager.Vertical, false);
                rv.SetLayoutManager(llm);

                SetupOnScroll();

                var adapter1 = SetAdapter();

                adapter1.HasStableIds = true;
                GetData();
                rv.SetAdapter(adapter1);
                HideLoading();
                return(rootView);
            }
            catch (Exception ex)
            {
                if (ex.InnerException is Java.Net.UnknownHostException)
                {
                    new AlertDialog.Builder(Context)
                    .SetTitle("No Internet")
                    .SetMessage("Please check your internet connection")
                    .SetPositiveButton("Retry", (sender, args) =>
                    {
                        StartActivity(new Intent(Context, typeof(MainActivity)));
                    })
                    .Show();
                }
            }

            return(null);
        }
Beispiel #23
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            NestedScrollView nestedScrollView = (NestedScrollView)inflater.Inflate(Resource.Layout.fragment_dialogs, container, false);

            btn_dialog_1  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_1);
            btn_dialog_2  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_2);
            btn_dialog_3  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_3);
            btn_dialog_4  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_4);
            btn_dialog_5  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_5);
            btn_dialog_6  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_6);
            btn_dialog_7  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_7);
            btn_dialog_8  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_8);
            btn_dialog_9  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_9);
            btn_dialog_10 = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_10);
            btn_dialog_11 = nestedScrollView.FindViewById <Button>(Resource.Id.btn_dialog_11);

            return(nestedScrollView);
        }
Beispiel #24
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            slug = Intent.GetStringExtra("slug");
            //slug = "22921645";
            handler       = new Handler();
            postPresenter = new PostPresenter(this);
            SetContentView(Resource.Layout.post);
            toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);
            toolbar.SetBackgroundColor(Color.Transparent);
            toolbar.SetTitleTextColor(Color.White);
            toolbar.SetNavigationIcon(Resource.Drawable.ic_arrow_back_white_24dp);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            toolbar.SetNavigationOnClickListener(this);

            coordinatorLayout = FindViewById <CoordinatorLayout>(Resource.Id.main_content);
            collapsingToolbar = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingtoolbar);

            appbar = FindViewById <AppBarLayout>(Resource.Id.appbar);
            appbar.AddOnOffsetChangedListener(this);

            swipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout);
            swipeRefreshLayout.SetOnRefreshListener(this);
            scrollView = FindViewById <NestedScrollView>(Resource.Id.scrollView);
            scrollView.ViewTreeObserver.AddOnScrollChangedListener(this);

            toolbarTitle  = FindViewById <TextView>(Resource.Id.toolbarTitle);
            titleImage    = FindViewById <ImageView>(Resource.Id.titleImage);
            imgAvatar     = FindViewById <ImageView>(Resource.Id.llAvatar);
            org           = FindViewById <ImageView>(Resource.Id.org);
            txtColumnName = FindViewById <TextView>(Resource.Id.txtColumnName);
            txtAuthor     = FindViewById <TextView>(Resource.Id.txtAuthor);
            txtTitle      = FindViewById <TextView>(Resource.Id.txtTitle);
            txtBio        = FindViewById <TextView>(Resource.Id.txtBio);
            postContent   = FindViewById <PostWebView>(Resource.Id.postContent);
            txtTime       = FindViewById <TextView>(Resource.Id.txtTime);

            swipeRefreshLayout.Post(() =>
            {
                swipeRefreshLayout.Refreshing = true;
                OnRefresh();
            });
        }
Beispiel #25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            slug             = Intent.GetIntExtra("slug", 0);
            handler          = new Handler();
            articlePresenter = new ArticlePresenter(this);

            toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);
            toolbar.SetNavigationIcon(Resource.Drawable.back_24dp);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            toolbar.SetNavigationOnClickListener(this);
            toolbar.SetOnMenuItemClickListener(this);

            coordinatorLayout = FindViewById <CoordinatorLayout>(Resource.Id.main_content);
            collapsingToolbar = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingtoolbar);

            appbar = FindViewById <AppBarLayout>(Resource.Id.appbar);
            appbar.AddOnOffsetChangedListener(this);

            swipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout);
            swipeRefreshLayout.SetColorSchemeResources(Resource.Color.primary);
            swipeRefreshLayout.SetOnRefreshListener(this);
            scrollView = FindViewById <NestedScrollView>(Resource.Id.scrollView);
            scrollView.ViewTreeObserver.AddOnScrollChangedListener(this);

            toolbarTitle   = FindViewById <TextView>(Resource.Id.toolbarTitle);
            titleImage     = FindViewById <ImageView>(Resource.Id.titleImage);
            imgAvatar      = FindViewById <ImageViewAsync>(Resource.Id.llAvatar);
            org            = FindViewById <ImageView>(Resource.Id.org);
            txtAuthor      = FindViewById <TextView>(Resource.Id.txtAuthor);
            txtTitle       = FindViewById <TextView>(Resource.Id.txtTitle);
            txtBio         = FindViewById <TextView>(Resource.Id.txtBio);
            articleContent = FindViewById <ArticleWebView>(Resource.Id.postContent);
            txtTime        = FindViewById <TextView>(Resource.Id.txtTime);
            txtGood        = FindViewById <TextView>(Resource.Id.txtGood);
            txtComments    = FindViewById <TextView>(Resource.Id.txtComments);

            swipeRefreshLayout.Post(async() =>
            {
                await articlePresenter.GetClientArticle(slug);
            });
        }
Beispiel #26
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            NestedScrollView nestedScrollView = (NestedScrollView)inflater.Inflate(Resource.Layout.fragment_cards, container, false);

            btn_card_main1_action1  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_card_main1_action1);
            btn_card_main1_action2  = nestedScrollView.FindViewById <Button>(Resource.Id.btn_card_main1_action2);
            img_main_card2_share    = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card2_share);
            img_main_card2_bookmark = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card2_bookmark);
            img_main_card2_favorite = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card2_favorite);
            ll_card_main3_rate      = nestedScrollView.FindViewById <LinearLayout>(Resource.Id.ll_card_main3_rate);

            img_main_card_1  = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card_1);
            img_main_card_2  = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card_2);
            img_card_main_3  = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_card_main_3);
            img_main_card_41 = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card_41);
            img_main_card_42 = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card_42);

            img_main_card41_favorite = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card41_favorite);
            img_main_card42_favorite = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card42_favorite);
            img_main_card41_bookmark = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card41_bookmark);
            img_main_card42_bookmark = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card42_bookmark);
            img_main_card41_share    = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card41_share);
            img_main_card42_share    = nestedScrollView.FindViewById <ImageView>(Resource.Id.img_main_card42_share);

            card_main_1_1   = nestedScrollView.FindViewById <CardView>(Resource.Id.card_main_1_1);
            card_main_1_2   = nestedScrollView.FindViewById <CardView>(Resource.Id.card_main_1_2);
            card_main_1_3   = nestedScrollView.FindViewById <CardView>(Resource.Id.card_main_1_3);
            card_main_1_4_1 = nestedScrollView.FindViewById <CardView>(Resource.Id.card_main_1_4_1);
            card_main_1_4_2 = nestedScrollView.FindViewById <CardView>(Resource.Id.card_main_1_4_2);

            Glide.With(this).Load(Resource.Drawable.material_design_2).Apply(RequestOptions.FitCenterTransform()).Into(img_main_card_1);
            Glide.With(this).Load(Resource.Drawable.material_design_4).Apply(RequestOptions.FitCenterTransform()).Into(img_main_card_2);
            Glide.With(this).Load(Resource.Drawable.material_design_11).Apply(RequestOptions.FitCenterTransform()).Into(img_card_main_3);
            Glide.With(this).Load(Resource.Drawable.material_design_1).Apply(RequestOptions.FitCenterTransform()).Into(img_main_card_41);
            Glide.With(this).Load(Resource.Drawable.material_design_1).Apply(RequestOptions.FitCenterTransform()).Into(img_main_card_42);

            //ad_view = nestedScrollView.FindViewById(Resource.Id.ad_view);
            card_ad = nestedScrollView.FindViewById <CardView>(Resource.Id.card_ad);

            return(nestedScrollView);
        }
Beispiel #27
0
        protected override void LoadSyncElements()
        {
            base.LoadSyncElements();

            _credit          = JsonConvert.DeserializeObject <Shared.Models.Credit>(Intent.GetStringExtra("credit"));
            _avialableCredit = JsonConvert.DeserializeObject <List <Shared.Models.AvialableCredit> >(Intent.GetStringExtra("AvialableCredit"));

            _title      = FindViewById <TextView>(Resource.Id.compare_credit_title);
            _title.Text = _credit.BankName;

            _subTitle      = FindViewById <TextView>(Resource.Id.compare_credit_subtitle);
            _subTitle.Text = $"{_credit.Procent}%, {_credit.Amount} руб., на {_credit.DurationInMonth} мес.";

            _list = FindViewById <RecyclerView>(Resource.Id.compare_list);
            _list.SetLayoutManager(new NotCanScrollGridLayoutManager(this, 1));
            _list.AddItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.Vertical));
            _list.SetAdapter(new AvialableCreditAdapter(_avialableCredit));
            _list.NestedScrollingEnabled = false;

            _nestedScrollView = FindViewById <NestedScrollView>(Resource.Id.nested);
        }
Beispiel #28
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            if (Vm == null)
            {
                throw new ArgumentNullException();
            }
            var scrollView = new NestedScrollView(container.Context)
            {
                LayoutParameters = container.LayoutParameters
            };
            var layout = new LinearLayout(container.Context)
            {
                LayoutParameters = scrollView.LayoutParameters,
                Orientation      = Orientation.Vertical
            };

            var view = inflater.Inflate(Resource.Layout.ItemEditWiki, layout, true);

            TitleText   = view.FindViewById <EditText>(Resource.Id.editText1);
            SummaryText = view.FindViewById <EditText>(Resource.Id.editText2);

            _bindings.Add(this.SetBinding(() => Vm.Model.Title, () => TitleText.Text, BindingMode.TwoWay));
            _bindings.Add(this.SetBinding(() => Vm.Model.Title, () => SummaryText.Text, BindingMode.TwoWay));

            var counter = 0;

            foreach (var section in Vm.Model.Sections)
            {
                view = inflater.Inflate(Resource.Layout.ItemEditWiki, layout, true);
                TitleEditTexts.Add(view.FindViewById <EditText>(Resource.Id.editText1));
                SectionEditTexts.Add(view.FindViewById <EditText>(Resource.Id.editText2));

                // Attempted to bind. But setBinding doesn't work as edit texts are in a List. Don't see any other way of holding references to the edit texts as the number is dynamic.
                TitleEditTexts[counter].Text = section.Title;
                TitleEditTexts[counter].Text = section.Content;
                counter++;
            }
            scrollView.AddView(layout);
            return(scrollView);
        }
        // -----------------------------------------------------------------------------

        // Lifecycle
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Init
            SetContentView(Resource.Layout.Main);
            Title = "Layout Test";

            // Toolbar
            SetSupportActionBar(FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar));

            // Controls
            _bottomSheetHeaderLayout = FindViewById <LinearLayout>(Resource.Id.bottomSheetHeaderLayout);
            _bottomSheetBodyTextView = FindViewById <TextView>(Resource.Id.bottomSheetBodyTextView);

            _bottomNavigationView = FindViewById <BottomNavigationView>(Resource.Id.bottom_navigation);

            _bottomNavigationView.NavigationItemSelected += BottomNavigation_NavigationItemSelected;

            var coordinatorLayout = FindViewById <CoordinatorLayout>(Resource.Id.mainLayout);

            _bottomSheetScrollView = coordinatorLayout.FindViewById <NestedScrollView>(Resource.Id.bottomSheetScrollView);
            var bottomSheetBehavior = BottomSheetBehavior.From(_bottomSheetScrollView);

            //bottomSheetBehavior.PeekHeight = 0;
            bottomSheetBehavior.SetBottomSheetCallback(new CustomBottomSheetCallback(_bottomSheetHeaderLayout, _bottomSheetBodyTextView, _bottomSheetScrollView));

            // Coordinator Layout
            //var coordinatorLayout = FindViewById<CoordinatorLayout>(Resource.Id.mainLayout);
            //var colorBottomSheet = coordinatorLayout.FindViewById<NestedScrollView>(Resource.Id.bottomSheetScrollView);
            //var bottomSheetBehavior = BottomSheetBehavior.From(colorBottomSheet);
            //var effects = FindViewById<Button>(Resource.Id.effects);
            //effects.Click += (sender, e) =>
            //{
            //    bottomSheetBehavior.State = BottomSheetBehavior.StateExpanded;
            //};

            // Load the first fragment on creation
            LoadFragment(new HomeFragment());
        }
Beispiel #30
0
        protected override void InitializeViews(View fragmentView)
        {
            helpView                      = fragmentView.FindViewById(Resource.Id.SettingsHelpButton);
            aboutView                     = fragmentView.FindViewById(Resource.Id.SettingsAboutContainer);
            logoutView                    = fragmentView.FindViewById(Resource.Id.SettingsLogoutButton);
            feedbackView                  = fragmentView.FindViewById(Resource.Id.SettingsSubmitFeedbackButton);
            manualModeView                = fragmentView.FindViewById(Resource.Id.SettingsToggleManualModeView);
            is24hoursModeView             = fragmentView.FindViewById(Resource.Id.SettingsIs24HourModeView);
            avatarContainer               = fragmentView.FindViewById(Resource.Id.SettingsViewAvatarImageContainer);
            dateFormatView                = fragmentView.FindViewById(Resource.Id.SettingsDateFormatView);
            beginningOfWeekView           = fragmentView.FindViewById(Resource.Id.SettingsSelectBeginningOfWeekView);
            durationFormatView            = fragmentView.FindViewById(Resource.Id.SettingsDurationFormatView);
            calendarSettingsView          = fragmentView.FindViewById(Resource.Id.CalendarSettingsView);
            smartRemindersView            = fragmentView.FindViewById(Resource.Id.SmartRemindersView);
            smartRemindersViewSeparator   = fragmentView.FindViewById(Resource.Id.SmartRemindersViewSeparator);
            runningTimerNotificationsView = fragmentView.FindViewById(Resource.Id.SettingsRunningTimerNotificationsView);
            stoppedTimerNotificationsView = fragmentView.FindViewById(Resource.Id.SettingsStoppedTimerNotificationsView);
            groupTimeEntriesView          = fragmentView.FindViewById(Resource.Id.GroupTimeEntriesView);

            nameTextView            = fragmentView.FindViewById <TextView>(Resource.Id.SettingsNameTextView);
            emailTextView           = fragmentView.FindViewById <TextView>(Resource.Id.SettingsEmailTextView);
            versionTextView         = fragmentView.FindViewById <TextView>(Resource.Id.SettingsAppVersionTextView);
            dateFormatTextView      = fragmentView.FindViewById <TextView>(Resource.Id.SettingsDateFormatTextView);
            beginningOfWeekTextView = fragmentView.FindViewById <TextView>(Resource.Id.SettingsBeginningOfWeekTextView);
            durationFormatTextView  = fragmentView.FindViewById <TextView>(Resource.Id.SettingsDurationFormatTextView);
            smartRemindersTextView  = fragmentView.FindViewById <TextView>(Resource.Id.SmartRemindersTextView);

            avatarView                      = fragmentView.FindViewById <ImageView>(Resource.Id.SettingsViewAvatarImage);
            manualModeSwitch                = fragmentView.FindViewById <Switch>(Resource.Id.SettingsIsManualModeEnabledSwitch);
            is24hoursModeSwitch             = fragmentView.FindViewById <Switch>(Resource.Id.SettingsIs24HourModeSwitch);
            runningTimerNotificationsSwitch = fragmentView.FindViewById <Switch>(Resource.Id.SettingsAreRunningTimerNotificationsEnabledSwitch);
            stoppedTimerNotificationsSwitch = fragmentView.FindViewById <Switch>(Resource.Id.SettingsAreStoppedTimerNotificationsEnabledSwitch);
            groupTimeEntriesSwitch          = fragmentView.FindViewById <Switch>(Resource.Id.GroupTimeEntriesSwitch);

            workspacesRecyclerView = fragmentView.FindViewById <RecyclerView>(Resource.Id.SettingsWorkspacesRecyclerView);
            toolbar = fragmentView.FindViewById <Toolbar>(Resource.Id.Toolbar);

            scrollView = fragmentView.FindViewById <NestedScrollView>(Resource.Id.ScrollView);
        }