public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;
                if (viewHolder is MainPostAdapterViewHolder holder)
                {
                    var item = PostTypeList[_position];
                    if (item != null)
                    {
                        FontController.SetFont(holder.PostTypeText, 1);
                        holder.PostTypeText.Text = item.TypeText;
                        holder.PostImageIcon.SetImageResource(item.Image);

                        if (!string.IsNullOrEmpty(item.ImageColor))
                        {
                            holder.PostImageIcon.SetColorFilter(Color.ParseColor(item.ImageColor));
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#2
0
        public InviteFriends_AdapterViewHolder(View itemView, Action <InviteFriends_AdapterClickEventArgs> clickListener,
                                               Action <InviteFriends_AdapterClickEventArgs> longClickListener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values
                RelativeLayout_main = (RelativeLayout)MainView.FindViewById(Resource.Id.main);
                Txt_name            = (TextView)MainView.FindViewById(Resource.Id.name_Text);
                Txt_number          = (TextView)MainView.FindViewById(Resource.Id.numberphone_Text);
                ImageAvatar         = (ImageView)MainView.FindViewById(Resource.Id.Image_Avatar);

                //Create an Event
                itemView.Click += (sender, e) => clickListener(new InviteFriends_AdapterClickEventArgs
                {
                    View = itemView, Position = AdapterPosition
                });
                itemView.LongClick += (sender, e) => longClickListener(new InviteFriends_AdapterClickEventArgs
                {
                    View = itemView, Position = AdapterPosition
                });

                //Dont Remove this code #####
                FontController.SetFont(Txt_name, 1);
                FontController.SetFont(Txt_number, 3);
                //#####

                ImageCacheLoader.LoadImage("no_profile_image.png", ImageAvatar, false, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#3
0
        public BlockedUsers_AdapterViewHolder(View itemView, Action <BlockedUsers_AdapterClickEventArgs> clickListener, Action <BlockedUsers_AdapterClickEventArgs> longClickListener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values
                RelativeLayout_main = (RelativeLayout)MainView.FindViewById(Resource.Id.main);

                Txt_Username = (TextView)MainView.FindViewById(Resource.Id.Txt_Username);
                Txt_Lastseen = (TextView)MainView.FindViewById(Resource.Id.Txt_LastSeen);
                ImageAvatar  = (ImageView)MainView.FindViewById(Resource.Id.Image_Avatar);

                //Create an Event
                itemView.Click += (sender, e) => clickListener(new BlockedUsers_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                itemView.LongClick += (sender, e) => longClickListener(new BlockedUsers_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });

                FontController.SetFont(Txt_Username, 1);
                FontController.SetFont(Txt_Lastseen, 3);

                ImageCacheLoader.LoadImage("no_profile_image.png", ImageAvatar, false, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;
                if (viewHolder is Categories_AdapterViewHolder holder)
                {
                    var item = mCategoriesList[_position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.Button, 1);
                        //#####

                        if (item.Catigories_Color == Settings.MainColor)
                        {
                            holder.Button.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                        }
                        else
                        {
                            holder.Button.SetBackgroundResource(Resource.Drawable.Categories_button);
                        }

                        holder.Button.SetTextColor(Color.ParseColor(item.Catigories_Color));
                        holder.Button.Text = item.Catigories_Name;
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#5
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;

                if (viewHolder is NearByAdapterViewHolder holder)
                {
                    var item = mNearByList[_position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.Name, 1);
                        FontController.SetFont(holder.LastTimeOnline, 3);
                        FontController.SetFont(holder.Button, 1);
                        //#####
                        Initialize(holder, item);
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#6
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;
                if (viewHolder is FeelingsAdapterViewHolder holder)
                {
                    var item = FeelingsList[_position];
                    if (item != null)
                    {
                        FontController.SetFont(holder.FeelingName, 1);
                        holder.FeelingName.Text = item.FeelingText;

                        if (!string.IsNullOrEmpty(item.FeelingImageURL))
                        {
                            if (holder.Image.Tag?.ToString() != "loaded")
                            {
                                ImageServiceLoader.Load_Image(holder.Image, "ImagePlacholder.jpg", item.FeelingImageURL, 2);
                                holder.Image.Tag = "loaded";
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#7
0
        public SearchUser_AdapterViewHolder(View itemView, Action <SearchUser_AdapterClickEventArgs> clickListener,
                                            Action <SearchUser_AdapterClickEventArgs> longClickListener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values
                Image  = MainView.FindViewById <ImageView>(Resource.Id.card_pro_pic);
                Name   = MainView.FindViewById <TextView>(Resource.Id.card_name);
                About  = MainView.FindViewById <TextView>(Resource.Id.card_dist);
                Button = MainView.FindViewById <Button>(Resource.Id.cont);

                //Create an Event
                itemView.Click += (sender, e) => clickListener(new SearchUser_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                itemView.LongClick += (sender, e) => longClickListener(new SearchUser_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });

                //Dont Remove this code #####
                FontController.SetFont(Name, 1);
                FontController.SetFont(About, 3);
                FontController.SetFont(Button, 1);
                //#####

                ImageCacheLoader.LoadImage("no_profile_image.png", Image, false, true);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
示例#8
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;
                if (viewHolder is ProPages_AdapterViewHolder holder)
                {
                    var item = mProPagesList[_position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.Name, 1);
                        IMethods.Set_TextViewIcon("1", holder.IconPage, IonIcons_Fonts.IosFlag);


                        if (holder.Image.Tag?.ToString() != "loaded")
                        {
                            ImageServiceLoader.Load_Image(holder.Image, "ImagePlacholder.jpg", item.avatar, 1);
                            holder.Image.Tag = "loaded";
                        }

                        string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(item.page_name));
                        holder.Name.Text = name;
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#9
0
        //View itemView, string type, Action<int> listener
        public StoriesViewHolder(View itemView, Action <AdapterClickEvents> listener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values
                RelativeLayout_main = (RelativeLayout)MainView.FindViewById(Resource.Id.main);
                Txt_Username        = (TextView)MainView.FindViewById(Resource.Id.Txt_Username);
                Txt_description     = (TextView)MainView.FindViewById(Resource.Id.Txt_description);

                Profile_indicator     = itemView.FindViewById <CircleImageView>(Resource.Id.profile_indicator);
                ProfileImageViewAsync = itemView.FindViewById <ImageView>(Resource.Id.userProfileImage);

                //Create an Event
                itemView.Click += (sender, e) => listener(new AdapterClickEvents
                {
                    View     = itemView,
                    Position = AdapterPosition
                });

                //Dont Remove this code #####
                FontController.SetFont(Txt_Username, 1);
                FontController.SetFont(Txt_description, 3);
                //#####

                ImageCacheLoader.LoadImage("no_profile_image.png", ProfileImageViewAsync, false, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e + "Error");
            }
        }
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;
                if (viewHolder is Notifications_AdapterViewHolder holder)
                {
                    var item = mNotificationsList[_position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.UserName_Notfy, 1);
                        FontController.SetFont(holder.Text_Notfy, 3);
                        //#####

                        Initialize(holder, item);

                        if (Settings.FlowDirection_RightToLeft)
                        {
                            holder.Layout_main.LayoutDirection    = LayoutDirection.Rtl;
                            holder.Image_User.LayoutDirection     = LayoutDirection.Rtl;
                            holder.Image.LayoutDirection          = LayoutDirection.Rtl;
                            holder.Icon_Notfy.LayoutDirection     = LayoutDirection.Rtl;
                            holder.UserName_Notfy.LayoutDirection = LayoutDirection.Rtl;
                            holder.Text_Notfy.LayoutDirection     = LayoutDirection.Rtl;
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#11
0
        public Scrolly2(int w, int h)
            : base(w, h)
        {
            plasma = new Plasma(w, h);
            plasma.Update();

            font   = new FontController();
            curPos = Width;

            ParameterText        = ",   Hypnocube LED Strand Driver demo    ,   Hypnocube - www.Hypnocube.com       , All Hail Hypnocube! ";
            ParameterDescription = "First char is separator, then strings to show, separated by the separator";
        }
示例#12
0
 public static void ProvideFont(FontController font)
 {
     if (_font == null)
     {
         _font = font;
     }
     else
     {
         Debug.Log("ERROR | Singleton: Font already provided");
         Debug.Break();
     }
 }
示例#13
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;

                if (viewHolder is SocialLinks_AdapterViewHolder holder)
                {
                    var item = SocialList[position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.NameSocial, 1);
                        FontController.SetFont(holder.NameLink, 1);
                        //#####

                        string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(item.SocialName));
                        holder.NameSocial.Text = IMethods.Fun_String.SubStringCutOf(name, 20);

                        if (item.ID == 4)
                        {
                            IMethods.Set_TextViewIcon("3", holder.IconSocial, item.SocialIcon);
                        }
                        else
                        {
                            IMethods.Set_TextViewIcon("1", holder.IconSocial, item.SocialIcon);
                        }

                        holder.IconSocial.SetTextColor(item.IconColor);

                        if (item.Checkvisibilty)
                        {
                            IMethods.Set_TextViewIcon("1", holder.IconCheck, IonIcons_Fonts.Checkmark);
                            holder.IconCheck.SetTextColor(Color.ParseColor(Settings.MainColor));

                            holder.NameLink.Text = item.SocialLinkName;
                            holder.NameLink.SetTextColor(Color.ParseColor(Settings.MainColor));

                            holder.Layout_Checkvisibilty.Visibility = ViewStates.Visible;
                        }
                        else
                        {
                            holder.Layout_Checkvisibilty.Visibility = ViewStates.Invisible;
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#14
0
        void OnEnable()
        {
            _languageController = GetComponentInParent <LanguageController>();
            _fontController     = FindObjectOfType <FontController>();

            if (_languageController != null)
            {
                _languageController.LanguageChanged += LanguageController_LanguageChanged;
                UpdateSiblingIndex();
            }
            else
            {
                Debug.LogWarningFormat("{0} {1} must be parented to a {2}.", GetType(), gameObject.name, typeof(LanguageController));
            }
        }
示例#15
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;

                if (viewHolder is MoreSectionAdapterViewHolder holder)
                {
                    if (Settings.FlowDirection_RightToLeft)
                    {
                        holder.LinearLayout_image.LayoutDirection = LayoutDirection.Rtl;
                        holder.LinearLayout_main.LayoutDirection  = LayoutDirection.Rtl;
                        holder.Name.LayoutDirection = LayoutDirection.Rtl;
                    }

                    var item = SectionList[position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.Name, 1);
                        //#####

                        IMethods.Set_TextViewIcon("1", holder.Icon, item.Icon);
                        holder.Icon.SetTextColor(item.IconColor);
                        holder.Name.Text = item.SectionName;

                        if (item.BadgeCount != 0)
                        {
                            holder.Badge.Text = item.BadgeCount.ToString();
                        }

                        if (item.Badgevisibilty)
                        {
                            holder.Badge.Visibility = ViewStates.Visible;
                        }
                        else
                        {
                            holder.Badge.Visibility = ViewStates.Invisible;
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#16
0
        public Last_Calls_AdapterViewHolder(View itemView, Action <Last_Calls_AdapterClickEventArgs> clickListener, Action <Last_Calls_AdapterClickEventArgs> longClickListener
                                            , Action <Last_Calls_AdapterClickEventArgs> CallclickListener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values

                RelativeLayout_main = (RelativeLayout)MainView.FindViewById(Resource.Id.main);

                Txt_Username      = (TextView)MainView.FindViewById(Resource.Id.Txt_name);
                Txt_LastCall_icon = (AppCompatTextView)MainView.FindViewById(Resource.Id.LastCall_icon);
                Txt_LastTimecall  = (TextView)MainView.FindViewById(Resource.Id.Txt_Lasttimecalls);
                Image_Avatar      = (ImageView)MainView.FindViewById(Resource.Id.ImageAvatar);
                Txt_IconCall      = (AppCompatTextView)MainView.FindViewById(Resource.Id.IconCall);

                //Create an Event
                itemView.Click += (sender, e) => clickListener(new Last_Calls_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                itemView.LongClick += (sender, e) => longClickListener(new Last_Calls_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                Txt_IconCall.Click += (sender, e) => CallclickListener(new Last_Calls_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });

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

                //Dont Remove this code #####
                FontController.SetFont(Txt_Username, 1);
                FontController.SetFont(Txt_LastTimecall, 3);
                //#####

                ImageCacheLoader.LoadImage("no_profile_image.png", Image_Avatar, false, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                IMethods.IApp.FullScreenApp(this);

                // Set our view from the "Register_Layout" layout resource
                SetContentView(Resource.Layout.Register_Layout);

                regularTxt  = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Regular.ttf");
                semiboldTxt = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Semibold.ttf");

                EmailEditext          = FindViewById <EditText>(Resource.Id.emailfield);
                UsernameEditext       = FindViewById <EditText>(Resource.Id.usernamefield);
                PasswordEditext       = FindViewById <EditText>(Resource.Id.passwordfield);
                PasswordRepeatEditext = FindViewById <EditText>(Resource.Id.passwordrepeatfield);
                RegisterButton        = FindViewById <Button>(Resource.Id.registerButton);
                Main_LinearLayout     = FindViewById <LinearLayout>(Resource.Id.mainLinearLayout);
                progressBar           = FindViewById <ProgressBar>(Resource.Id.progressBar);

                progressBar.Visibility    = ViewStates.Gone;
                RegisterButton.Visibility = ViewStates.Visible;

                Chk_agree            = FindViewById <CheckBox>(Resource.Id.termCheckBox);
                Txt_Terms_of_service = FindViewById <TextView>(Resource.Id.secTermTextView);
                Txt_Privacy          = FindViewById <TextView>(Resource.Id.secPrivacyTextView);

                EmailEditext.SetTypeface(regularTxt, TypefaceStyle.Normal);
                UsernameEditext.SetTypeface(regularTxt, TypefaceStyle.Normal);
                PasswordEditext.SetTypeface(regularTxt, TypefaceStyle.Normal);
                PasswordRepeatEditext.SetTypeface(regularTxt, TypefaceStyle.Normal);
                Txt_Terms_of_service.SetTypeface(regularTxt, TypefaceStyle.Normal);
                Txt_Privacy.SetTypeface(regularTxt, TypefaceStyle.Normal);
                FontController.SetFont(RegisterButton, 1);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
 // Replace the contents of a view (invoked by the layout manager)
 public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
 {
     try
     {
         _position = position;
         if (viewHolder is FriendRequests_AdapterViewHolder holder)
         {
             var item = mFriendRequestsList[_position];
             if (item != null)
             {
                 FontController.SetFont(holder.Txt_Username, 1);
                 FontController.SetFont(holder.Txt_Lastseen, 3);
                 Initialize(holder, item);
             }
         }
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
     }
 }
示例#19
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        Screen.sleepTimeout         = SleepTimeout.NeverSleep;
        Application.targetFrameRate = 30;

        c_AchievementCtrl = AchievementController.Instance;
        c_FightCtrl       = FightController.Instance;
        c_FontCtrl        = FontController.Instance;
        c_LayoutCtrl      = LayoutController.Instance;
        c_LanguageCtrl    = LanguageController.Instance;
        c_SkinCtrl        = SkinController.Instance;
        c_TextColorCtrl   = TextColorController.Instance;
        c_RecordCtrl      = RecordController.Instance;
        c_RankCtrl        = RankController.Instance;
        c_GuiCtrl         = GuiController.Instance;
        c_BluetoothCtrl   = BluetoothController.Instance;
    }
示例#20
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;

                if (viewHolder is InviteFriends_AdapterViewHolder holder)
                {
                    var item = mUsersPhoneContacts[_position];
                    if (item != null)
                    {
                        FontController.SetFont(holder.Txt_name, 1);
                        FontController.SetFont(holder.Txt_number, 3);
                        Initialize(holder, item);
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
 // Replace the contents of a view (invoked by the layout manager)
 public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
 {
     try
     {
         _position = position;
         if (viewHolder is HashtagUser_AdapterViewHolder holder)
         {
             var item = mHashtagList[_position];
             if (item != null)
             {
                 //Dont Remove this code #####
                 FontController.SetFont(holder.Button, 1);
                 //#####
                 holder.Button.Text = "#" + item.tag;
             }
         }
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
     }
 }
示例#22
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;

                if (viewHolder is Movies_AdapterViewHolder holder)
                {
                    var item = mMoviesList[_position];
                    if (item != null)
                    {
                        FontController.SetFont(holder.Txt_Title, 1);
                        FontController.SetFont(holder.Txt_Description, 3);
                        FontController.SetFont(holder.Txt_ViewsCount, 3);
                        Initialize(holder, item);
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#23
0
        // Replace the contents of a view (invoked by the layout manager)
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;

                if (viewHolder is MyPagesAdapterViewHolder holder)
                {
                    var item = mAllMyPagesList[_position];
                    if (item != null)
                    {
                        //Dont Remove this code #####
                        FontController.SetFont(holder.Name, 1);
                        IMethods.Set_TextViewIcon("1", holder.IconPage, IonIcons_Fonts.IosFlag);
                        //#####
                        Initialize(holder, item);
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }
示例#24
0
 // Replace the contents of a view (invoked by the layout manager)
 public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
 {
     try
     {
         _position = position;
         if (viewHolder is LikedUsers_AdapterViewHolder holder)
         {
             var item = mPostlikedList[_position];
             if (item != null)
             {
                 //Dont Remove this code #####
                 FontController.SetFont(holder.Name, 1);
                 FontController.SetFont(holder.About, 3);
                 holder.Button.Visibility = ViewStates.Gone;
                 //#####
                 Initialize(holder, item);
             }
         }
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
     }
 }
示例#25
0
 // Replace the contents of a view (invoked by the layout manager)
 public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
 {
     try
     {
         _position = position;
         if (viewHolder is LastActivities_AdapterViewHolder holder)
         {
             var item = mLastActivitiesList[_position];
             if (item != null)
             {
                 //Dont Remove this code #####
                 FontController.SetFont(holder.Username, 1);
                 FontController.SetFont(holder.Activities_event, 1);
                 FontController.SetFont(holder.Time, 3);
                 //#####
                 Initialize(holder, item);
             }
         }
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
     }
 }
示例#26
0
        protected virtual void OnEnable()
        {
            _text = GetComponent <TextMeshProUGUI>();
            _languageController = GetComponentInParent <LanguageController>();
            _fontController     = FindObjectOfType <FontController>();

            if (!Application.isPlaying)
            {
                return;
            }

            if (_languageController != null)
            {
                _languageController.LanguageChanged += LanguageController_LanguageChanged;
                LanguageController.PropertyChanged  += LanguageController_PropertyChanged;
            }
            else
            {
                Debug.LogWarningFormat("[{0}] {1} must be parented to a {2}.", GetType(), gameObject.name, typeof(LanguageController));
            }

            _previousFontSize = FontSize;
            UpdateText();
        }
示例#27
0
        public LastMessages_AdapterViewHolder(View itemView, Action <LastMessages_AdapterClickEventArgs> clickListener, Action <LastMessages_AdapterClickEventArgs> longClickListener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values
                RelativeLayout_main = (RelativeLayout)MainView.FindViewById(Resource.Id.main);
                checkicon           = (AppCompatTextView)MainView.FindViewById(Resource.Id.IconCheckRead);
                LastMessagesIcon    = (AppCompatTextView)MainView.FindViewById(Resource.Id.LastMessages_icon);
                Txt_Username        = (TextView)MainView.FindViewById(Resource.Id.Txt_Username);
                Txt_LastMessages    = (TextView)MainView.FindViewById(Resource.Id.Txt_LastMessages);
                Txt_timestamp       = (TextView)MainView.FindViewById(Resource.Id.Txt_timestamp);
                ImageAvatar         = (ImageView)MainView.FindViewById(Resource.Id.ImageAvatar);
                ImageLastseen       = (CircleImageView)MainView.FindViewById(Resource.Id.ImageLastseen);

                //Create an Event
                itemView.Click += (sender, e) => clickListener(new LastMessages_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                itemView.LongClick += (sender, e) => longClickListener(new LastMessages_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });

                //Dont Remove this code #####
                FontController.SetFont(Txt_Username, 1);
                FontController.SetFont(Txt_LastMessages, 3);
                //#####

                ImageCacheLoader.LoadImage("no_profile_image.png", ImageAvatar, false, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e + "Error");
            }
        }
示例#28
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.Main);

                regularTxt  = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Regular.ttf");
                semiboldTxt = Typeface.CreateFromAsset(Assets, "fonts/SF-UI-Display-Semibold.ttf");

                //Get values
                UsernameEditext = FindViewById <EditText>(Resource.Id.usernamefield);
                PasswordEditext = FindViewById <EditText>(Resource.Id.passwordfield);
                progressBar     = FindViewById <ProgressBar>(Resource.Id.progressBar);

                Btn_Login = FindViewById <Button>(Resource.Id.loginButton);

                RegisterButton = FindViewById <Button>(Resource.Id.signUpButton);

                Main_LinearLayout = FindViewById <LinearLayout>(Resource.Id.mainLinearLayout);

                topTitile      = FindViewById <TextView>(Resource.Id.titile);
                topTitile.Text = AppSettings.Application_Name;

                subTitile      = FindViewById <TextView>(Resource.Id.subtitile);
                subTitile.Text = this.GetText(Resource.String.Lbl_Subtitile_Login);

                Txt_forgetpass = FindViewById <TextView>(Resource.Id.forgetpassButton);

                Txt_Terms_of_service = FindViewById <TextView>(Resource.Id.secTermTextView);
                Txt_Privacy          = FindViewById <TextView>(Resource.Id.secPrivacyTextView);

                progressBar.Visibility = ViewStates.Invisible;

                UsernameEditext.SetTypeface(regularTxt, TypefaceStyle.Normal);
                PasswordEditext.SetTypeface(regularTxt, TypefaceStyle.Normal);
                topTitile.SetTypeface(regularTxt, TypefaceStyle.Normal);
                subTitile.SetTypeface(regularTxt, TypefaceStyle.Normal);
                Txt_forgetpass.SetTypeface(regularTxt, TypefaceStyle.Normal);
                Txt_Terms_of_service.SetTypeface(regularTxt, TypefaceStyle.Normal);
                Txt_Privacy.SetTypeface(regularTxt, TypefaceStyle.Normal);
                FontController.SetFont(Btn_Login, 1);
                FontController.SetFont(RegisterButton, 1);

                //Social Logins >>
                //==============================
                FacebookSdk.SdkInitialize(this);

                mprofileTracker = new FB_MyProfileTracker();
                mprofileTracker.StartTracking();

                BtnFBLogin = FindViewById <LoginButton>(Resource.Id.fblogin_button);
                BtnFBLogin.SetReadPermissions(new List <string>
                {
                    "email",
                    "public_profile"
                });
                mFBCallManager = CallbackManagerFactory.Create();
                BtnFBLogin.RegisterCallback(mFBCallManager, this);

                //FB accessToken
                var accessToken = AccessToken.CurrentAccessToken;
                var isLoggedIn  = accessToken != null && !accessToken.IsExpired;
                if (isLoggedIn && Profile.CurrentProfile != null)
                {
                    LoginManager.Instance.LogOut();
                }

                // Configure sign-in to request the user's ID, email address, and basic profile. ID and basic profile are included in DEFAULT_SIGN_IN.
                var gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn)
                          .RequestIdToken(GoogleServices.ClientId)
                          .RequestScopes(new Scope(Scopes.Profile))
                          .RequestScopes(new Scope(Scopes.PlusLogin))
                          .RequestServerAuthCode(GoogleServices.ClientId)
                          .RequestProfile().RequestEmail().Build();

                // Build a GoogleApiClient with access to the Google Sign-In API and the options specified by gso.
                mGoogleApiClient = new GoogleApiClient.Builder(this, this, this)
                                   .EnableAutoManage(this, this)
                                   .AddApi(Auth.GOOGLE_SIGN_IN_API, gso)
                                   .Build();

                mGoogleSignIn = FindViewById <Button>(Resource.Id.Googlelogin_button);



                if (!AppSettings.Show_Facebook_Login)
                {
                    BtnFBLogin.Visibility = ViewStates.Gone;
                }

                if (!AppSettings.Show_Google_Login)
                {
                    mGoogleSignIn.Visibility = ViewStates.Gone;
                }

                //==============================

                if (!string.IsNullOrEmpty(OneSignalNotification.OneSignalAPP_ID))
                {
                    if (AppSettings.ShowNotification)
                    {
                        OneSignalNotification.RegisterNotificationDevice();
                    }
                }

                if ((int)Build.VERSION.SdkInt < 23)
                {
                }
                else
                {
                    RequestPermissions(new string[]
                    {
                        Manifest.Permission.ReadExternalStorage,
                        Manifest.Permission.WriteExternalStorage,
                    }, 1);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#29
0
        public AddNewCall_AdapterViewHolder(View itemView, Action <AddNewCall_AdapterClickEventArgs> clickListener, Action <AddNewCall_AdapterClickEventArgs> longClickListener
                                            , Action <AddNewCall_AdapterClickEventArgs> AudioCallclickListener, Action <AddNewCall_AdapterClickEventArgs> VideoCallclickListener) : base(itemView)
        {
            try
            {
                MainView = itemView;

                //Get values
                RelativeLayout_main = (RelativeLayout)MainView.FindViewById(Resource.Id.main);
                Txt_Username        = (TextView)MainView.FindViewById(Resource.Id.Txt_Username);
                Txt_platform        = (TextView)MainView.FindViewById(Resource.Id.Txt_Userplatform);
                ImageAvatar         = (ImageView)MainView.FindViewById(Resource.Id.Img_Avatar);
                Image_Lastseen      = (CircleImageView)MainView.FindViewById(Resource.Id.Img_Lastseen);
                Txt_IconAudioCall   = (AppCompatTextView)MainView.FindViewById(Resource.Id.IconAudioCall);
                Txt_IconVideoCall   = (AppCompatTextView)MainView.FindViewById(Resource.Id.IconVideoCall);

                itemView.Click += (sender, e) => clickListener(new AddNewCall_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                itemView.LongClick += (sender, e) => longClickListener(new AddNewCall_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                Txt_IconAudioCall.Click += (sender, e) => AudioCallclickListener(new AddNewCall_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });
                Txt_IconVideoCall.Click += (sender, e) => VideoCallclickListener(new AddNewCall_AdapterClickEventArgs {
                    View = itemView, Position = AdapterPosition
                });


                FontController.SetFont(Txt_Username, 1);
                FontController.SetFont(Txt_platform, 3);

                if (AppSettings.Enable_Video_Call)
                {
                    Txt_IconVideoCall.Visibility = ViewStates.Visible;
                    IMethods.Set_TextViewIcon("1", Txt_IconVideoCall, IonIcons_Fonts.IosVideocam);
                }
                else
                {
                    Txt_IconVideoCall.Visibility = ViewStates.Gone;
                }

                if (AppSettings.Enable_Audio_Call)
                {
                    Txt_IconAudioCall.Visibility = ViewStates.Visible;
                    IMethods.Set_TextViewIcon("1", Txt_IconAudioCall, IonIcons_Fonts.AndroidCall);
                    Txt_IconAudioCall.SetTextColor(Color.ParseColor(AppSettings.MainColor));
                }
                else
                {
                    Txt_IconAudioCall.Visibility = ViewStates.Gone;
                }

                ImageCacheLoader.LoadImage("no_profile_image.png", ImageAvatar, false, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#30
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position)
        {
            try
            {
                _position = position;
                if (viewHolder is MentionAdapterViewHolder holder)
                {
                    var item = MentionList[position];
                    if (item != null)
                    {
                        FontController.SetFont(holder.Name, 1);
                        FontController.SetFont(holder.About, 3);

                        holder.CheckBox.Checked = item.Selected;
                        holder.CheckBox.SetOnCheckedChangeListener(null);

                        if (!holder.MainView.HasOnClickListeners)
                        {
                            holder.MainView.Click += (sender, args) =>
                            {
                                if (holder.CheckBox.Checked)
                                {
                                    holder.CheckBox.Checked = false;
                                    item.Selected           = false;
                                    NotifyItemChanged(position);
                                }
                                else
                                {
                                    holder.CheckBox.Checked = true;
                                    item.Selected           = true;
                                    NotifyItemChanged(position);
                                }
                            }
                        }
                        ;

                        var AvatarSplit     = item.avatar.Split('/').Last();
                        var getImage_Avatar =
                            IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskImage, AvatarSplit);
                        if (getImage_Avatar != "File Dont Exists")
                        {
                            if (holder.Image.Tag?.ToString() != "loaded")
                            {
                                ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", getImage_Avatar, 1);
                                holder.Image.Tag = "loaded";
                            }
                        }
                        else
                        {
                            if (holder.Image.Tag?.ToString() != "loaded")
                            {
                                IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskImage, item.avatar);
                                ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", item.avatar, 1);
                                holder.Image.Tag = "loaded";
                            }
                        }

                        var CoverSplit     = item.cover.Split('/').Last();
                        var getImage_Cover = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskImage, CoverSplit);
                        if (getImage_Cover == "File Dont Exists")
                        {
                            IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskImage, item.cover);
                        }

                        string name = IMethods.Fun_String.DecodeString(IMethods.Fun_String.DecodeStringWithEnter(item.name));
                        holder.Name.Text = name;

                        var dataabout = IMethods.Fun_String.StringNullRemover(item.about);
                        if (dataabout != "Empty")
                        {
                            var about = IMethods.Fun_String.DecodeString(
                                IMethods.Fun_String.DecodeStringWithEnter(dataabout));
                            holder.About.Text = IMethods.Fun_String.SubStringCutOf(about, 25);
                        }
                        else
                        {
                            var about = Activity_Context.GetText(Resource.String.Lbl_DefaultAbout) + " " +
                                        Settings.Application_Name;
                            holder.About.Text = IMethods.Fun_String.SubStringCutOf(about, 25);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Crashes.TrackError(exception);
            }
        }