protected override void OnCreate(Bundle bundle)
        {
            RequestWindowFeature(WindowFeatures.NoTitle);
            base.OnCreate(bundle);

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

            if (_toolbar != null)
            {
                SetSupportActionBar(_toolbar);
                SupportActionBar.SetDisplayShowTitleEnabled(false);
                //SupportActionBar.SetTitle (Resource.String.app_name);
            }

            View guillotineMenu = LayoutInflater.From(this).Inflate(Resource.Layout.Guillotine, null);

            _root.AddView(guillotineMenu);

            new GuillotineBuilder(guillotineMenu, guillotineMenu.FindViewById(Resource.Id.guillotine_hamburger), _contentHamburger)
            .SetStartDelay(RIPPLE_DURATION)
            .SetActionBarViewForAnimation(_toolbar)
            .Build();
        }
#pragma warning restore 0649

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_settings);
            Cheeseknife.Inject(this);

            var appInfoService = AppSettings.AppInfo;
            var accounts       = BasePresenter.User.GetAllAccounts();

            _viewTitle.Text      = AppSettings.LocalizationManager.GetText(LocalizationKeys.AppSettingsTitle);
            _nsfwSwitchText.Text = AppSettings.LocalizationManager.GetText(LocalizationKeys.ShowNsfw);
            _lowSwitchText.Text  = AppSettings.LocalizationManager.GetText(LocalizationKeys.ShowLowRated);
            _versionText.Text    = AppSettings.LocalizationManager.GetText(LocalizationKeys.AppVersion, appInfoService.GetAppVersion(), appInfoService.GetBuildVersion());
            _addButton.Text      = AppSettings.LocalizationManager.GetText(LocalizationKeys.AddAccountText);
            _guideButton.Text    = AppSettings.LocalizationManager.GetText(LocalizationKeys.Guidelines);
            _termsButton.Text    = AppSettings.LocalizationManager.GetText(LocalizationKeys.ToS);

            SetAddButton(accounts.Count);

            _backButton.Visibility = ViewStates.Visible;
            _backButton.Click     += GoBackClick;
            _switcher.Visibility   = ViewStates.Gone;
            _settings.Visibility   = ViewStates.Gone;

            _viewTitle.Typeface      = Style.Semibold;
            _addButton.Typeface      = Style.Semibold;
            _versionText.Typeface    = Style.Regular;
            _nsfwSwitchText.Typeface = Style.Semibold;
            _lowSwitchText.Typeface  = Style.Semibold;
            _termsButton.Typeface    = Style.Semibold;
            _termsButton.Click      += TermsOfServiceClick;
            _guideButton.Typeface    = Style.Semibold;
            _guideButton.Click      += GuideClick;

            _addButton.Click += AddAccountClick;

            _accountsAdapter = new AccountsAdapter();
            _accountsAdapter.AccountsList   = accounts;
            _accountsAdapter.DeleteAccount += OnAdapterDeleteAccount;
            _accountsAdapter.PickAccount   += OnAdapterPickAccount;

            if (Build.VERSION.SdkInt >= Build.VERSION_CODES.Lollipop)
            {
                _accountsList.NestedScrollingEnabled = false;
            }
            _accountsList.SetLayoutManager(new LinearLayoutManager(this));
            _accountsList.SetAdapter(_accountsAdapter);

            _nsfwSwitcher.Checked     = BasePresenter.User.IsNsfw;
            _lowRatedSwitcher.Checked = BasePresenter.User.IsLowRated;

            _nsfwSwitcher.CheckedChange     += OnNsfwSwitcherOnCheckedChange;
            _lowRatedSwitcher.CheckedChange += OnLowRatedSwitcherOnCheckedChange;
            //for tests
            if (BasePresenter.User.IsDev || BasePresenter.User.Login.Equals("joseph.kalu"))
            {
                _testsButton.Visibility = ViewStates.Visible;
                _testsButton.Click     += StartTestActivity;
            }
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.activity_add_amount);
     Cheeseknife.Inject(this);
     Init();
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.EventDetail);

            Cheeseknife.Inject(this);

            if (!AppDataController.Instance.IsAdmin)
            {
                btnOption.Visibility = ViewStates.Gone;
            }

            content     = Intent.GetStringExtra("EventDetail");
            eventDetail = JsonConvert.DeserializeObject <UserLoginEventModel>(content);

            if (eventDetail.TimeEnd > DateTime.Now)
            {
                tvStatus.ChangeTextViewStatus(currentIsJoined);

                tvStatus.Click += (s, e) =>
                {
                    if (!currentIsJoined)
                    {
                        UpdateUserEvents(!currentIsJoined);
                    }
                    else
                    {
                        unjoinEventFragment.Show(SupportFragmentManager, null);
                    }
                };
            }

            Update();
        }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SampleApp.ListSampleAdapter+ViewHolder"/> class.
 /// </summary>
 /// <param name="view">View that represents the list item.</param>
 public ViewHolder(View view)
 {
     // Simply call Cheeseknife to resolve all the
     // child views of this ViewHolder object ...
     // sweet huh?
     Cheeseknife.Inject(this, view);
 }
