public MaintenanceListViewHolder(View itemView, Action <object, int> clickAction) : base(itemView)
 {
     _title   = itemView.FindViewById <TextView>(Resource.Id.maintenancelistitem_title);
     _dueDate = itemView.FindViewById <TextView>(Resource.Id.maintenancelistitem_dueDate);
     _maintenanceListItemConstraintLayout        = itemView.FindViewById <ConstraintLayout>(Resource.Id.maintenancelistitem_ConstraintLayout);
     _maintenanceListItemConstraintLayout.Click += (s, e) => clickAction(this, AdapterPosition);
 }
Example #2
0
        protected override void OnFinishInflate()
        {
            base.OnFinishInflate();

            NativeAdView = (UnifiedNativeAdView)FindViewById(Resource.Id.native_ad_view);

            if (!AppSettings.ShowAdMobNative)
            {
                NativeAdView.Visibility = ViewStates.Gone;
            }
            else
            {
                if (TemplateType != Resource.Layout.gnt_big_template_view)
                {
                    PrimaryView   = (TextView)FindViewById(Resource.Id.primary);
                    SecondaryView = (TextView)FindViewById(Resource.Id.secondary);
                    TertiaryView  = (TextView)FindViewById(Resource.Id.body);

                    //RatingBar = (RatingBar)FindViewById(Resource.Id.rating_bar);
                    //RatingBar.Enabled=false;

                    //CallToActionView = (Button)FindViewById(Resource.Id.cta);
                    IconView   = (ImageView)FindViewById(Resource.Id.icon);
                    MediaView  = (MediaView)FindViewById(Resource.Id.media_view);
                    Background = (ConstraintLayout)FindViewById(Resource.Id.background);
                }
            }
        }
Example #3
0
        private void BindViews(View root)
        {
            _quick_chat_holder  = root.FindViewById <LinearLayout>(Resource.Id.quick_chat_holder);
            _chat_layout_holder = root.FindViewById <ConstraintLayout>(Resource.Id.chat_layout_holder);

            QuickButtons.Add(new Tuple <CircularImageButton, AppCompatTextView>(root.FindViewById <CircularImageButton>(Resource.Id.qc_emergency), root.FindViewById <AppCompatTextView>(Resource.Id.qc_emergency_name)));
            QuickButtons.Add(new Tuple <CircularImageButton, AppCompatTextView>(root.FindViewById <CircularImageButton>(Resource.Id.qc_activity), root.FindViewById <AppCompatTextView>(Resource.Id.qc_activity_name)));
            QuickButtons.Add(new Tuple <CircularImageButton, AppCompatTextView>(root.FindViewById <CircularImageButton>(Resource.Id.qc_safe), root.FindViewById <AppCompatTextView>(Resource.Id.qc_safe_name)));
            _safeButtonHolder = root.FindViewById <LinearLayout>(Resource.Id.qc_safe_holder);
            // if the fragment is contained in an EventDetailActivity, initially make labels invisible by setting alpha to 0
            if (_parentId == Resource.Layout.event_detail_activity)
            {
                foreach (var button in QuickButtons)
                {
                    button.Item2.Alpha = 0;
                }
            }

            _chatInputHolder       = root.FindViewById <ConstraintLayout>(Resource.Id.chat_input_holder);
            _chatMessageInput      = root.FindViewById <AppCompatEditText>(Resource.Id.chat_input);
            _chatMessageSendButton = root.FindViewById <CircularImageButton>(Resource.Id.send_button);

            _eventButtons = root.FindViewById <RecyclerView>(Resource.Id.chat_button_list);
            _chatMessages = root.FindViewById <RecyclerView>(Resource.Id.chat_area);
        }
        private void InitLayout()
        {
            _constraintLayoutRoot = this.BindingInflate(LayoutId, null) as ConstraintLayout;

            ConstraintLayout.LayoutParams layoutParams = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MatchConstraint, ConstraintLayout.LayoutParams.MatchConstraint);
            _constraintLayoutRoot.LayoutParameters = layoutParams;

            BaseMainConstraintLayout.RemoveView(BaseScrollView);
            BaseScrollView.RemoveView(BaseElementsConstraintLayout);
            BaseMainConstraintLayout.AddView(BaseElementsConstraintLayout);

            BaseMainConstraintLayout.BringChildToFront(BasePreLoaderConstraintLayout);

            var rootElementSet = new ConstraintSet();

            rootElementSet.Clone(BaseMainConstraintLayout);
            rootElementSet.Connect(BaseElementsConstraintLayout.Id, ConstraintSet.Top, BaseMainConstraintLayout.Id, ConstraintSet.Top);
            rootElementSet.Connect(BaseElementsConstraintLayout.Id, ConstraintSet.Bottom, BaseMainConstraintLayout.Id, ConstraintSet.Bottom);
            rootElementSet.Connect(BaseElementsConstraintLayout.Id, ConstraintSet.Left, BaseMainConstraintLayout.Id, ConstraintSet.Left);
            rootElementSet.Connect(BaseElementsConstraintLayout.Id, ConstraintSet.Right, BaseMainConstraintLayout.Id, ConstraintSet.Right);
            rootElementSet.ApplyTo(BaseMainConstraintLayout);

            BaseElementsConstraintLayout.AddView(_constraintLayoutRoot);

            ConstraintSet elementsSet = new ConstraintSet();

            elementsSet.Clone(BaseElementsConstraintLayout);

            elementsSet.Connect(_constraintLayoutRoot.Id, ConstraintSet.Top, _toolbar.Id, ConstraintSet.Bottom);
            elementsSet.Connect(_constraintLayoutRoot.Id, ConstraintSet.Bottom, BaseElementsConstraintLayout.Id, ConstraintSet.Bottom);
            elementsSet.Connect(_constraintLayoutRoot.Id, ConstraintSet.Left, BaseElementsConstraintLayout.Id, ConstraintSet.Left);
            elementsSet.Connect(_constraintLayoutRoot.Id, ConstraintSet.Right, BaseElementsConstraintLayout.Id, ConstraintSet.Right);

            elementsSet.ApplyTo(BaseElementsConstraintLayout);
        }
