Ejemplo n.º 1
0
        protected override void OnRestart()
        {
            base.OnRestart();
            username      = FindViewById <TextView>(Resource.Id.username);
            username.Text = AccountsController.mainAccP.loginP;

            list = FindViewById <ListView>(Resource.Id.settingslist);
            var adapter = new ListItemAdapter(fillList());

            list.Adapter = adapter;
        }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.profile);

            pbar = FindViewById <ProgressBar>(Resource.Id.progressBar3);

            username      = FindViewById <TextView>(Resource.Id.username);
            username.Text = AccountsController.mainAccP.loginP;

            list = FindViewById <ListView>(Resource.Id.settingslist);
            var adapter = new ListItemAdapter(fillList());

            list.Adapter = adapter;

            list.ItemClick += (sender, e) =>
            {
                item_click(sender, e);
            };

            tb = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.tooolbarCommon);

            drawer = FindViewById <DrawerLayout>(Resource.Id.drawerLayout1);

            ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, Resource.String.openDrawer, Resource.String.closeDrawer);

            toggle.SyncState();

            navigation = FindViewById <NavigationView>(Resource.Id.navigationMain);
            navigation.SetNavigationItemSelectedListener(this);
            var      header = navigation.GetHeaderView(0);
            TextView name   = header.FindViewById <TextView>(Resource.Id.nav_bar_name);

            name.Text = AccountsController.mainAccP.loginP;
            TextView ml = header.FindViewById <TextView>(Resource.Id.nav_bar_addr);

            ml.Text = AccountsController.mainAccP.emailP;

            SetSupportActionBar(tb);
            Android.Support.V7.App.ActionBar abar = SupportActionBar;

            abar.SetHomeButtonEnabled(true);
            abar.SetDisplayShowTitleEnabled(true);
            abar.SetHomeAsUpIndicator(Resource.Drawable.menu);
            abar.SetDisplayHomeAsUpEnabled(true);
        }