#pragma warning restore 0649

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var v = inflater.Inflate(Resource.Layout.lyt_old_camera, null);

            Cheeseknife.Inject(this, v);
            return(v);
        }
示例#7
0
        public ToggleButtons(View view, SaunaModel saunaModel)
        {
            Cheeseknife.Inject(this, view);

            this.context    = view.Context;
            this.saunaModel = saunaModel;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.fragment_dashboard, container, false);

            Cheeseknife.Inject(this, view);

            InitFabsMenu();

            if (appDataController.UserName.Length > 10)
            {
                tvUserName.Text = appDataController.UserName.Substring(0, 10).ToString() + "...";
            }
            else
            {
                tvUserName.Text = appDataController.UserName;
            }

            LoadAvatar();

            civAvatar.Click += CivAvatar_Click;

            GetAndShowAppVersion();
            SetTextFont();
            DisplayData(data);
            return(view);
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            Cheeseknife.Inject(this);

            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);


            mDrawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            ListView mDrawerList = FindViewById <ListView>(Resource.Id.left_drawer);

            mDrawerList.Adapter = new LeftDrawerAdapter(this);

            mDrawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, mDrawerLayout, toolbar, Resource.String.opened, Resource.String.closed);

            mDrawerLayout.SetDrawerListener(mDrawerToggle);

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
        }
示例#10
0
#pragma warning restore 0649


        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_pre_sign_in);
            Cheeseknife.Inject(this);
#if DEBUG
            var di = AppSettings.AssetsesHelper.GetDebugInfo();
            _username.Text = BasePresenter.Chain == KnownChains.Golos
                ? di.GolosTestLogin
                : di.SteemTestLogin;
#endif

            _backButton.Visibility = ViewStates.Visible;
            _backButton.Click     += GoBack;
            _switcher.Visibility   = ViewStates.Gone;
            _settings.Visibility   = ViewStates.Gone;
            _viewTitle.Text        = AppSettings.LocalizationManager.GetText(LocalizationKeys.YourAccountName);

            _viewTitle.Typeface    = Style.Semibold;
            _username.Typeface     = Style.Regular;
            _preSignInBtn.Typeface = Style.Semibold;
            _preSignInBtn.Text     = AppSettings.LocalizationManager.GetText(LocalizationKeys.NextStep);
            _preSignInBtn.Click   += SignInBtn_Click;
            _rootLayout.Click     += HideKeyboard;
        }
示例#11
0
#pragma warning restore 0649

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_welcome);
            Cheeseknife.Inject(this);

            var msg = AppSettings.LocalizationManager.GetText(LocalizationKeys.TitleForAcceptToS);

            _termsTextView.TextFormatted = Build.VERSION.SdkInt >= Build.VERSION_CODES.N
                ? Html.FromHtml(msg, FromHtmlOptions.ModeLegacy)
                : Html.FromHtml(msg);

            _termsTextView.MovementMethod = new LinkMovementMethod();

            _termsTextView.Typeface = Style.Regular;
            _steemLogin.Typeface    = Style.Semibold;
            _golosLogin.Typeface    = Style.Semibold;
            _regButton.Typeface     = Style.Semibold;

            _steemLogin.Text            = AppSettings.LocalizationManager.GetText(LocalizationKeys.SignInButtonText, "Steem");
            _golosLogin.Text            = AppSettings.LocalizationManager.GetText(LocalizationKeys.SignInButtonText, "Golos");
            _regButton.Text             = AppSettings.LocalizationManager.GetText(LocalizationKeys.CreateButtonText);
            _devSwitcher.Checked        = AppSettings.IsDev;
            _devSwitcher.CheckedChange += OnDevSwitcherOnCheckedChange;

            _steemLogin.Click    += SteemLogin;
            _golosLogin.Click    += GolosLogin;
            _regButton.Click     += RegistrationClick;
            _steepshotLogo.Click += Logo_Click;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.PoselProfileFragmentLayout, container, false);

            Cheeseknife.Inject(this, view);
            return(view);
        }
示例#13
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_post);
            Cheeseknife.Inject(this);
            _PostsManager = new PostManager(new PostService(DeviceManager.Instance));

            Bundle bundle = Intent.Extras;

            if (bundle != null)
            {
                if (!string.IsNullOrEmpty(Intent.Extras.GetString("person")))
                {
                    _Person      = JsonConvert.DeserializeObject <People>(Intent.Extras.GetString("person"));
                    TvName.Text  = _Person.Name;
                    TvPhone.Text = _Person.Phone;
                    TvEmail.Text = _Person.Email;

                    this.RunOnUiThread(async() =>
                    {
                        await GetPostsAsync();
                    });
                }
            }
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.activity_add_event);
     Cheeseknife.Inject(this);
     edtEventTitle.SetFilters(new IInputFilter[] { new InputFilterAllCaps() });
 }