Example #5
0
        private void InitUi()
        {
            var toolbar = (Toolbar)FindViewById(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            Title = "Glicemie";

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);
            toolbar.NavigationClick += delegate {
                Finish();
            };

            LbStatus              = FindViewById <TextView>(Resource.Id.status);
            _dataContainer        = FindViewById <ConstraintLayout>(Resource.Id.dataContainer);
            _manualRegisterButton = FindViewById <Button>(Resource.Id.manual_register);

            _dataContainer.Visibility = ViewStates.Gone;
            _glucose = FindViewById <TextView>(Resource.Id.GlucoseTextView);
            //_scanButton = FindViewById<Button>(Resource.Id.ScanButton);
            _animationView = FindViewById <LottieAnimationView>(Resource.Id.animation_view);
            var filter =
                new SimpleColorFilter(ContextCompat.GetColor(this, Resource.Color.accent));

            _animationView.AddValueCallback(new KeyPath("**"), LottieProperty.ColorFilter,
                                            new LottieValueCallback(filter));
        }
Example #6
0
        private void SplashInit()
        {
            NextButton        = FindViewById <ImageButton>(Resource.Id.next_button);
            SkipButton        = FindViewById <Button>(Resource.Id.skip_button);
            SkipButton.Click += SkipToEnd;;
            NextButton.Click += NextButton_Click;

            FindViewById <TextView>(Resource.Id.goto_login).Click += Goto_LoginPage;
            ConstraintLayout      pagesHolder     = FindViewById <ConstraintLayout>(Resource.Id.pages_holder);
            PagesGestureListener  gestureListener = new PagesGestureListener(this);
            GestureDetectorCompat gestureDetector = new GestureDetectorCompat(this, gestureListener);

            pagesHolder.SetOnTouchListener(new PagesGestureRecognizer(gestureDetector));
            FindViewById <ImageView>(Resource.Id.number_signup).Click   += PhoneImageViewBtn_Click;
            FindViewById <ImageView>(Resource.Id.google_signup).Click   += GoogleSignup_Click;
            FindViewById <ImageView>(Resource.Id.facebook_signup).Click += FacebookSignup_Click;
            FindViewById <ImageView>(Resource.Id.email_signup).Click    += EmailLayout_Click;
            SplashBaseLayout = FindViewById <RelativeLayout>(Resource.Id.base_layout);

            IndicatorLayout indicators = FindViewById <IndicatorLayout>(Resource.Id.indicatorLayout);

            indicators.NumberOfIndicators = 3;

            FastFitPath            = FindViewById <ImageView>(Resource.Id.fast_fit_path_imageview);
            FastFitInitialDrawable = FastFitPath.Drawable;
        }
