Ejemplo n.º 1
0
#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);
        }
Ejemplo n.º 2
0
        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);
        }
        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();
        }
Ejemplo n.º 4
0
#pragma warning restore 0649

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_welcome);
            Cheeseknife.Bind(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.Settings.IsDev;
            _devSwitcher.CheckedChange += OnDevSwitcherOnCheckedChange;

            _steemLogin.Click    += SteemLogin;
            _golosLogin.Click    += GolosLogin;
            _regButton.Click     += RegistrationClick;
            _steepshotLogo.Click += Logo_Click;
        }
Ejemplo n.º 5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            SetTheme(Resource.Style.NavigationViewLight);
            base.OnCreate(savedInstanceState);

            callback = new RerouteActivityLocationCallback(this);

            SetContentView(Resource.Layout.activity_reroute);
            Cheeseknife.Bind(this);

            mapView.OnCreate(savedInstanceState);
            mapView.GetMapAsync(this);

            MapboxNavigationOptions options = MapboxNavigationOptions.InvokeBuilder().IsDebugLoggingEnabled(true).Build();

            navigation = new Mapbox.Services.Android.Navigation.V5.Navigation.MapboxNavigation(ApplicationContext, Mapbox.Mapboxsdk.Mapbox.AccessToken, options);
            navigation.AddNavigationEventListener(this);
            navigation.AddMilestoneEventListener(this);
            AddNavigationForHistory(navigation);

            instructionView.RetrieveSoundButton().Show();
            instructionView.RetrieveSoundButton().AddOnClickListener(new InstructionViewOnClickListener((v) =>
            {
                Toast.MakeText(this, "Sound button clicked!", ToastLength.Short).Show();
            }));
        }
Ejemplo n.º 6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.SplashActivity);

            /* Bind CheeseKnife */
            Cheeseknife.Bind(this);

            Task.Run(() =>
            {
                Enumerable.Range(0, 100).ToList().ForEach(i =>
                {
                    RunOnUiThread(() => _waveView.SetProgress(i));
                    Thread.Sleep(TimeSpan.FromMilliseconds(5));

                    if (i != 85)
                    {
                        return;
                    }

                    new Task(() =>
                    {
                        StartActivity(new Intent(this, typeof(MainActivity)));
                        Finish();
                    })
                    .Start();
                });
            });
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_mock_navigation);
            Cheeseknife.Bind(this);
            routeRefresh = new RouteRefresh(Mapbox.Mapboxsdk.Mapbox.AccessToken, this);

            mapView.OnCreate(savedInstanceState);
            mapView.GetMapAsync(this);

            Context context = ApplicationContext;
            CustomNavigationNotification customNotification = new CustomNavigationNotification(context);
            MapboxNavigationOptions      options            = MapboxNavigationOptions.InvokeBuilder()
                                                              .NavigationNotification(customNotification)
                                                              .Build();

            navigation = new Mapbox.Services.Android.Navigation.V5.Navigation.MapboxNavigation(this, Mapbox.Mapboxsdk.Mapbox.AccessToken, options);

            var builder = new RouteMilestone.Builder();

            builder.SetIdentifier(BEGIN_ROUTE_MILESTONE);
            builder.SetInstruction(new BeginRouteInstruction());
            builder.SetTrigger(
                Trigger.All(
                    Trigger.Lt(TriggerProperty.StepIndex, 3),
                    Trigger.Gt(TriggerProperty.StepDistanceTotalMeters, 200),
                    Trigger.Gte(TriggerProperty.StepDistanceTraveledMeters, 75)
                    )
                );

            navigation.AddMilestone(builder.Build());
            customNotification.Register(new MyBroadcastReceiver(navigation), context);
        }
        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);
        }
Ejemplo n.º 9
0
        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);
        }
Ejemplo n.º 10
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);
 }
Ejemplo n.º 11
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);
        }
