Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            SetContentView(Resource.Layout.InviteActivity);
            prefs = PreferenceManager.GetDefaultSharedPreferences(this);
            var host = prefs.GetString("host", null);

            _manager    = new ApiManager(host);
            invitesList = new GroupMemberList(new List <Model.User>());
            CustomizeToolbarAndViewPager();
            var group_id = Intent.GetIntExtra("group_id", 0);

            if (group_id > 0)
            {
                ShowUsers(group_id);
                id = group_id;
            }

            base.OnCreate(savedInstanceState);
        }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            _prefs  = PreferenceManager.GetDefaultSharedPreferences(ApplicationContext);
            _editor = _prefs.Edit();
            var host = "http://hseinformerserver.azurewebsites.net";

            _editor.PutString("host", host);
            _editor.Apply();
            _manager = new ApiManager(host);
            SetContentView(Resource.Layout.Main);

            var authorized = CheckAuthorization();

            if (authorized)
            {
                CustomizeToolbarAndNavView();
                ShowFeed();
            }
        }
        public void FillTabs()
        {
            var host = _prefs.GetString("host", null);

            _manager = new ApiManager(host);
            var token = _prefs.GetString("token", null);

            fragments = new List <Android.Support.V4.App.Fragment>
            {
                InvitesFragment.newInstance(),
                    GroupsFragment.newInstance(true),
                CreateGroupFragment.newInstance()
            };
            titles = new List <string>
            {
                "Приглашения",
                "Найти",
                "Добавить"
            };
        }