Example #7
0
        private void CreateBaseConstraints()
        {
            BaseMainConstraintLayout    = new ConstraintLayout(this);
            BaseMainConstraintLayout.Id = Resource.Id.BaseMainConstraintLayout;

            SetContentView(BaseMainConstraintLayout);

            BaseScrollView    = new ScrollView(this);
            BaseScrollView.Id = Resource.Id.BaseScrollView;
            BaseScrollView.VerticalScrollBarEnabled = false;
            ConstraintLayout.LayoutParams cplScrollView = new ConstraintLayout.LayoutParams(
                ConstraintLayout.LayoutParams.MatchConstraint, ConstraintLayout.LayoutParams.MatchConstraint);
            BaseScrollView.LayoutParameters = cplScrollView;

            BaseElementsConstraintLayout    = new ConstraintLayout(this);
            BaseElementsConstraintLayout.Id = Resource.Id.BaseElementsConstraintLayout;
            ConstraintLayout.LayoutParams cplBECL = new ConstraintLayout.LayoutParams(
                ConstraintLayout.LayoutParams.MatchParent, ConstraintLayout.LayoutParams.MatchParent);
            BaseElementsConstraintLayout.LayoutParameters       = cplBECL;
            BaseElementsConstraintLayout.DescendantFocusability = DescendantFocusability.BeforeDescendants;
            BaseElementsConstraintLayout.FocusableInTouchMode   = true;

            BasePreLoaderConstraintLayout    = new ConstraintLayout(this);
            BasePreLoaderConstraintLayout.Id = Resource.Id.BasePreLoaderConstraintLayout;
            ConstraintLayout.LayoutParams cplBPCL = new ConstraintLayout.LayoutParams(
                ConstraintLayout.LayoutParams.MatchParent, ConstraintLayout.LayoutParams.MatchParent);
            BasePreLoaderConstraintLayout.LayoutParameters = cplBPCL;
            BasePreLoaderConstraintLayout.SetBackgroundColor(Color.ParseColor("#5F555555"));
            BasePreLoaderConstraintLayout.Visibility = ViewStates.Invisible;
        }
Example #8
0
        void Init()
        {
            View rootView = Window.DecorView.RootView;

            rootView.LayoutDirection = LayoutUtils.GetLayoutDirection();
            ConstraintLayout settingsIntroLayout = FindViewById <ConstraintLayout>(Resource.Id.settings_intro_frame);
            ConstraintLayout howItWorksLayout    = FindViewById <ConstraintLayout>(Resource.Id.settings_saddan_frame);
            ConstraintLayout gdprLayout          = FindViewById <ConstraintLayout>(Resource.Id.settings_behandling_frame);
            ConstraintLayout helpLayout          = FindViewById <ConstraintLayout>(Resource.Id.settings_hjaelp_frame);
            ConstraintLayout aboutLayout         = FindViewById <ConstraintLayout>(Resource.Id.om_frame);
            ConstraintLayout deploymentLayout    = FindViewById <ConstraintLayout>(Resource.Id.test_frame);
            ConstraintLayout generalLayout       = FindViewById <ConstraintLayout>(Resource.Id.general_settings);

            TextView settingsIntroButton = settingsIntroLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView howItWorksButton    = howItWorksLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView gdprButton          = gdprLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView helpButton          = helpLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView aboutButton         = aboutLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView generalButton       = generalLayout.FindViewById <TextView>(Resource.Id.settings_general_link_text);
            TextView deploymentButton    = deploymentLayout.FindViewById <TextView>(Resource.Id.settings_link_text);

            ImageView _fhiLogo;

            _fhiLogo = FindViewById <ImageView>(Resource.Id.settings_icon_imageview);
            _fhiLogo.ContentDescription = ViewModels.InfectionStatusViewModel.SMITTESPORING_FHI_LOGO_ACCESSIBILITY;

            settingsIntroButton.Text          = _settingsViewModel.SettingItemList[0].Text;
            settingsIntroButton.TextAlignment = TextAlignment.ViewStart;
            howItWorksButton.Text             = _settingsViewModel.SettingItemList[1].Text;
            howItWorksButton.TextAlignment    = TextAlignment.ViewStart;
            gdprButton.Text             = _settingsViewModel.SettingItemList[2].Text;
            gdprButton.TextAlignment    = TextAlignment.ViewStart;
            helpButton.Text             = _settingsViewModel.SettingItemList[3].Text;
            helpButton.TextAlignment    = TextAlignment.ViewStart;
            aboutButton.Text            = _settingsViewModel.SettingItemList[4].Text;
            aboutButton.TextAlignment   = TextAlignment.ViewStart;
            generalButton.Text          = _settingsViewModel.SettingItemList[5].Text;
            generalButton.TextAlignment = TextAlignment.ViewStart;

            if (_settingsViewModel.ShowDebugItem)
            {
                deploymentButton.Text       = _settingsViewModel.SettingItemList[6].Text;
                deploymentLayout.Visibility = ViewStates.Visible;
            }

            ViewGroup closeButton = FindViewById <ViewGroup>(Resource.Id.ic_close_white);

            closeButton.ContentDescription          = ViewModels.SettingsViewModel.SETTINGS_ITEM_ACCESSIBILITY_CLOSE_BUTTON;
            closeButton.AccessibilityTraversalAfter = Resource.Id.settings_general_link_text;
            closeButton.Click         += new SingleClick((sender, e) => Finish()).Run;
            settingsIntroButton.Click += new SingleClick((sender, args) => NavigationHelper.GoToOnBoarding(this, false)).Run;
            howItWorksButton.Click    += new SingleClick((sender, args) => NavigationHelper.GoToSettingsHowItWorksPage(this)).Run;
            helpButton.Click          += new SingleClick((sender, args) => NavigationHelper.GoToSettingsHelpPage(this)).Run;
            aboutButton.Click         += new SingleClick((sender, args) => NavigationHelper.GoToSettingsAboutPage(this)).Run;
            gdprButton.Click          += new SingleClick((sender, args) => NavigationHelper.GoToConsentsWithdrawPage(this)).Run;
            deploymentButton.Click    += new SingleClick((sender, args) => NavigationHelper.GoToDebugPage(this)).Run;
            generalButton.Click       += new SingleClick((sender, args) => NavigationHelper.GoToGenetalSettingsPage(this)).Run;
        }