示例#15
0
        /// <summary>
        /// Create the view for the fragment.
        /// </summary>
        /// <param name="inflater">The inflater to use to inflate an XML layout.</param>
        /// <param name="container">The container of the resulting view.</param>
        /// <param name="savedInstanceState">No clue.</param>
        /// <returns>The created view.</returns>
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var res = inflater.Inflate(Resource.Layout.RecipeDetailLayout, container, false);

            Cheeseknife.Inject(this, res);

            nameField.Text      = Recipe.Name;
            targetNicField.Text = Recipe.TargetNicotine.ToString();
            batchSizeField.Text = Recipe.BatchSize.ToString();

            ArrayAdapter <Nicotine> nicAdapter = new ArrayAdapter <Nicotine>(Activity, Android.Resource.Layout.SimpleSpinnerDropDownItem,
                                                                             Nicotines);

            nicotineSpinner.Adapter       = nicAdapter;
            nicotineSpinner.ItemSelected += delegate(Object caller, ItemSelectedEventArgs args) {
                Nicotine nic = Nicotines[args.Position];
                Recipe.Nicotine = nic;
            };

            int pg = Recipe.PG;
            int vg = 100 - pg;

            pgSlider.Progress         = pg;
            pgSlider.ProgressChanged += delegate {
                pgLabel.Text = "" + pgSlider.Progress + "% / " + (100 - pgSlider.Progress) + "%";
            };
            pgLabel.Text = "" + pg + "% / " + vg + "%";

            return(res);
        }
示例#16
0
#pragma warning restore 0649

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_auto_test);
            Cheeseknife.Inject(this);
            _testContainer = new MobileAutoTests(Presenter.OpenApi, BasePresenter.User.UserInfo, AppSettings.AppInfo);
            _testContainer.StepFinished += UpdateResult;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.fragment_balance_recyclerview, container, false);

            Cheeseknife.Inject(this, view);
            Init();
            return(view);
        }
 public HeadCountryViewHolder(View itemView) : base(itemView)
 {
     Cheeseknife.Inject(this, itemView);
     tvCountryName.Click += (sender, e) =>
     {
         Toast.MakeText(itemView.Context, country.Name, ToastLength.Short).Show();
     };
 }
示例#19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_login);
            Cheeseknife.Inject(this);
        }
示例#20
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            View view = inflater.Inflate(Resource.Layout.light_settings_fragment, container, false);

            Cheeseknife.Inject(this, view);

            return(view);
        }
示例#21
0
        /// <summary>
        /// On creation of the activity.
        /// </summary>
        /// <param name="bundle">The state of the activity, if it is being restored.</param>
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            Cheeseknife.Inject(this);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            var view = LayoutInflater.Inflate(Resource.Layout.add_item_dialog, null, false);

            SetContentView(view);
            Cheeseknife.Inject(this, view);
            Init();
        }
示例#23
0
        public FeeOrOutcomeGroupAdapterViewHolder(View itemView) : base(itemView)
        {
            Cheeseknife.Inject(this, itemView);

            itemView.Click += (s, e) =>
            {
                ClickHander?.Invoke(id, null);
            };
        }
示例#24
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            var view = LayoutInflater.Inflate(Resource.Layout.no_internet_bottom_dialog_fragment_layout, null);

            Cheeseknife.Inject(this, view);
            SetContentView(view);
            SetCancelable(false);
        }
示例#25
0
        public NotificationsAdapterViewHolder(View itemView) : base(itemView)
        {
            Cheeseknife.Inject(this, itemView);

            itemView.Click += (s, e) =>
            {
                ClickHander?.Invoke(notificationModel, e);
            };
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.InterpellationFragmentLayout, container, false);

            Cheeseknife.Inject(this, view);

            (Activity as BaseActivity).SupportActionBar.Title = String.Concat(poselName, " - interpelacja");

            return(view);
        }
示例#27
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.SejmVotingFragmentLayout, container, false);

            Cheeseknife.Inject(this, view);

            (Activity as BaseActivity).SupportActionBar.Title = String.Concat("Głosowanie");

            return(view);
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.Main);
     Cheeseknife.Inject(this);
     provider = DataProvider.Instance;
     adapter  = new AssignmentAdapter(provider.Assignments);
     rvAssignments.SetLayoutManager(new LinearLayoutManager(this));
     rvAssignments.SetAdapter(adapter);
 }
示例#29
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(LayoutResource);

            Cheeseknife.Inject(this);

            ConfigureToolbar();
        }
示例#30
0
#pragma warning restore 0649

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            if (!IsInitialized)
            {
                InflatedView = inflater.Inflate(Resource.Layout.lyt_followers, null);
                Cheeseknife.Inject(this, InflatedView);
            }
            ToggleTabBar();
            return(InflatedView);
        }