Esempio n. 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            MainApp.ChangeLanguage(this);
            SetTheme(Resource.Style.MyAppTheme);
            base.OnCreate(savedInstanceState);

            startActivity = MainApp.Instance.SharedPreferences.GetString("startactivity", null);
            string str = MainApp.Instance.SharedPreferences.GetString("language", null);

            SetContentView(Resource.Layout.activity_main);

            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawerlayout_main);
            drawerLayout.AddDrawerListener(this);
            drawerLayout.SetStatusBarBackground(Resource.Color.color_status_bar);

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

            drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawerLayout.AddDrawerListener(drawerToggle);

            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.baseline_menu_black);

            navigationView = FindViewById <NavigationView>(Resource.Id.navview_main);
            navigationView.NavigationItemSelected += NavViewItemSelected;
            navigationView.Alpha = 0.99f;
            InstantiateFragment();
        }
Esempio n. 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            MainApp.ChangeLanguage(this);
            SetTheme(Resource.Style.MyAppTheme);
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_map_routing);
            Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
            Window.SetStatusBarColor(new Color(ContextCompat.GetColor(this, Resource.Color.color_primary_dark)));

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

            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            Title = GetString(Resource.String.title_route_activity);

            buildings    = new List <object>(MainApp.Instance.BuildingsDictionary.Keys);
            buildings[0] = new MainBuildingTag()
            {
                MainBuildingString = buildings[0].ToString()
            };

            var listView = FindViewById <ListView>(Resource.Id.listview_buildingslist);



            adapterBuildings    = new BuildingsAdapter(this, buildings);
            listView.Adapter    = adapterBuildings;
            listView.ItemClick += ListView_ItemClick;
        }
Esempio n. 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            MainApp.ChangeLanguage(this);
            SetTheme(Resource.Style.MyAppTheme);
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_copyright);
            Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
            Window.SetStatusBarColor(new Color(ContextCompat.GetColor(this, Resource.Color.color_primary_dark)));

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

            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            Title = GetString(Resource.String.title_copyright_activity);

            var webView = FindViewById <WebView>(Resource.Id.webview_copyright);

            webView.LoadUrl("file:///android_asset/copyright.html");
        }
Esempio n. 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            MainApp.ChangeLanguage(this);
            SetTheme(Resource.Style.MyAppTheme);
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_authorization);

            networkChecker           = new NetworkChecker(this);
            autoCompleteTextViewAuth = FindViewById <AutoCompleteTextView>(Resource.Id.autocompletetextview_auth);
            autoCompleteTextViewAuth.SetOnEditorActionListener(this);
            autoCompleteTextViewAuth.AddTextChangedListener(this);
            progressBar = FindViewById <ProgressBar>(Resource.Id.progressbar_auth);

            progressBar.Visibility = ViewStates.Visible;
            Task.Run(async() =>
            {
                groupsDictionary = await MainApp.Instance.GroupsDictionary;
                array            = groupsDictionary.Select(x => x.Key).ToArray();

                RunOnUiThread(() =>
                {
                    suggestAdapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleDropDownItem1Line, array);

                    autoCompleteTextViewAuth.Adapter = suggestAdapter;

                    progressBar.Visibility = ViewStates.Invisible;
                });
            });

            var buttonAuth     = FindViewById <Button>(Resource.Id.button_auth);
            var textViewLater  = FindViewById <TextView>(Resource.Id.textview_later_auth);
            var textViewUpdate = FindViewById <TextView>(Resource.Id.textview_groupsupdate_auth);

            buttonAuth.Click     += ButtonAuth_Click;
            textViewLater.Click  += TextViewLater_Click;
            textViewUpdate.Click += TextViewUpdate_Click;

            prefEditor = MainApp.Instance.SharedPreferences.Edit();
        }