Example #9
0
 private void InitializeViews(Bundle savedInstanceState)
 {
     SetContentView(Resource.Layout.activity_end_navigation);
     endNavigationLayout = FindViewById <ConstraintLayout>(Resource.Id.endNavigationLayout);
     navigationView      = FindViewById <NavigationView>(Resource.Id.navigationView);
     loading             = FindViewById <ProgressBar>(Resource.Id.loading);
     message             = FindViewById <TextView>(Resource.Id.message);
     launchNavigationFab = FindViewById <FloatingActionButton>(Resource.Id.launchNavigation);
     navigationView.OnCreate(savedInstanceState);
 }
Example #10
0
 private void initGroups()
 {
     _groupControls         = _view.FindViewById <Group>(Resource.Id.controls);
     _groupProgressControls = _view.FindViewById <Group>(Resource.Id.progressControls);
     _groupErrorControls    = _view.FindViewById <Group>(Resource.Id.errorControls);
     _groupWinner           = _view.FindViewById <ConstraintLayout>(Resource.Id.clWinner);
     _progressView          = _view.FindViewById <LottieAnimationView>(Resource.Id.progressBar);
     _winnerView            = _view.FindViewById <LottieAnimationView>(Resource.Id.animViewWinner);
     _ivWinner = _view.FindViewById <ImageView>(Resource.Id.ivWinner);
 }
Example #11
0
 public void Include(ConstraintLayout constraintLayout, Guideline guideline)
 {
     constraintLayout = new ConstraintLayout(null);
     constraintLayout = new ConstraintLayout(null, null);
     constraintLayout = new ConstraintLayout(null, null, 1);
     guideline        = new Guideline(null);
     guideline        = new Guideline(null, null);
     guideline        = new Guideline(null, null, 1);
     guideline        = new Guideline(null, null, 1, 1);
 }
 private void InitializeViews(Bundle savedInstanceState)
 {
     SetContentView(Resource.Layout.activity_dual_navigation_map);
     dualNavigationMap   = FindViewById <ConstraintLayout>(Resource.Id.dualNavigationMap);
     mapView             = FindViewById <MapView>(Resource.Id.mapView);
     navigationView      = FindViewById <NavigationView>(Resource.Id.navigationView);
     loading             = FindViewById <ProgressBar>(Resource.Id.loading);
     launchNavigationFab = FindViewById <FloatingActionButton>(Resource.Id.launchNavigation);
     navigationView.OnCreate(savedInstanceState);
     mapView.OnCreate(savedInstanceState);
     mapView.GetMapAsync(this);
 }
Example #13
0
 public ChallengesCollectionViewHolder(View itemView, IMvxAndroidBindingContext context) : base(itemView, context)
 {
     mainView = itemView.FindViewById <ConstraintLayout>(Resource.Id.main_view);
     icon     = itemView.FindViewById <ImageView>(Resource.Id.icon);
     if (icon != null)
     {
         icon.SetColorFilter(new Color(ContextCompat.GetColor(Application.Context, Resource.Color.textIcon)), PorterDuff.Mode.SrcIn);
     }
     marginParams = mainView.LayoutParameters as MarginLayoutParams;
     FontHelper.UpdateFont(itemView.FindViewById <TextView>(Resource.Id.top_text), FontsConstants.PN_R, (float)0.03);
     FontHelper.UpdateFont(itemView.FindViewById <TextView>(Resource.Id.bottom_text), FontsConstants.PN_B, (float)0.035);
 }
