private void AboutFragment_Create(object sender, OnCreateEventArgs e)
 {
     Title = GetString(Resource.String.title_about);
     e.View.FindViewById <MaterialTextView>(Resource.Id.fragment_about_version)
     .Text = string.Format(
         GetString(Resource.String.msg_version),
         Assembly.GetExecutingAssembly().GetName().Version);
     e.View.FindViewById <MaterialButton>(Resource.Id.fragment_about_telegram)
     .Click += Telegram_Click;
     e.View.FindViewById <MaterialButton>(Resource.Id.fragment_about_instagram)
     .Click += Instagram_Click;
     e.View.FindViewById <MaterialButton>(Resource.Id.fragment_about_github)
     .Click += Github_Click;
 }
        private void LoginFragment_Create(object sender, OnCreateEventArgs e)
        {
            Title = GetString(Resource.String.title_addaccount);

            _et_username        = e.View.FindViewById <TextInputEditText>(Resource.Id.fragment_login_et_username);
            _et_password        = e.View.FindViewById <TextInputEditText>(Resource.Id.fragment_login_et_password);
            _et_layout_password = e.View.FindViewById <TextInputLayout>(Resource.Id.fragment_login_et_layout_password);
            _btn_login          = e.View.FindViewById <MaterialButton>(Resource.Id.fragment_login_btn_login);

            var btn_cancel = e.View.FindViewById <MaterialButton>(Resource.Id.fragment_login_btn_cancel);

            _btn_login.Click += LoginBtn_Click;
            btn_cancel.Click += CancelBtn_Click;
        }
Exemplo n.º 3
0
        private void OnCreate(object sender, OnCreateEventArgs e)
        {
            _recycler = e.View.FindViewById <RecyclerView>(Resource.Id.fragment_recyclerview_view);

            _view_loading = e.View.FindViewById(Resource.Id.fragment_recyclerview_loading);
            _view_empty   = e.View.FindViewById(Resource.Id.fragment_recyclerview_empty);
            _view_error   = e.View.FindViewById(Resource.Id.fragment_recyclerview_error);

            _tv_empty    = e.View.FindViewById <MaterialTextView>(Resource.Id.fragment_recyclerview_empty_text);
            _tv_error    = e.View.FindViewById <MaterialTextView>(Resource.Id.fragment_recyclerview_error_text);
            _tv_progress = e.View.FindViewById <MaterialTextView>(Resource.Id.fragment_recyclerview_loading_textview);

            _image_empty = e.View.FindViewById <AppCompatImageView>(Resource.Id.fragment_recyclerview_empty_image);
            _image_error = e.View.FindViewById <AppCompatImageView>(Resource.Id.fragment_recyclerview_error_image);

            e.View.FindViewById <MaterialButton>(Resource.Id.fragment_recyclerview_error_retry).SetOnClickListener(this);
        }
Exemplo n.º 4
0
        private void AccountsFragment_Create(object sender, OnCreateEventArgs e)
        {
            Title     = GetString(Resource.String.app_name);
            EmptyText = GetString(Resource.String.msg_no_account);
            // TODO: set ErrorText
            SetEmptyImage(Resource.Drawable.ic_person_add_black_48dp);

            var accounts = ((IInstagramHost)Activity).Accounts;

            _adapter = new AccountAdapter(accounts, this);
            Adapter  = _adapter;

            if (accounts.IsStateRestored)
            {
                ViewMode = RecyclerViewMode.Data;
            }
            else
            {
                DoTask(accounts.RestoreStateAsync(), _adapter.NotifyDataSetChanged);
            }
        }
Exemplo n.º 5
0
        private void UnfollowFragment_Create(object sender, OnCreateEventArgs e)
        {
            Title = _account.Data.User.Fullname;
            // TODO: set ErrorText
            // TODO: set EmptyText
            SetEmptyImage(Resource.Drawable.ic_person_remove_black_48dp);

            _adapter = new UnfollowerAdapter(_account, this);

            var wl_file_name   = _account.Data.User.Id + ".whitelist";
            var data_container = (IDataContainer)Activity;

            if (data_container.DataExists(wl_file_name))
            {
                var wl = (List <User>)data_container.LoadData(wl_file_name);
                _adapter.Whitelist.AddRange(wl);
            }

            Adapter = _adapter;
            _adapter.Refresh();
            ViewMode = RecyclerViewMode.Data;
        }