Ejemplo n.º 12
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();
                    });
                }
            }
        }
Ejemplo n.º 13
0
        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();
        }
Ejemplo n.º 14
0
#pragma warning restore 0649


        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_pre_sign_in);
            Cheeseknife.Bind(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;
        }
Ejemplo n.º 15
0
        protected override async void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Cheeseknife.Bind(this);


            _uploadPost.Click += UploadPostClick;
            var posts = new List <Post>
            {
                new Post
                {
                    Url         = "https://static.eos.io/images/Landing/SectionResourceLanding/DevPortLaunch_Social_Eosio-home_opt.jpg",
                    AccauntName = ""
                }
            };

            _adapter = new PostAdapter(this, posts);
            _postList.SetAdapter(_adapter);
            _postList.SetLayoutManager(new LinearLayoutManager(Android.App.Application.Context));
            _httpManager            = new HttpManager();
            _instagramToTvimAdapter = new InstagramToTvimAdapter();
            var assetsHelper = new AssetsHelper(Assets);

            _debugAsset = assetsHelper.TryReadAsset <DebugAsset>("DebugAsset.txt");
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.activity_add_event);
     Cheeseknife.Inject(this);
     edtEventTitle.SetFilters(new IInputFilter[] { new InputFilterAllCaps() });
 }
Ejemplo n.º 17
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.activity_add_amount);
     Cheeseknife.Inject(this);
     Init();
 }
Ejemplo n.º 18
0
        public ToggleButtons(View view, SaunaModel saunaModel)
        {
            Cheeseknife.Inject(this, view);

            this.context    = view.Context;
            this.saunaModel = saunaModel;
        }
Ejemplo n.º 19
0
#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;
            }
        }
Ejemplo n.º 20
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     TabLayout.TabSelected   -= OnTabLayoutOnTabSelected;
     TabLayout.TabReselected -= OnTabLayoutOnTabReselected;
     Cheeseknife.Reset(this);
 }
Ejemplo n.º 21
0
        protected override async void OnDestroy()
        {
            base.OnDestroy();
            await SavePushSettings();

            Cheeseknife.Reset(this);
        }
Ejemplo n.º 22
0
#pragma warning restore 0649

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_auto_test);
            Cheeseknife.Bind(this);
            _testContainer = new MobileAutoTests(Presenter.OpenApi, AppSettings.User.UserInfo, AppSettings.AppInfo);
            _testContainer.StepFinished += UpdateResult;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_navigation_fragment);
            Cheeseknife.Bind(this);
            InitializeNavigationViewFragment(savedInstanceState);
        }
Ejemplo n.º 24
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.activity_navigation_launcher);
     Cheeseknife.Bind(this);
     mapView.OnCreate(savedInstanceState);
     mapView.GetMapAsync(this);
 }
 public HeadCountryViewHolder(View itemView) : base(itemView)
 {
     Cheeseknife.Inject(this, itemView);
     tvCountryName.Click += (sender, e) =>
     {
         Toast.MakeText(itemView.Context, country.Name, ToastLength.Short).Show();
     };
 }
Ejemplo n.º 26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(LayoutResource);

            /* Bind CheeseKnife */
            Cheeseknife.Bind(this);
        }
Ejemplo n.º 27
0
 public override void OnDetach()
 {
     _tokenOneValue.ViewTreeObserver.GlobalLayout -= TokenValuesGlobalLayout;
     _tokenTwoValue.ViewTreeObserver.GlobalLayout -= TokenValuesGlobalLayout;
     base.OnDetach();
     Cheeseknife.Reset(this);
     GC.Collect(0);
 }
Ejemplo n.º 28
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            CrossCurrentActivity.Current.Init(this, savedInstanceState);

            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_login);
            Cheeseknife.Inject(this);
        }
        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);
        }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.Main);
     Cheeseknife.Bind(this);
     MobileBarcodeScanner.Initialize(Application);
     InitLoaders();
 }