Example #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.settings_activity);
            extras     = Intent.Extras;
            parcelable = (ProfileParcelable)extras.GetParcelable(Constants.PROFILE_DATA_EXTRA);

            username_tv = FindViewById <TextView>(Resource.Id.set_prof_name_tv);
            status_tv   = FindViewById <TextView>(Resource.Id.set_prof_extras_tv);
            var appBar  = FindViewById <AppBarLayout>(Resource.Id.settings_appbar);
            var toolbar = appBar.FindViewById <Toolbar>(Resource.Id.main_toolbar);

            profileConstraint = FindViewById <ConstraintLayout>(Resource.Id.profile_const);
            profileIv         = FindViewById <CircleImageView>(Resource.Id.set_prof_iv);

            toolbar.Title = "Settings";
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            toolbar.NavigationClick += Toolbar_NavigationClick;
            SupportFragmentManager.BeginTransaction()
            .Replace(Resource.Id.frag_container_s, new SettingsFragment())
            .CommitAllowingStateLoss();

            var prefs = PreferenceManager.GetDefaultSharedPreferences(this);

            prefs.RegisterOnSharedPreferenceChangeListener(this);
            var isOnline = prefs.GetBoolean(Constants.SWITCH_VALUE_EXTRA, false);

            SetOnlineStatus(isOnline);

            profileConstraint.Click += ProfileConstraint_Click;

            RequestOptions requestOptions = new RequestOptions();

            requestOptions.Placeholder(Resource.Drawable.user);

            imgUrl   = parcelable.UserProfile.ProfileImgUrl;
            username = parcelable.UserProfile.Username;
            phone    = parcelable.UserProfile.Phone;
            email    = parcelable.UserProfile.Email;
            status   = parcelable.UserProfile.Status;
            userPro  = new string[] { imgUrl, username, phone, status };

            Glide.With(this)
            .SetDefaultRequestOptions(requestOptions)
            .Load(imgUrl)
            .Into(profileIv);

            username_tv.Text = username;
            status_tv.Text   = status;
        }
        private void BindViews()
        {
            _messageInputHolder = FindViewById <ConstraintLayout>(Resource.Id.message_input_holder);
            _messageInput       = FindViewById <AppCompatEditText>(Resource.Id.message_input);
            _sendButton         = FindViewById <CircularImageButton>(Resource.Id.send_button);
            _cancelButton       = FindViewById <CircularImageButton>(Resource.Id.cancel_button);



            //          var lp = _messageInputHolder.LayoutParameters;
            //           lp.Width = DisplayDetails.DisplayWidthPx - PixelSizeConverter.DpToPx(48);
            //           _messageInputHolder.LayoutParameters = lp;
        }
Example #16
0
        private void UpdatePadding()
        {
            ConstraintLayout checkboxLayout    = FindViewById <ConstraintLayout>(Resource.Id.checkbox_layout);
            LinearLayout     consentInfoLayout = FindViewById <LinearLayout>(Resource.Id.consent_info_layout);

            // Post method moves setting padding to the end of action queue for consent_info_layout and sets padding when
            // height of checkbox_layout will be known. In this way we have dynamic padding.
            consentInfoLayout.Post(() => consentInfoLayout.SetPadding(
                                       consentInfoLayout.PaddingLeft,
                                       consentInfoLayout.PaddingTop,
                                       consentInfoLayout.PaddingRight,
                                       checkboxLayout.Height));
        }
Example #17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            _toolbar.Visibility = ViewStates.Gone;

            _cameraRoot            = this.FindViewById <ConstraintLayout>(Resource.Id.clCameraRoot);
            _cameraRoot.Click     += TapOnCamera;
            _caprtureButton        = this.FindViewById <Button>(Resource.Id.bCapture);
            _caprtureButton.Click += CaptureClicked;

            InitCamera();
        }
Example #18
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.content_main, container, false);

            _container = view.FindViewById <ConstraintLayout>(Resource.Id.container);
            _loading   = view.FindViewById <ProgressBar>(Resource.Id.loading);

            _posts = view.FindViewById <RecyclerView>(Resource.Id.posts);
            _posts.SetLayoutManager(new LinearLayoutManager(Context.ApplicationContext, LinearLayoutManager.Vertical, false));
            _adapter = new PostsAdapter();
            _posts.SetAdapter(_adapter);

            return(view);
        }
