Exemplo n.º 1
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();
                });
            });
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
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;
        }
        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);
        }
#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.Bind(this, v);
            return(v);
        }
Exemplo n.º 6
0
#pragma warning restore 0649

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lyt_settings);
            Cheeseknife.Bind(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.AppVersion2, 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;
            }
        }
Exemplo n.º 7
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");
        }
Exemplo n.º 8
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();
            }));
        }
Exemplo n.º 9
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);
 }
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.Main);
     Cheeseknife.Bind(this);
     MobileBarcodeScanner.Initialize(Application);
     InitLoaders();
 }
Exemplo n.º 11
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;
        }
Exemplo n.º 12
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(LayoutResource);

            /* Bind CheeseKnife */
            Cheeseknife.Bind(this);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_navigation_fragment);
            Cheeseknife.Bind(this);
            InitializeNavigationViewFragment(savedInstanceState);
        }
Exemplo n.º 14
0
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     if (!IsInitialized)
     {
         InflatedView = inflater.Inflate(Resource.Layout.lyt_single_post, null);
         Cheeseknife.Bind(this, InflatedView);
     }
     return(InflatedView);
 }
Exemplo n.º 15
0
        protected override void OnCreate(Bundle?savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(R.Layout.activity_main);

            Cheeseknife.Bind(this);

            SetListener();
        }
Exemplo n.º 16
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.activity_main);
            Cheeseknife.Bind(this);

            _handler          = new Handler();
            _primaryPreselect = DialogUtils.ResolveColor(this, Resource.Attribute.colorPrimary);
            _accentPreselect  = DialogUtils.ResolveColor(this, Resource.Attribute.colorAccent);
        }
Exemplo n.º 17
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.dashboard_fragment_view, container, false);

            Cheeseknife.Bind(this, view);
            SetActions();

            return(view);
        }
Exemplo n.º 18
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.user_detailed_profile_view, container, false);

            Cheeseknife.Bind(this, view);

            SetUserData();
            return(view);
        }
Exemplo n.º 19
0
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     if (!IsInitialized)
     {
         InflatedView = inflater.Inflate(Resource.Layout.lyt_comments, null);
         Cheeseknife.Bind(this, InflatedView);
     }
     ToggleTabBar(true);
     return(InflatedView);
 }
Exemplo n.º 20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Main);

            //Bind view widgets via cheese knife
            Cheeseknife.Bind(this);

            Run();
        }
Exemplo n.º 21
0
 protected void OnCreate(Bundle savedInstanceState, int resourceId)
 {
     base.OnCreate(savedInstanceState);
     ResourceId = resourceId;
     SetContentView(resourceId);
     Cheeseknife.Bind(this);
     Bindings.AddRange(Bind(this, Controller));
     Bindings.AddRange(BindXml(this, Controller));
     BindCommands(this, Controller);
     Bindings.AddRange(BindImages(this, Controller));
 }
Exemplo n.º 22
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);
            var view = inflater.Inflate(Resource.Layout.gender_filter_dialog_view, container, false);

            Cheeseknife.Bind(this, view);

            okayButton.Click   += OnOkayClick;
            cancelButton.Click += OnCancelClick;

            return(view);
        }
Exemplo n.º 23
0
        public View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState, int resourceId)
        {
            base.OnCreateView(inflater, container, savedInstanceState);
            var view = inflater.Inflate(resourceId, container, false);

            Cheeseknife.Bind(this, view);
            Bindings.AddRange(Bind(this, Controller));
            Bindings.AddRange(BindXml(this, Controller));
            BindCommands(this, Controller);
            Bindings.AddRange(BindImages(this, Controller));
            return(view);
        }
Exemplo n.º 24
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.employee_collection_fragment_view, container, false);

            Cheeseknife.Bind(this, view);
            employeeListView.ItemClick += listClick;

            PopulateList();

            return(view);
        }
Exemplo n.º 25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.login_view);
            Cheeseknife.Bind(this);

            string token = SettingsData.GetAndroidStringFromPreferences(SettingsData.APP_TOKEN);

            loginPresenter = new LoginPresenter();
            loginPresenter.Initialize(this, token);

            loginButton.Click += OnLoginClick;
        }
Exemplo n.º 26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Cheeseknife.Bind(this);
            this.framgments = new List <MvxViewPagerFragmentInfo>();

            this.framgments.Add(new MvxViewPagerFragmentInfo("Home", typeof(TimelineView), typeof(TimelineViewModel)));
            MvxCachingFragmentStatePagerAdapter adapter = new MvxCachingFragmentStatePagerAdapter(this, this.SupportFragmentManager, framgments);

            this.mainViewPage.Adapter = adapter;

            this.drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, this.toolbar,
                                                          Resource.String.drawerOpen, Resource.String.drawerClose);
            this.drawerLayout.AddDrawerListener(this.drawerToggle);
        }
Exemplo n.º 27
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            string version = GetString(Resource.String.about_version_format, ZhangHai.Android.MaterialProgressBar.BuildConfig.VersionName);

            mVersionText.Text                    = version;
            mGithubText.MovementMethod           = LinkMovementMethod.Instance;
            mXamarinBindingGithub.MovementMethod = LinkMovementMethod.Instance;
        }
Exemplo n.º 28
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            // For styling the InstructionView
            SetTheme(Resource.Style.CustomInstructionView);
            base.OnCreate(savedInstanceState);

            callback = new ComponentActivityLocationCallback(this);

            SetContentView(Resource.Layout.activity_component_navigation);
            Cheeseknife.Bind(this);
            mapView.OnCreate(savedInstanceState);

            // Will call onMapReady
            mapView.GetMapAsync(this);
        }
Exemplo n.º 29
0
#pragma warning restore 0649


        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            _tabHeight         = (int)BitmapUtils.DpToPixel(30, Resources);
            _adapter           = new Adapter.PagerAdapter(SupportFragmentManager);
            _viewPager.Adapter = _adapter;
            InitTabs();

            _tabLayout.TabSelected   += OnTabLayoutOnTabSelected;
            _tabLayout.TabReselected += OnTabLayoutOnTabReselected;
        }
Exemplo n.º 30
0
#pragma warning restore 0649


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

            path = Intent.GetStringExtra(PhotoExtraPath);
            if (!string.IsNullOrWhiteSpace(path))
            {
                Picasso.With(this)
                .Load(path)
                .NoFade()
                .Resize(Resources.DisplayMetrics.WidthPixels, 0)
                .Into(_photo, OnSuccess, OnError);
            }
        }