示例#1
0
        private void InitComponent(View view)
        {
            try
            {
                MRecycler        = (RecyclerView)view.FindViewById(Resource.Id.recyler);
                EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                LoadingLinear            = (LinearLayout)view.FindViewById(Resource.Id.Loading_LinearLayout);
                LoadingLinear.Visibility = ViewStates.Visible;

                ViewPagerView = view.FindViewById <ViewPager>(Resource.Id.viewpager2);

                MainAppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                MainAppBarLayout.SetExpanded(false);

                CollapsingToolbarLayout = (CollapsingToolbarLayout)view.FindViewById(Resource.Id.collapsingToolbar);
                //CollapsingToolbarLayout.Title = AppSettings.ApplicationName;
                CollapsingToolbarLayout.Title = "Discover";

                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new Helpers.PullSwipeStyles.DefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new Helpers.PullSwipeStyles.DefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);

                MainAlert            = (RelativeLayout)view.FindViewById(Resource.Id.mainAlert);
                MainAlert.Visibility = !UserDetails.IsLogin ? ViewStates.Visible : ViewStates.Gone;
                MainAlert.Click     += MainAlertOnClick;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#2
0
        private void InitComponent(View view)
        {
            try
            {
                TabLayout = view.FindViewById <TabLayout>(Resource.Id.Searchtabs);
                ViewPager = view.FindViewById <ViewPager>(Resource.Id.Searchviewpager);

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                //Set Tab
                ViewPager.OffscreenPageLimit = 2;
                SetUpViewPager(ViewPager);
                TabLayout.SetupWithViewPager(ViewPager);

                FilterButton = (TextView)view.FindViewById(Resource.Id.filter_icon);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, FilterButton, IonIconsFonts.AndroidOptions);
                FilterButton.Click += FilterButtonOnClick;

                GetAppData();

                AdsGoogle.Ad_Interstitial(Context);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#3
0
        private void InitComponent(View view)
        {
            try
            {
                CollapsingToolbar       = view.FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = " ";

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                MRecycler        = view.FindViewById <RecyclerView>(Resource.Id.albums_recyler);
                EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                ImageCover          = view.FindViewById <ImageView>(Resource.Id.imageCover);
                ImageAvatar         = view.FindViewById <ImageView>(Resource.Id.imageAvatar);
                AlbumName           = view.FindViewById <TextView>(Resource.Id.albumName);
                CountSoungAlbumText = view.FindViewById <TextView>(Resource.Id.CountSoungAlbumText);
                NameUserText        = view.FindViewById <TextView>(Resource.Id.nameUserText);
                BackIcon            = view.FindViewById <ImageView>(Resource.Id.back);
                BackIcon.Click     += BackIcon_Click;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#4
0
        private void InitComponent(View view)
        {
            try
            {
                ImageCoverChannel      = view.FindViewById <ImageView>(Resource.Id.myImagevideo);
                ImageChannel           = view.FindViewById <ImageView>(Resource.Id.myChannelImage);
                CollapsingToolbar      = view.FindViewById <CollapsingToolbarLayout>(Resource.Id.mycollapsingToolbar);
                ChannelNameText        = view.FindViewById <TextView>(Resource.Id.myChannelName);
                ChannelVerifiedText    = view.FindViewById <TextView>(Resource.Id.myChannelVerifiedText);
                IconSettings           = view.FindViewById <ImageView>(Resource.Id.mySettings_icon);
                SubscribeChannelButton = view.FindViewById <Button>(Resource.Id.mySubcribeChannelButton);

                Tabs          = view.FindViewById <TabLayout>(Resource.Id.mychanneltabs);
                ViewPagerView = view.FindViewById <ViewPager>(Resource.Id.myChannelviewpager);
                AppBarLayout  = view.FindViewById <AppBarLayout>(Resource.Id.mymainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                SubscribeChannelButton.Text = GetText(Resource.String.Lbl_Edit);

                ChannelVerifiedText.Visibility = ViewStates.Gone;
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, ChannelVerifiedText, IonIconsFonts.CheckmarkCircled);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#5
0
        private void InitComponent(View view)
        {
            try
            {
                SearchView = view.FindViewById <SearchView>(Resource.Id.searchviewbox);
                SearchView.SetQuery("", false);
                SearchView.ClearFocus();
                SearchView.OnActionViewExpanded();
                SearchView.SetIconifiedByDefault(true);
                SearchView.OnActionViewExpanded();

                //Change text colors
                var editText = (EditText)SearchView.FindViewById(Resource.Id.search_src_text);
                editText.SetHintTextColor(Color.Gray);
                editText.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);

                TabLayout = view.FindViewById <TabLayout>(Resource.Id.Searchtabs);
                ViewPager = view.FindViewById <ViewPager>(Resource.Id.Searchviewpager);

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                //Set Tab
                ViewPager.OffscreenPageLimit = 2;
                SetUpViewPager(ViewPager);
                TabLayout.SetupWithViewPager(ViewPager);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        private void InitComponent(View view)
        {
            try
            {
                MRecycler        = (RecyclerView)view.FindViewById(Resource.Id.recylerSongsPlaylist);
                EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                CollapsingToolbar       = view.FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);
                AppBarLayout.AddOnOffsetChangedListener(this);

                InfoPlaylistViewPager = view.FindViewById <ViewPager>(Resource.Id.viewpager);
                CircleIndicator       = view.FindViewById <CircleIndicator>(Resource.Id.indicator);

                TxtNamePlaylist  = view.FindViewById <TextView>(Resource.Id.name);
                TxtPublisherName = view.FindViewById <TextView>(Resource.Id.publishername);

                BackIcon        = view.FindViewById <ImageView>(Resource.Id.back);
                BackIcon.Click += BackIcon_Click;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#7
0
        private void InitComponent()
        {
            try
            {
                CollapsingToolbar       = (CollapsingToolbarLayout)FindViewById(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);
                AppBarLayout.AddOnOffsetChangedListener(this);

                MRecycler    = (RecyclerView)FindViewById(Resource.Id.userRecyler);
                TxtGroupName = FindViewById <AXEmojiEditText>(Resource.Id.groupName);
                ImageGroup   = FindViewById <ImageView>(Resource.Id.groupCover);
                BtnImage     = FindViewById <Button>(Resource.Id.btn_selectimage);

                ChatEmojImage = FindViewById <ImageView>(Resource.Id.emojiicon);

                BtnAdd = FindViewById <FloatingActionButton>(Resource.Id.fab);

                BtnDeleteGroup            = FindViewById <Button>(Resource.Id.deleteGroupButton);
                BtnDeleteGroup.Visibility = ViewStates.Gone;

                BtnExitGroup            = FindViewById <TextView>(Resource.Id.exitGroupButton);
                BtnExitGroup.Visibility = ViewStates.Gone;

                if (AppSettings.SetTabDarkTheme)
                {
                    TxtGroupName.SetTextColor(Color.White);
                    TxtGroupName.SetHintTextColor(Color.White);
                }
                else
                {
                    TxtGroupName.SetTextColor(Color.ParseColor("#444444"));
                    TxtGroupName.SetHintTextColor(Color.ParseColor("#444444"));
                }

                if (AppSettings.SetTabDarkTheme)
                {
                    EmojisViewTools.LoadDarkTheme();
                }
                else
                {
                    EmojisViewTools.LoadTheme(AppSettings.MainColor);
                }

                EmojisViewTools.MStickerView = false;
                AXEmojiPager emojiPager        = EmojisViewTools.LoadView(this, TxtGroupName, "");
                AXEmojiPopup popup             = new AXEmojiPopup(emojiPager);
                var          EmojisViewActions = new EmojisViewActions(this, "", popup, TxtGroupName, ChatEmojImage);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
示例#8
0
        private void ShowEmptyPage()
        {
            try
            {
                MainScrollEvent.IsLoading = false;
                SwipeRefreshLayout.OnFinishFreshAndLoad();

                if (ProgressBarLoader.Visibility == ViewStates.Visible)
                {
                    ProgressBarLoader.Visibility = ViewStates.Gone;
                    AppBarLayout.SetExpanded(true);
                }

                if (CardDateAdapter2?.UsersDateList?.Count > 0 || NearByAdapter?.NearByList?.Count > 0)
                {
                    NearByRecyclerView.Visibility = ViewStates.Visible;
                    EmptyStateLayout.Visibility   = ViewStates.Gone;
                }

                if (HotOrNotUserAdapter?.UsersDateList?.Count > 0)
                {
                    RecylerHotOrNot.Visibility  = ViewStates.Visible;
                    HotOrNotLinear.Visibility   = ViewStates.Visible;
                    EmptyStateLayout.Visibility = ViewStates.Gone;
                }

                if (CardDateAdapter2?.UsersDateList?.Count == 0 || NearByAdapter?.NearByList?.Count == 0 && HotOrNotUserAdapter?.UsersDateList?.Count == 0)
                {
                    NearByRecyclerView.Visibility = ViewStates.Gone;
                    RecylerHotOrNot.Visibility    = ViewStates.Gone;
                    HotOrNotLinear.Visibility     = ViewStates.Gone;

                    if (Inflated == null)
                    {
                        Inflated = EmptyStateLayout.Inflate();
                    }

                    EmptyStateInflater x = new EmptyStateInflater();
                    x.InflateLayout(Inflated, EmptyStateInflater.Type.NoSearchResult);
                    if (!x.EmptyStateButton.HasOnClickListeners)
                    {
                        x.EmptyStateButton.Click += null;
                    }

                    EmptyStateLayout.Visibility = ViewStates.Visible;
                }
            }
            catch (Exception e)
            {
                MainScrollEvent.IsLoading    = false;
                ProgressBarLoader.Visibility = ViewStates.Gone;
                SwipeRefreshLayout.OnFinishFreshAndLoad();
                Console.WriteLine(e);
            }
        }
示例#9
0
        private void InitComponent(View view)
        {
            try
            {
                CollapsingToolbar       = (CollapsingToolbarLayout)view.FindViewById(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);
                AppBarLayout.AddOnOffsetChangedListener(this);

                ImageCover = (ImageView)view.FindViewById(Resource.Id.imageCover);

                IconPro            = (ImageView)view.FindViewById(Resource.Id.pro);
                IconPro.Visibility = ViewStates.Invisible;

                IconMore        = (ImageView)view.FindViewById(Resource.Id.more);
                IconMore.Click += ButtonMoreOnClick;

                IconInfo        = (ImageView)view.FindViewById(Resource.Id.info);
                IconInfo.Click += IconInfoOnClick;

                ImageAvatar        = (CircleImageView)view.FindViewById(Resource.Id.imageAvatar);
                ImageAvatar.Click += ImageAvatarOnClick;

                TxtFullName = (TextView)view.FindViewById(Resource.Id.fullNameTextView);

                TxtCountFollowers        = (TextView)view.FindViewById(Resource.Id.countFollowersTextView);
                TxtFollowers             = (TextView)view.FindViewById(Resource.Id.FollowersTextView);
                TxtFollowers.Click      += TxtFollowersOnClick;
                TxtCountFollowers.Click += TxtFollowersOnClick;

                TxtCountFollowing        = (TextView)view.FindViewById(Resource.Id.countFollowingTextView);
                TxtFollowing             = (TextView)view.FindViewById(Resource.Id.FollowingTextView);
                TxtFollowing.Click      += TxtFollowingOnClick;
                TxtCountFollowing.Click += TxtFollowingOnClick;

                EditButton        = (Button)view.FindViewById(Resource.Id.EditButton);
                EditButton.Click += BtnEditOnClick;

                ViewPagerView = (ViewPager)view.FindViewById(Resource.Id.profileViewPager);
                Tabs          = (TabLayout)view.FindViewById(Resource.Id.sectionsTabs);

                BtnEdit        = (FloatingActionButton)view.FindViewById(Resource.Id.fab);
                BtnEdit.Click += BtnEditOnClick;

                GlideRequestOptions     = new RequestOptions().Error(Resource.Drawable.ImagePlacholder).Placeholder(Resource.Drawable.ImagePlacholder).SetDiskCacheStrategy(DiskCacheStrategy.All).SetPriority(Priority.High);
                FullGlideRequestBuilder = Glide.With(this).AsBitmap().Apply(GlideRequestOptions);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#10
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            base.OnViewCreated(view, savedInstanceState);

            _appBar               = view.FindViewById <AppBarLayout>(Resource.Id.login_AppBar);
            _loginInputLayout     = view.FindViewById <TextInputLayout>(Resource.Id.login_text_input);
            _passwordInputLayout  = view.FindViewById <TextInputLayout>(Resource.Id.password_text_input);
            _loginEditText        = view.FindViewById <AppCompatEditText>(Resource.Id.login_edit_text);
            _passwordEditText     = view.FindViewById <AppCompatEditText>(Resource.Id.password_edit_text);
            _saveCheckBox         = view.FindViewById <AppCompatCheckBox>(Resource.Id.login_save_checkbox);
            _restPassButton       = view.FindViewById <TextView>(Resource.Id.login_reset_password);
            _langSpinnerLabel     = view.FindViewById <TextView>(Resource.Id.login_lang_spinner_label);
            _langSpinner          = view.FindViewById <AppCompatSpinner>(Resource.Id.login_lang_spinner);
            _guestLoginButton     = view.FindViewById <MaterialButton>(Resource.Id.login_guest_button);
            _loginButton          = view.FindViewById <TextView>(Resource.Id.login_button);
            _loginStatus          = view.FindViewById <TextView>(Resource.Id.login_status);
            _progressBarContainer = view.FindViewById <FrameLayout>(Resource.Id.login_progress_container);

            _loginEditText.FocusChange += (sender, args) =>
            {
                if (args.HasFocus)
                {
                    _appBar.SetExpanded(false, true);
                }
            };

            _passwordEditText.FocusChange += (sender, args) =>
            {
                if (args.HasFocus)
                {
                    _appBar.SetExpanded(false, true);
                }
            };

            _passwordEditText.EditorAction += (sender, args) => OnLoginClick();
            _loginButton.Click             += (sender, args) => OnLoginClick();

            _restPassButton.Click += (sender, args) => ShowResetPasswordDialog();
        }
示例#11
0
        public override void OnPause()
        {
            AppBarLayout            appBarLayout            = ((MainView)this.Activity).FindViewById <AppBarLayout>(Resource.Id.appbar);
            CollapsingToolbarLayout collapsingToolbarLayout = ((MainView)this.Activity).FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
            float density = this.Resources.DisplayMetrics.Density;

            float heightDp = 56 * density;

            CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams)appBarLayout.LayoutParameters;
            lp.Height = (int)heightDp;
            appBarLayout.SetExpanded(false);
            base.OnPause();
        }
示例#12
0
        private void InitComponent(View view)
        {
            try
            {
                MRecycler        = (RecyclerView)view.FindViewById(Resource.Id.recyler);
                EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                LoadingLinear            = (LinearLayout)view.FindViewById(Resource.Id.Loading_LinearLayout);
                LoadingLinear.Visibility = ViewStates.Visible;

                ViewPagerView = view.FindViewById <ViewPager>(Resource.Id.viewpager2);

                MainAppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                MainAppBarLayout.SetExpanded(false);

                CollapsingToolbarLayout = (CollapsingToolbarLayout)view.FindViewById(Resource.Id.collapsingToolbar);
                ToolbarLogo             = view.FindViewById <ImageView>(Resource.Id.ToolbarLogo);
                ToolbarLogoLinearLayout = view.FindViewById <LinearLayout>(Resource.Id.ToolbarLogoLinearLayout);

                if (AppSettings.ShowAppLogoInToolbar)
                {
                    CollapsingToolbarLayout.SetTitle(" ");
                    MainAppBarLayout.AddOnOffsetChangedListener(this);

                    ToolbarLogoLinearLayout.BringToFront();
                    ViewCompat.SetTranslationZ(ToolbarLogoLinearLayout, 100);
                    ((View)ToolbarLogoLinearLayout.Parent).RequestLayout();
                }
                else
                {
                    CollapsingToolbarLayout.Title = AppSettings.ApplicationName;
                }

                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new Helpers.PullSwipeStyles.DefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new Helpers.PullSwipeStyles.DefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);

                MainAlert            = (RelativeLayout)view.FindViewById(Resource.Id.mainAlert);
                MainAlert.Visibility = !UserDetails.IsLogin ? ViewStates.Visible : ViewStates.Gone;
                MainAlert.Click     += MainAlertOnClick;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#13
0
        public void OnRefresh()
        {
            try
            {
                MainScrollEvent.IsLoading = false;

                MainAppBarLayout.SetExpanded(false);
                ListUtils.FeaturedVideosList.Clear();
                ViewPagerView.Adapter = null;

                MAdapter.MainVideoList.Clear();
                MAdapter.NotifyDataSetChanged();

                LoadingLinear.Visibility = ViewStates.Visible;

                EmptyStateLayout.Visibility = ViewStates.Gone;

                StartApiService();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#14
0
        private void InitComponent()
        {
            try
            {
                CollapsingToolbar       = (CollapsingToolbarLayout)FindViewById(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);
                AppBarLayout.AddOnOffsetChangedListener(this);


                MRecycler    = (RecyclerView)FindViewById(Resource.Id.userRecyler);
                TxtGroupName = FindViewById <EmojiconEditText>(Resource.Id.groupName);
                ImageGroup   = FindViewById <ImageView>(Resource.Id.groupCover);
                BtnImage     = FindViewById <Button>(Resource.Id.btn_selectimage);

                ChatEmojImage = FindViewById <ImageView>(Resource.Id.emojiicon);

                BtnAdd = FindViewById <FloatingActionButton>(Resource.Id.fab);

                BtnDeleteGroup            = FindViewById <Button>(Resource.Id.deleteGroupButton);
                BtnDeleteGroup.Visibility = ViewStates.Visible;

                BtnExitGroup            = FindViewById <TextView>(Resource.Id.exitGroupButton);
                BtnExitGroup.Visibility = ViewStates.Visible;

                if (AppSettings.SetTabDarkTheme)
                {
                    TxtGroupName.SetTextColor(Color.White);
                    TxtGroupName.SetHintTextColor(Color.White);
                }
                else
                {
                    TxtGroupName.SetTextColor(Color.ParseColor("#444444"));
                    TxtGroupName.SetHintTextColor(Color.ParseColor("#444444"));
                }

                var emojisIcon = new EmojIconActions(this, CollapsingToolbar, TxtGroupName, ChatEmojImage);
                emojisIcon.ShowEmojIcon();
                emojisIcon.SetIconsIds(Resource.Drawable.ic_action_keyboard, Resource.Drawable.ic_action_sentiment_satisfied_alt);
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
示例#15
0
        private void InitComponent(View view)
        {
            try
            {
                AppBarLayout = (AppBarLayout)view.FindViewById(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(false);

                TxtMoreSuggested        = (TextView)view.FindViewById(Resource.Id.iv_more_folowers);
                TxtMoreSuggested.Click += TxtMoreSuggestedOnClick;

                SuggestionsRecylerView = (RecyclerView)view.FindViewById(Resource.Id.Recyler);
                ExploreRecylerView     = (RecyclerView)view.FindViewById(Resource.Id.featuredRecyler);
                ProgressBarLoader      = (ProgressBar)view.FindViewById(Resource.Id.sectionProgress);
                EmptyStateLayout       = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                MainLayoutSugettion            = (LinearLayout)view.FindViewById(Resource.Id.layoutSugettionSection);
                MainLayoutSugettion.Visibility = ViewStates.Invisible;

                SearchViewBoxIcon      = (TextView)view.FindViewById(Resource.Id.searchviewboxIcon);
                SearchViewBoxText      = (TextView)view.FindViewById(Resource.Id.friends_head_txt);
                SearchViewLinearLayout = (LinearLayout)view.FindViewById(Resource.Id.searchviewLinearLayout);


                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new PixelDefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new PixelDefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);

                if (AppSettings.SetTabDarkTheme)
                {
                    MainLayoutSugettion.SetBackgroundResource(Resource.Drawable.center_content_profile_scroll_over_dark);
                    SearchViewLinearLayout.SetBackgroundResource(Resource.Drawable.search_round_corners_dark);
                    SearchViewBoxIcon.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                    SearchViewBoxText.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);
                }

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, SearchViewBoxIcon, IonIconsFonts.IosSearch);
                SearchViewLinearLayout.Click += SearchViewLinearLayoutOnClick;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#16
0
        private void InitComponent()
        {
            try
            {
                TabLayout = FindViewById <TabLayout>(Resource.Id.Searchtabs);
                ViewPager = FindViewById <ViewPager2>(Resource.Id.Searchviewpager);

                AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                HashRecyclerView = FindViewById <RecyclerView>(Resource.Id.HashRecyler);

                switch (AppSettings.ShowTrendingHashTags)
                {
                case true when ListUtils.HashTagList?.Count > 0:
                    HashTagUserAdapter = new HashtagUserAdapter(this)
                    {
                        MHashtagList = new ObservableCollection <TrendingHashtag>(ListUtils.HashTagList)
                    };
                    HashRecyclerView.SetLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.Horizontal, false));
                    HashRecyclerView.SetAdapter(HashTagUserAdapter);
                    HashTagUserAdapter.ItemClick += HashTagUserAdapterOnItemClick;

                    HashRecyclerView.Visibility = ViewStates.Visible;
                    break;

                case true:
                    HashRecyclerView.Visibility = ViewStates.Gone;
                    break;

                default:
                    HashRecyclerView.Visibility = ViewStates.Gone;
                    break;
                }

                FloatingActionButtonView = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButtonView);

                ViewPager.OffscreenPageLimit = 3;
                SetUpViewPager(ViewPager);
                new TabLayoutMediator(TabLayout, ViewPager, this).Attach();
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
示例#17
0
        private void InitComponent()
        {
            try
            {
                TabLayout = FindViewById <TabLayout>(Resource.Id.Searchtabs);
                ViewPager = FindViewById <ViewPager>(Resource.Id.Searchviewpager);

                AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                HashRecyclerView = FindViewById <RecyclerView>(Resource.Id.HashRecyler);

                if (AppSettings.ShowTrendingHashTags)
                {
                    if (TabbedMainActivity.GetInstance()?.HashTagUserAdapter?.MHashtagList?.Count > 0)
                    {
                        HashRecyclerView.SetLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.Horizontal, false));
                        HashRecyclerView.SetAdapter(TabbedMainActivity.GetInstance().HashTagUserAdapter);
                        TabbedMainActivity.GetInstance().HashTagUserAdapter.ItemClick += HashTagUserAdapterOnItemClick;
                        HashRecyclerView.SetAdapter(TabbedMainActivity.GetInstance().HashTagUserAdapter);
                        TabbedMainActivity.GetInstance()?.HashTagUserAdapter.NotifyDataSetChanged();

                        HashRecyclerView.Visibility = ViewStates.Visible;
                    }
                    else
                    {
                        HashRecyclerView.Visibility = ViewStates.Invisible;
                    }
                }
                else
                {
                    HashRecyclerView.Visibility = ViewStates.Invisible;
                }

                FloatingActionButtonView = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButtonView);

                ViewPager.OffscreenPageLimit = 3;
                SetUpViewPager(ViewPager);
                TabLayout.SetupWithViewPager(ViewPager);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#18
0
        private void ShowEmptyPage()
        {
            try
            {
                MainScrollEvent.IsLoading = false;
                SwipeRefreshLayout.OnFinishFreshAndLoad();

                if (ProgressBarLoader.Visibility == ViewStates.Visible)
                {
                    ProgressBarLoader.Visibility = ViewStates.Gone;
                    AppBarLayout.SetExpanded(true);
                }

                if (ExploreAdapter.FeaturedList.Count > 0)
                {
                    ExploreRecylerView.Visibility = ViewStates.Visible;
                    EmptyStateLayout.Visibility   = ViewStates.Gone;
                }
                else
                {
                    ExploreRecylerView.Visibility = ViewStates.Gone;

                    if (Inflated == null)
                    {
                        Inflated = EmptyStateLayout.Inflate();
                    }

                    EmptyStateInflater x = new EmptyStateInflater();
                    x.InflateLayout(Inflated, EmptyStateInflater.Type.NoPost);
                    if (!x.EmptyStateButton.HasOnClickListeners)
                    {
                        x.EmptyStateButton.Click += null;
                    }
                    EmptyStateLayout.Visibility = ViewStates.Visible;
                }
            }
            catch (Exception e)
            {
                MainScrollEvent.IsLoading    = false;
                ProgressBarLoader.Visibility = ViewStates.Gone;
                SwipeRefreshLayout.OnFinishFreshAndLoad();
                Console.WriteLine(e);
            }
        }
        private void InitComponent()
        {
            try
            {
                CollapsingToolbar       = (CollapsingToolbarLayout)FindViewById(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);
                AppBarLayout.AddOnOffsetChangedListener(this);


                MRecycler    = (RecyclerView)FindViewById(Resource.Id.userRecyler);
                TxtGroupName = FindViewById <EditText>(Resource.Id.groupName);
                ImageGroup   = FindViewById <ImageView>(Resource.Id.groupCover);
                BtnImage     = FindViewById <Button>(Resource.Id.btn_selectimage);

                TxtAddUser = FindViewById <TextView>(Resource.Id.addUser);

                BtnAdd = FindViewById <FloatingActionButton>(Resource.Id.fab);

                BtnDeleteGroup            = FindViewById <Button>(Resource.Id.deleteGroupButton);
                BtnDeleteGroup.Visibility = ViewStates.Visible;

                BtnExitGroup            = FindViewById <TextView>(Resource.Id.exitGroupButton);
                BtnExitGroup.Visibility = ViewStates.Visible;

                if (AppSettings.SetTabDarkTheme)
                {
                    TxtGroupName.SetTextColor(Color.White);
                    TxtGroupName.SetHintTextColor(Color.White);
                }
                else
                {
                    TxtGroupName.SetTextColor(Color.ParseColor("#444444"));
                    TxtGroupName.SetHintTextColor(Color.ParseColor("#444444"));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#20
0
        private void InitComponent(View view)
        {
            try
            {
                MRecycler        = (RecyclerView)view.FindViewById(Resource.Id.recylerSongsPlaylist);
                EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                CollapsingToolbar       = view.FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                IconMore        = view.FindViewById <ImageView>(Resource.Id.more);
                IconMore.Click += IconMoreOnClick;

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);

                LayoutImage = view.FindViewById <RelativeLayout>(Resource.Id.Layoutimage);
                LayoutImage.SetClipToPadding(true);

                TxtNamePlaylist  = view.FindViewById <TextView>(Resource.Id.name);
                TxtSongCount     = view.FindViewById <TextView>(Resource.Id.soungCount);
                TxtPublisherName = view.FindViewById <TextView>(Resource.Id.ByUser);

                CoverImage          = view.FindViewById <ImageView>(Resource.Id.Coverimage);
                DiskImage           = view.FindViewById <CircleImageView>(Resource.Id.Diskimage);
                GlideRequestOptions = new RequestOptions().SetDiskCacheStrategy(DiskCacheStrategy.All).SetPriority(Priority.High).Apply(RequestOptions.CircleCropTransform().CenterCrop().CircleCrop());

                PlayAllButton            = view.FindViewById <FloatingActionButton>(Resource.Id.fab);
                PlayAllButton.Click     += PlayAllButtonOnClick;
                PlayAllButton.Tag        = "play";
                PlayAllButton.Visibility = ViewStates.Gone;

                ImageBack       = view.FindViewById <ImageView>(Resource.Id.ImageBack);
                BackIcon        = view.FindViewById <FrameLayout>(Resource.Id.back);
                BackIcon.Click += BackIcon_Click;

                LibrarySynchronizer = new LibrarySynchronizer(Activity);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#21
0
        private void InitComponent(View view)
        {
            try
            {
                CollapsingToolbar       = view.FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = " ";

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                MRecycler        = view.FindViewById <RecyclerView>(Resource.Id.albums_recyler);
                EmptyStateLayout = view.FindViewById <ViewStub>(Resource.Id.viewStub);

                IconMore        = view.FindViewById <ImageView>(Resource.Id.more);
                IconMore.Click += IconMoreOnClick;

                PlayAllButton            = view.FindViewById <FloatingActionButton>(Resource.Id.fab);
                PlayAllButton.Click     += PlayAllButtonOnClick;
                PlayAllButton.Tag        = "play";
                PlayAllButton.Visibility = ViewStates.Gone;

                BuyButton            = view.FindViewById <Button>(Resource.Id.BuyButton);
                BuyButton.Click     += BuyButtonOnClick;
                BuyButton.Visibility = ViewStates.Gone;

                ImageCover          = view.FindViewById <ImageView>(Resource.Id.imageCover);
                ImageAvatar         = view.FindViewById <CircleImageView>(Resource.Id.imageAvatar);
                ImageAlbum          = view.FindViewById <ImageView>(Resource.Id.imageSound);
                AlbumName           = view.FindViewById <TextView>(Resource.Id.albumName);
                CountSoungAlbumText = view.FindViewById <TextView>(Resource.Id.CountSoungAlbumText);
                NameUserText        = view.FindViewById <TextView>(Resource.Id.nameUserText);
                BackIcon            = view.FindViewById <FrameLayout>(Resource.Id.back);
                BackIcon.Click     += BackIcon_Click;

                LibrarySynchronizer = new LibrarySynchronizer(Activity);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        private void InitComponent()
        {
            try
            {
                CollapsingToolbar       = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = GetText(Resource.String.Lbl_IncreasePopularity);

                AppBarLayout = FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                TxtVisitsCost  = FindViewById <TextView>(Resource.Id.visitsCost);
                TxtMatchesCost = FindViewById <TextView>(Resource.Id.matchesCost);
                TxtLikesCost   = FindViewById <TextView>(Resource.Id.likesCost);

                BtnVisits  = FindViewById <Button>(Resource.Id.visitsButton);
                BtnMatches = FindViewById <Button>(Resource.Id.matchesButton);
                BtnLikes   = FindViewById <Button>(Resource.Id.likesButton);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#23
0
        private void InitComponent(View view)
        {
            try
            {
                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(false);

                StoryRecycler = view.FindViewById <RecyclerView>(Resource.Id.StoryRecyler);

                TxtAppName      = view.FindViewById <TextView>(Resource.Id.Appname);
                TxtAppName.Text = AppSettings.ApplicationName;
                TxtAppName.SetTextColor(AppSettings.SetTabDarkTheme ? Color.White : Color.Black);

                ImageChat        = view.FindViewById <ImageView>(Resource.Id.chatbutton);
                ImageChat.Click += ImageChatOnClick;

                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new PixelDefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new PixelDefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);
                SwipeRefreshLayout.OnFinishFreshAndLoad();//check this

                RecyclerFeed = view.FindViewById <PRecyclerView>(Resource.Id.RecylerFeed);

                ProgressBar            = view.FindViewById <ProgressBar>(Resource.Id.sectionProgress);
                ProgressBar.Visibility = ViewStates.Visible;

                EmptyStateLayout            = view.FindViewById <ViewStub>(Resource.Id.viewStub);
                EmptyStateLayout.Visibility = ViewStates.Gone;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#24
0
        private void InitComponent(View view)
        {
            try
            {
                FilterButton       = view.FindViewById <ImageView>(Resource.Id.Filterbutton);
                NearByRecyclerView = (RecyclerView)view.FindViewById(Resource.Id.Recylerusers);
                ProgressBarLoader  = (ProgressBar)view.FindViewById(Resource.Id.sectionProgress);
                EmptyStateLayout   = view.FindViewById <ViewStub>(Resource.Id.viewStub);
                ToolbarTitle       = view.FindViewById <TextView>(Resource.Id.toolbartitle);
                ProRecyclerView    = (RecyclerView)view.FindViewById(Resource.Id.proRecyler);

                HotOrNotLinear  = (LinearLayout)view.FindViewById(Resource.Id.HotORNotLinear);
                IconHotOrNot    = (TextView)view.FindViewById(Resource.Id.iconHotORNot);
                RecylerHotOrNot = (RecyclerView)view.FindViewById(Resource.Id.recylerHotOrNot);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconHotOrNot, IonIconsFonts.IosFlameOutline);

                ToolbarTitle.Text = AppSettings.ApplicationName;

                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new Helpers.PullSwipeStyles.DefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new Helpers.PullSwipeStyles.DefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);

                AppBarLayout = (AppBarLayout)view.FindViewById(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(false);

                ProgressBarLoader.Visibility  = ViewStates.Visible;
                NearByRecyclerView.Visibility = ViewStates.Gone;
                HotOrNotLinear.Visibility     = ViewStates.Gone;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#25
0
        private void InitComponent(View view)
        {
            try
            {
                IconMesseges = view.FindViewById <ImageView>(Resource.Id.Messeges_icon);

                ImageCoverChannel      = view.FindViewById <ImageView>(Resource.Id.Imagevideo);
                ImageChannel           = view.FindViewById <ImageView>(Resource.Id.ChannelImage);
                CollapsingToolbar      = view.FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsingToolbar);
                ChannelNameText        = view.FindViewById <TextView>(Resource.Id.ChannelName);
                ChannelVerifiedText    = view.FindViewById <TextView>(Resource.Id.ChannelVerifiedText);
                SubscribeChannelButton = view.FindViewById <Button>(Resource.Id.SubcribeButton);

                SubscribeCountLayout = view.FindViewById <BubbleLinearLayout>(Resource.Id.bubble_layout);
                TxtSubscribeCount    = view.FindViewById <TextView>(Resource.Id.subcriberscount);

                Tabs          = view.FindViewById <TabLayout>(Resource.Id.channeltabs);
                ViewPagerView = view.FindViewById <ViewPager>(Resource.Id.Channelviewpager);
                AppBarLayout  = view.FindViewById <AppBarLayout>(Resource.Id.mainAppBarLayout);
                AppBarLayout.SetExpanded(true);

                if (!UserDetails.IsLogin)
                {
                    IconMesseges.Visibility = ViewStates.Gone;
                }

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, ChannelVerifiedText, IonIconsFonts.CheckmarkCircled);

                ChannelVerifiedText.Visibility = ViewStates.Gone;
                SubscribeChannelButton.Tag     = "Subscribe";
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#26
0
 private void ToggleAppBarAndChangeButtonIcon()
 {
     appBar.SetExpanded(!fullyExpanded);
 }
        private void InitComponent(View view)
        {
            try
            {
                CollapsingToolbar       = (CollapsingToolbarLayout)view.FindViewById(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);

                ImageAvatar = (ImageView)view.FindViewById(Resource.Id.imageAvatar);
                ImageCover  = (ImageView)view.FindViewById(Resource.Id.cover_image);


                BtnFollow  = (CircleButton)view.FindViewById(Resource.Id.AddUserbutton);
                BtnMessage = (CircleButton)view.FindViewById(Resource.Id.message_button);
                BtnMore    = (CircleButton)view.FindViewById(Resource.Id.morebutton);

                BtnFollow.Click  += BtnAddUserOnClick;
                BtnMessage.Click += BtnMessageOnClick;
                BtnMore.Click    += BtnMoreOnClick;

                TxtUserName  = (TextView)view.FindViewById(Resource.Id.username_profile);
                IconVerified = (TextView)view.FindViewById(Resource.Id.verified);
                IconPro      = (TextView)view.FindViewById(Resource.Id.pro);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconVerified, IonIconsFonts.CheckmarkCircled);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconPro, FontAwesomeIcon.Rocket);

                IconVerified.Visibility = ViewStates.Gone;
                IconPro.Visibility      = ViewStates.Gone;

                LayoutFollowers = (LinearLayout)view.FindViewById(Resource.Id.followersLayout);
                //TxtFollowers = (TextView)view.FindViewById(Resource.Id.txtFollowers);
                TxtCountFollowers      = (TextView)view.FindViewById(Resource.Id.CountFollowers);
                LayoutFollowers.Click += LayoutFollowersOnClick;

                LayoutFollowing = (LinearLayout)view.FindViewById(Resource.Id.followingLayout);
                //TxtFollowing = (TextView)view.FindViewById(Resource.Id.txtFollowing);
                TxtCountFollowing      = (TextView)view.FindViewById(Resource.Id.CountFollowing);
                LayoutFollowing.Click += LayoutFollowingOnClick;

                //LayoutTracks = (LinearLayout)view.FindViewById(Resource.Id.tracksLayout);
                //TxtTracks = (TextView)view.FindViewById(Resource.Id.txtTracks);
                TxtCountTracks = (TextView)view.FindViewById(Resource.Id.CountTracks);

                LoadingLayout            = (LinearLayout)view.FindViewById(Resource.Id.Loading_LinearLayout);
                LoadingLayout.Visibility = ViewStates.Visible;

                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new DefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new Helpers.PullSwipeStyles.DefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);

                EmptyStateLayout    = (ViewStub)view.FindViewById(Resource.Id.viewStub);
                LatestSongsViewStub = (ViewStub)view.FindViewById(Resource.Id.viewStubLatestSongs);
                TopSongsViewStub    = (ViewStub)view.FindViewById(Resource.Id.viewStubTopSongs);
                AlbumsViewStub      = (ViewStub)view.FindViewById(Resource.Id.viewStubAlbums);
                StoreViewStub       = (ViewStub)view.FindViewById(Resource.Id.viewStubStore);
                ActivitiesViewStub  = (ViewStub)view.FindViewById(Resource.Id.viewStubActivities);

                TxtAbout = (AutoLinkTextView)view.FindViewById(Resource.Id.AboutTextview);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#28
0
        private void InitComponent(View view)
        {
            try
            {
                CollapsingToolbar       = (CollapsingToolbarLayout)view.FindViewById(Resource.Id.collapsingToolbar);
                CollapsingToolbar.Title = "";

                AppBarLayout = view.FindViewById <AppBarLayout>(Resource.Id.appBarLayout);
                AppBarLayout.SetExpanded(true);
                AppBarLayout.AddOnOffsetChangedListener(this);

                LoadingLayout            = (LinearLayout)view.FindViewById(Resource.Id.Loading_LinearLayout);
                LoadingLayout.Visibility = ViewStates.Visible;

                SwipeRefreshLayout = (SpringView)view.FindViewById(Resource.Id.material_style_ptr_frame);
                SwipeRefreshLayout.SetType(SpringView.Type.Overlap);
                SwipeRefreshLayout.Header = new DefaultHeader(Activity);
                SwipeRefreshLayout.Footer = new Helpers.PullSwipeStyles.DefaultFooter(Activity);
                SwipeRefreshLayout.Enable = true;
                SwipeRefreshLayout.SetListener(this);

                ButtonMore        = (ImageButton)view.FindViewById(Resource.Id.more);
                ButtonMore.Click += ButtonMoreOnClick;

                IconInfo        = (TextView)view.FindViewById(Resource.Id.info);
                IconInfo.Click += IconInfoOnClick;

                ImageAvatar = (ImageView)view.FindViewById(Resource.Id.imageAvatar);
                ImageCover  = (ImageView)view.FindViewById(Resource.Id.imageCover);

                TxtFullName = (TextView)view.FindViewById(Resource.Id.fullNameTextView);
                TxtUserName = (TextView)view.FindViewById(Resource.Id.userNameTextView);

                TxtFollowers             = (TextView)view.FindViewById(Resource.Id.FollowersTextView);
                TxtCountFollowers        = (TextView)view.FindViewById(Resource.Id.countFollowersTextView);
                TxtFollowers.Click      += TxtFollowersOnClick;
                TxtCountFollowers.Click += TxtFollowersOnClick;

                TxtFollowing             = (TextView)view.FindViewById(Resource.Id.FollowingTextView);
                TxtCountFollowing        = (TextView)view.FindViewById(Resource.Id.countFollowingTextView);
                TxtFollowing.Click      += TxtFollowingOnClick;
                TxtCountFollowing.Click += TxtFollowingOnClick;

                IconCamera   = (TextView)view.FindViewById(Resource.Id.iconCamera);
                IconVerified = (TextView)view.FindViewById(Resource.Id.verified);
                IconPro      = (TextView)view.FindViewById(Resource.Id.pro);

                EmptyStateLayout    = (ViewStub)view.FindViewById(Resource.Id.viewStub);
                LatestSongsViewStub = (ViewStub)view.FindViewById(Resource.Id.viewStubLatestSongs);
                TopSongsViewStub    = (ViewStub)view.FindViewById(Resource.Id.viewStubTopSongs);
                AlbumsViewStub      = (ViewStub)view.FindViewById(Resource.Id.viewStubAlbums);
                StoreViewStub       = (ViewStub)view.FindViewById(Resource.Id.viewStubStore);
                ActivitiesViewStub  = (ViewStub)view.FindViewById(Resource.Id.viewStubActivities);

                TxtAbout = (AutoLinkTextView)view.FindViewById(Resource.Id.AboutTextview);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconCamera, IonIconsFonts.AndroidCamera);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconVerified, IonIconsFonts.CheckmarkCircled);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconPro, FontAwesomeIcon.Rocket);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconInfo, IonIconsFonts.InformationCircled);

                IconVerified.Visibility = ViewStates.Invisible;
                IconPro.Visibility      = ViewStates.Invisible;

                BtnEdit        = (FloatingActionButton)view.FindViewById(Resource.Id.fab);
                BtnEdit.Click += BtnEditOnClick;

                ImageAvatar.Click += ImageAvatarOnClick;
                IconCamera.Click  += ImageAvatarOnClick;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#29
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);

            View view = this.BindingInflate(Resource.Layout.ListSong, null);

            var prefs = Application.Context.GetSharedPreferences("Fildo", FileCreationMode.Private);

            this.cultureInfo = ((MainView)this.Activity).CultureInfo;

            if (!string.IsNullOrEmpty(((BaseViewModel)((MainView)this.Activity).ViewModel).PlayingArtist))
            {
                ((MainView)this.Activity).FindViewById <Android.Widget.LinearLayout>(Resource.Id.miniPlayer).Visibility = ViewStates.Visible;
            }
            //AndroidEnvironment.UnhandledExceptionRaiser -= HandleAndroidException;
            //AndroidEnvironment.UnhandledExceptionRaiser += HandleAndroidException;
            TabLayout tabs = view.FindViewById <TabLayout>(Resource.Id.tabs);

            if (this.ViewModel != null)
            {
                ((BaseViewModel)((MainView)this.Activity).ViewModel).PicUrl = ((ListSongViewModel)this.ViewModel).PicUrl;
                string image = ((ListSongViewModel)this.ViewModel).PicUrl;
                ((MainView)this.Activity).FindViewById <MvxImageView>(Resource.Id.artistImageTest).ImageUrl = image;
                ListSongViewModel listSongViewModel = (ListSongViewModel)this.ViewModel;
                if (listSongViewModel.IsArtist)
                {
                    tabs.Visibility = ViewStates.Visible;
                    tabs.AddTab(tabs.NewTab().SetText("SONGS"));
                    tabs.AddTab(tabs.NewTab().SetText("ALBUMS"));
                    tabs.AddTab(tabs.NewTab().SetText("SIMILAR"));
                    tabs.TabSelected += this.Tabs_TabSelected;
                }
                else
                {
                    tabs.Visibility = ViewStates.Gone;
                }
            }

            AppBarLayout            appBarLayout            = ((MainView)this.Activity).FindViewById <AppBarLayout>(Resource.Id.appbar);
            CollapsingToolbarLayout collapsingToolbarLayout = ((MainView)this.Activity).FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
            float density = this.Resources.DisplayMetrics.Density;

            float heightDp = 200 * density;

            CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams)appBarLayout.LayoutParameters;
            lp.Height = (int)heightDp;
            appBarLayout.SetExpanded(true);


            //this.fab = FindViewById<FloatingActionButton>(Resource.Id.fab);

            //var collapsibleToolbar = FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
            this.SetHasOptionsMenu(true);
            this.progress = new Bindables.BindableProgress(view.Context, this.ViewModel);
            var set = this.CreateBindingSet <ListSongView, ListSongViewModel>();

            set.Bind(this.progress).For(p => p.Visible).To(vm => vm.IsBusy);
            set.Bind(collapsingToolbarLayout).For(p => p.Title).To(vm => vm.TitleView);

            //set.Bind(collapsibleToolbar).For(p => p.Title).To(vm => vm.TitleView);
            set.Apply();

            this.songList               = view.FindViewById <MvxRecyclerView>(Resource.Id.SongList);
            this.albumList              = view.FindViewById <MvxRecyclerView>(Resource.Id.AlbumList);
            this.similarList            = view.FindViewById <MvxRecyclerView>(Resource.Id.SimilarList);
            this.similarList.Visibility = ViewStates.Gone;
            this.albumList.Visibility   = ViewStates.Gone;

            DisplayMetrics    displayMetrics = this.Resources.DisplayMetrics;
            float             dpWidth        = displayMetrics.WidthPixels / displayMetrics.Density;
            var               columnFloat    = dpWidth / 160;
            GridLayoutManager lLayout        = new GridLayoutManager(view.Context, (int)Math.Truncate(columnFloat));
            GridLayoutManager lLayout2       = new GridLayoutManager(view.Context, (int)Math.Truncate(columnFloat));

            this.albumList.HasFixedSize = true;
            this.albumList.SetLayoutManager(lLayout);
            this.similarList.HasFixedSize = true;
            this.similarList.SetLayoutManager(lLayout2);

            GAService.GetGASInstance().Track_App_Page("List Songs");
            return(view);
        }
        private void Fab_Click(object sender, EventArgs e)
        {
            if (fullyExpanded)
            {
                if (editTextInputFrom.Text != editTextInputTo.Text & MainApp.Instance.RoomsDictionary.TryGetValue(editTextInputFrom.Text, out var startName) & MainApp.Instance.RoomsDictionary.TryGetValue(editTextInputTo.Text, out var finishName))
                {
                    InputMethodManager imm = (InputMethodManager)Activity.BaseContext.GetSystemService(Context.InputMethodService);
                    imm.HideSoftInputFromWindow(View.WindowToken, 0);
                    fab.SetImageResource(Resource.Drawable.ic_directions_black);
                    appBar.SetExpanded(false);

                    //fabLayoutParams.AnchorId = frameLayout.Id;
                    //fab.LayoutParameters = fabLayoutParams;

                    List <GraphNode> route;
                    try
                    {
                        route = Algorithms.CalculateRoute(mapGraph, startName, finishName);
                        var coordinateGroups = from node in route
                                               group node by new
                        {
                            node.FloorNumber,
                            node.FloorPartNumber
                        }
                        into g
                            select new
                        {
                            Floor       = g.Key,
                            Coordinates = from gnode in g select new Android.Graphics.Point(gnode.Point.X, gnode.Point.Y),
                        };
                        ClearAllRoutes();
                        foreach (var coordGroup in coordinateGroups)
                        {
                            var fragment = FragmentManager.FindFragmentByTag($"MAP_MAINBUILDING_{coordGroup.Floor.FloorNumber}") as MainBuildingMapFragment;
                            fragment.MapView.SetRoute(coordGroup.Coordinates.ToList());
                        }

                        int startFloor = route[0].FloorNumber;
                        int endFloor   = route.Last().FloorNumber;
                        fragments[startFloor - 1].MapView.SetMarker(new Android.Graphics.Point(route.First().Point.X, route.First().Point.Y), MainBuildingView.Marker.Start);
                        fragments[endFloor - 1].MapView.SetMarker(new Android.Graphics.Point(route.Last().Point.X, route.Last().Point.Y), MainBuildingView.Marker.End);

                        ChangeFloor(startFloor);
                    }
                    catch (GraphRoutingException ex)
                    {
                        Toast.MakeText(Activity, ex.Message, ToastLength.Long).Show();
                    }
                }
                else
                {
                    if (startName == null)
                    {
                        editTextInputFrom.Error = GetString(Resource.String.wrong_room);
                    }
                    if (finishName == null)
                    {
                        editTextInputTo.Error = GetString(Resource.String.wrong_room);
                    }
                }
            }
            else
            if (fullyCollapsed)
            {
                fab.SetImageResource(Resource.Drawable.ic_done_black);
                appBar.SetExpanded(true);

                //fabLayoutParams.AnchorId = relativeLayout.Id;
                //fab.LayoutParameters = fabLayoutParams;
                //fab.SetImageResource(Resource.Drawable.ic_done_black);
            }
        }