Example #19
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.drop_target_layout, container, false);

            imageHintContainer = view.FindViewById <ConstraintLayout>(Resource.Id.drop_image_hint);
            textHintContainer  = view.FindViewById <ConstraintLayout>(Resource.Id.drop_text_hint);

            imageDropContainer = view.FindViewById <RelativeLayout>(Resource.Id.drop_image_container);
            textDropContainer  = view.FindViewById <RelativeLayout>(Resource.Id.drop_text_container);
            imageDropContainer.SetOnDragListener(this);
            textDropContainer.SetOnDragListener(this);

            return(view);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                if (Settings.DisplaySize == 1 || Settings.DisplaySize is null)
                {
                    SetContentView(Resource.Layout.activity_chatone_normal);
                    messageOwn    = Resource.Drawable.message_own_normal;
                    messageTarget = Resource.Drawable.message_target_normal;
                }
                else
                {
                    SetContentView(Resource.Layout.activity_chatone_small);
                    messageOwn    = Resource.Drawable.message_own_small;
                    messageTarget = Resource.Drawable.message_target_small;
                }

                MainLayout        = FindViewById <ConstraintLayout>(Resource.Id.MainLayout);
                PageToolbar       = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.PageToolbar);
                ChatViewProfile   = FindViewById <ConstraintLayout>(Resource.Id.ChatViewProfile);
                ChatOneBack       = FindViewById <ImageButton>(Resource.Id.ChatOneBack);
                ChatTargetImage   = FindViewById <ImageView>(Resource.Id.ChatTargetImage);
                TargetName        = FindViewById <TextView>(Resource.Id.TargetName);
                MatchDate         = FindViewById <TextView>(Resource.Id.MatchDate);
                UnmatchDate       = FindViewById <TextView>(Resource.Id.UnmatchDate);
                ChatMessageWindow = FindViewById <ListView>(Resource.Id.ChatMessageWindow);
                NoMessages        = FindViewById <TextView>(Resource.Id.NoMessages);
                ChatEditMessage   = FindViewById <EditText>(Resource.Id.ChatEditMessage);
                ChatSendMessage   = FindViewById <ImageButton>(Resource.Id.ChatSendMessage);

                imm         = (InputMethodManager)GetSystemService(Context.InputMethodService);
                c.view      = MainLayout;
                menuCreated = false;

                SetSupportActionBar(PageToolbar);

                ChatOneBack.Click     += ChatOneBack_Click;
                ChatViewProfile.Click += ChatViewProfile_Click;
                ChatSendMessage.Click += ChatSendMessage_Click;

                ChatMessageWindow.SetOnScrollListener(this);
                MainLayout.ViewTreeObserver.AddOnGlobalLayoutListener(new KeyboardListener(this));
            }
            catch (Exception ex)
            {
                c.ReportErrorSilent(ex.Message + System.Environment.NewLine + ex.StackTrace);
            }
        }
Example #21
0
        void PostInflate()
        {
            nativeAdView  = FindViewById <UnifiedNativeAdView>(Resource.Id.native_ad_view);
            primaryView   = FindViewById <TextView>(Resource.Id.primary);
            secondaryView = FindViewById <TextView>(Resource.Id.secondary);
            tertiaryView  = FindViewById <TextView>(Resource.Id.body);

            ratingBar         = FindViewById <RatingBar>(Resource.Id.rating_bar);
            ratingBar.Enabled = false;

            callToActionView = FindViewById <Button>(Resource.Id.cta);
            iconView         = FindViewById <ImageView>(Resource.Id.icon);
            mediaView        = FindViewById <MediaView>(Resource.Id.media_view);
            background       = FindViewById <ConstraintLayout>(Resource.Id.background);
        }
Example #22
0
        private void IntiUi(View v)
        {
            _tbDetails        = v.FindViewById <EditText>(Resource.Id.input_details);
            _btnScan          = v.FindViewById <Button>(Resource.Id.btnScan);
            _btnAnulare       = v.FindViewById <Button>(Resource.Id.btnAnulare);
            _btnBloodPressure = v.FindViewById <Button>(Resource.Id.btnBloodPressure);

            _btnBloodGlucose = v.FindViewById <Button>(Resource.Id.btnBloodGlucose);

            _btnBenefits   = v.FindViewById <Button>(Resource.Id.benefits_button);
            _formContainer = v.FindViewById <ConstraintLayout>(Resource.Id.container);

            _progressBarDialog = new ProgressBarDialog("Va rugam asteptati", "Datele sunt procesate...", Activity, false);
            _progressBarDialog.Window.SetBackgroundDrawableResource(Resource.Color.colorPrimary);
        }
Example #23
0
 private void InitUi()
 {
     FragmentContext       = this;
     _sectionsPagerAdapter = new SectionsPagerAdapter(SupportFragmentManager);
     _mainContent          = FindViewById <ConstraintLayout>(Resource.Id.main_content);
     _viewPager            = FindViewById <FirstSetupViewPager>(Resource.Id.container);
     _viewPager.SetPagingEnabled(false);
     _viewPager.Adapter = _sectionsPagerAdapter;
     _progressBarDialog =
         new ProgressBarDialog(
             "Va rugam asteptati",
             "Se trimit datele",
             this, false);
     _progressBarDialog.Window.SetBackgroundDrawableResource(Resource.Color.colorPrimaryDark);
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_main);

            ConstraintLayout          constraintLayout = FindViewById <ConstraintLayout>(Resource.Id.bottomSheet);
            AnchorBottomSheetBehavior behavior         = AnchorBottomSheetBehavior.From(constraintLayout);

            int   hPx = Resources.DisplayMetrics.HeightPixels;
            float cardAnchorSizeDp = 270 + 20;
            float cardAnchorSizePx = PxFromDp(this, cardAnchorSizeDp);

            int anchor = hPx - (int)cardAnchorSizePx;

            behavior.AnchorOffset = anchor;
        }
Example #25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                if (Settings.DisplaySize == 1 || Settings.DisplaySize is null)
                {
                    SetContentView(Resource.Layout.activity_main_normal);
                }
                else
                {
                    SetContentView(Resource.Layout.activity_main_small);
                }

                MainLayout      = FindViewById <ConstraintLayout>(Resource.Id.MainLayout);
                LoginEmail      = FindViewById <EditText>(Resource.Id.LoginEmail);
                LoginPassword   = FindViewById <EditText>(Resource.Id.LoginPassword);
                LoginDone       = FindViewById <Button>(Resource.Id.LoginDone);
                ResetPassword   = FindViewById <Button>(Resource.Id.ResetPassword);
                ResetEmailText  = FindViewById <TextView>(Resource.Id.ResetEmailText);
                ResetEmail      = FindViewById <EditText>(Resource.Id.ResetEmail);
                ResetSendButton = FindViewById <Button>(Resource.Id.ResetSendButton);
                RegisterButton  = FindViewById <Button>(Resource.Id.RegisterButton);
                ListButton      = FindViewById <Button>(Resource.Id.ListButton);

                c.view = MainLayout;
                imm    = (InputMethodManager)GetSystemService(Context.InputMethodService);
                Window.SetSoftInputMode(SoftInput.AdjustPan);

                LoginPassword.KeyPress += LoginPassword_KeyPress;
                LoginDone.Click        += LoginDone_Click;
                ResetPassword.Click    += ResetPassword_Click;
                ResetEmail.KeyPress    += ResetEmail_KeyPress;
                ResetSendButton.Click  += ResetSendButton_Click;
                RegisterButton.Click   += RegisterButton_Click;
                ListButton.Click       += ListButton_Click;
            }
            catch (Exception ex)
            {
                c.ReportErrorSilent(ex.Message + System.Environment.NewLine + ex.StackTrace);
            }
        }
Example #26
0
        void Init()
        {
            ConstraintLayout settingsIntroLayout = FindViewById <ConstraintLayout>(Resource.Id.settings_intro_frame);
            ConstraintLayout howItWorksLayout    = FindViewById <ConstraintLayout>(Resource.Id.settings_saddan_frame);
            ConstraintLayout gdprLayout          = FindViewById <ConstraintLayout>(Resource.Id.settings_behandling_frame);
            ConstraintLayout helpLayout          = FindViewById <ConstraintLayout>(Resource.Id.settings_hjaelp_frame);
            ConstraintLayout aboutLayout         = FindViewById <ConstraintLayout>(Resource.Id.om_frame);
            ConstraintLayout deploymentLayout    = FindViewById <ConstraintLayout>(Resource.Id.test_frame);
            ConstraintLayout generalLayout       = FindViewById <ConstraintLayout>(Resource.Id.general_settings);

            TextView settingsIntroButton = settingsIntroLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView howItWorksButton    = howItWorksLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView gdprButton          = gdprLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView helpButton          = helpLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView aboutButton         = aboutLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView generalButton       = generalLayout.FindViewById <TextView>(Resource.Id.settings_link_text);
            TextView deploymentButton    = deploymentLayout.FindViewById <TextView>(Resource.Id.settings_link_text);

            settingsIntroButton.Text = _settingsViewModel.SettingItemList[0].Text;
            howItWorksButton.Text    = _settingsViewModel.SettingItemList[1].Text;
            gdprButton.Text          = _settingsViewModel.SettingItemList[2].Text;
            helpButton.Text          = _settingsViewModel.SettingItemList[3].Text;
            aboutButton.Text         = _settingsViewModel.SettingItemList[4].Text;
            generalButton.Text       = _settingsViewModel.SettingItemList[5].Text;

            if (_settingsViewModel.ShowDebugItem)
            {
                deploymentButton.Text       = _settingsViewModel.SettingItemList[6].Text;
                deploymentLayout.Visibility = ViewStates.Visible;
            }

            ViewGroup closeButton = FindViewById <ViewGroup>(Resource.Id.ic_close_white);

            closeButton.ContentDescription = ViewModels.SettingsViewModel.SETTINGS_ITEM_ACCESSIBILITY_CLOSE_BUTTON;
            closeButton.Click         += new SingleClick((sender, e) => Finish()).Run;
            settingsIntroButton.Click += new SingleClick((sender, args) => NavigationHelper.GoToOnBoarding(this, false)).Run;
            howItWorksButton.Click    += new SingleClick((sender, args) => NavigationHelper.GoToSettingsHowItWorksPage(this)).Run;
            helpButton.Click          += new SingleClick((sender, args) => NavigationHelper.GoToSettingsHelpPage(this)).Run;
            aboutButton.Click         += new SingleClick((sender, args) => NavigationHelper.GoToSettingsAboutPage(this)).Run;
            gdprButton.Click          += new SingleClick((sender, args) => NavigationHelper.GoToConsentsWithdrawPage(this)).Run;
            deploymentButton.Click    += new SingleClick((sender, args) => NavigationHelper.GoToDebugPage(this)).Run;
            generalButton.Click       += new SingleClick((sender, args) => NavigationHelper.GoToGenetalSettingsPage(this)).Run;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            AndroidX.AppCompat.Widget.Toolbar toolbar = FindViewById <AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            Button btn = FindViewById <Button>(Resource.Id.button1);

            btn.Click += BtnOnWebClick;
            Button btn2 = FindViewById <Button>(Resource.Id.button2);

            btn2.Click  += BtnOnUPIClick;
            flow         = FindViewById <Flow>(Resource.Id.flow1);
            parentLayout = FindViewById <ConstraintLayout>(Resource.Id.upi_layout);
            progressBar  = FindViewById <ProgressBar>(Resource.Id.progressBar1);
            getUpiApps();
        }
Example #28
0
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            mainRecycler    = FindViewById <RecyclerView>(Resource.Id.main_recycler);
            emptyRoot       = FindViewById <ConstraintLayout>(Resource.Id.rv_empty_view);
            swipe_container = FindViewById <SwipeRefreshLayout>(Resource.Id.main_refresher);
            addPostFab      = FindViewById <FloatingActionButton>(Resource.Id.post_fab);
            var appbar  = FindViewById <AppBarLayout>(Resource.Id.activity_main_appbar);
            var toolbar = appbar.FindViewById <Toolbar>(Resource.Id.main_toolbar);

            SetSupportActionBar(toolbar);
            addPostFab.Click += AddPostFab_Click;
            mainRecycler.AddOnScrollListener(new OnscrollListener(
                                                 onScrolled: (r, dx, dy) =>
            {
                if (dy > 0)
                {
                    addPostFab.Hide();
                }
                else if (dy < 0)
                {
                    addPostFab.Show();
                }
            }));

            DividerItemDecoration decoration = new DividerItemDecoration(mainRecycler.Context, DividerItemDecoration.Vertical);

            mainRecycler.AddItemDecoration(decoration);
            posts = new List <Post>();


            profileParcelable.WriteTOParcelFailed += ProfileParcelable_WriteTOParcelFailed;

            new SlydepayPayment(this).InitCredentials("*****@*****.**", "J33899SJS8EJDJDJJ");
            await GetUserFromFireAsync();

            postEventListener.FetchPost();
            postEventListener.OnPostRetrieved += PostEventListener_OnPostRetrieved;
        }
Example #29
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            base.OnViewCreated(view, savedInstanceState);

            container  = view as ConstraintLayout;
            viewFinder = container.FindViewById <PreviewView>(Resource.Id.view_finder);

            // Initialize our background executor
            cameraExecutor = Java.Util.Concurrent.Executors.NewSingleThreadExecutor();

            volumeDownReceiver = new VolumeDownReceiver(this);

            broadcastManager = LocalBroadcastManager.GetInstance(view.Context);

            // Set up the intent filter that will receive events from our main activity
            var filter = new IntentFilter();

            filter.AddAction(MainActivity.KeyEventAction);
            broadcastManager.RegisterReceiver(volumeDownReceiver, filter);

            // Every time the orientation of device changes, update rotation for use cases
            displayManager.RegisterDisplayListener(this, null);

            // Determine the output directory
            outputDirectory = MainActivity.GetOutputDirectory(RequireContext());

            // Wait for the views to be properly laid out
            viewFinder.Post(() =>
            {
                // Keep track of the display in which this view is attached
                displayId = viewFinder.Display.DisplayId;

                // Build UI controls
                UpdateCameraUi();

                // Set up the camera and its use cases
                SetUpCamera();
            });
        }
Example #30
0
        private void InitUi()
        {
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            Title = string.Empty;

            _layout = FindViewById <ConstraintLayout>(Resource.Id.layout);

            _usernameEditText = FindViewById <EditText>(Resource.Id.et_email);
            _passwordEditText = FindViewById <EditText>(Resource.Id.et_password);

            _loginButton = FindViewById <AppCompatButton>(Resource.Id.btn_login);

            _registerButton   = FindViewById <AppCompatButton>(Resource.Id.btn_register);
            _pwdResetTextView = FindViewById <TextView>(Resource.Id.tv_password_forgot);

            _progressBarDialog =
                new ProgressBarDialog(
                    "Va rugam asteptati", "Autentificare...", this, false);
            // _progressBarDialog.Window.SetBackgroundDrawableResource(Resource.Color.colorPrimaryDark);
        }