Exemple #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            handler       = new Handler();
            mainPresenter = new MainPresenter(this);

            toolbar       = FindViewById <Toolbar>(Resource.Id.toolbar);
            toolbar.Title = Resources.GetString(Resource.String.daily);
            SetSupportActionBar(toolbar);

            fm = SupportFragmentManager;

            bottomBar = BottomBar.AttachShy((CoordinatorLayout)FindViewById(Resource.Id.coordinatorLayout), FindViewById(Resource.Id.swipeRefreshLayout), bundle);

            bottomBar.UseFixedMode();

            bottomBar.SetItems(Resource.Menu.bottombar_menu);
            bottomBar.SetOnMenuTabClickListener(this);

            MobclickAgent.SetDebugMode(true);
            MobclickAgent.OpenActivityDurationTrack(false);
            MobclickAgent.SetScenarioType(this, MobclickAgent.EScenarioType.EUmNormal);

            updManager = IFlytekUpdate.GetInstance(this);
            updManager.SetDebugMode(true);
            updManager.SetParameter(UpdateConstants.ExtraWifionly, "true");
            updManager.SetParameter(UpdateConstants.ExtraNotiIcon, "true");
            updManager.SetParameter(UpdateConstants.ExtraStyle, UpdateConstants.UpdateUiDialog);
            updManager.AutoUpdate(this, this);
        }
Exemple #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            handler = new Handler();
            fm      = SupportFragmentManager;

            toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            toolbar.SetOnMenuItemClickListener(this);

            coordinatorLayout = FindViewById <CoordinatorLayout>(Resource.Id.coordinatorLayout);

            drawerLayout   = FindViewById <DrawerLayout>(Resource.Id.drawerLayout);
            navigationView = FindViewById <NavigationView>(Resource.Id.navigationview);
            var headerLayout = navigationView.InflateHeaderView(Resource.Layout.header_layout);

            navigationView.InflateMenu(Resource.Menu.main);
            navigationView.SetNavigationItemSelectedListener(this);
            Avatar = headerLayout.FindViewById <ImageView>(Resource.Id.headerAvatar);
            Avatar.SetOnClickListener(this);
            Author           = headerLayout.FindViewById <TextView>(Resource.Id.headerAuthor);
            Seniority        = headerLayout.FindViewById <TextView>(Resource.Id.headerSeniority);
            txtLogout        = headerLayout.FindViewById <TextView>(Resource.Id.headerLogout);
            txtLogout.Click += delegate
            {
                LoginUtils.Instance(this).DeleteUser();
                UpdateUserView();
            };

            drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.drawer_open, Resource.String.drawer_close);
            drawerLayout.AddDrawerListener(this);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);

            StatusBarCompat.SetDrawerToolbarTabLayout(this, coordinatorLayout);

            UpdateUserView();

            navigationView.Post(() =>
            {
                SwitchNavigationBar(Resource.Id.home);
            });

            updManager = IFlytekUpdate.GetInstance(this.ApplicationContext);
            updManager.SetDebugMode(true);
            updManager.SetParameter(UpdateConstants.ExtraWifionly, "true");
            updManager.SetParameter(UpdateConstants.ExtraNotiIcon, "true");
            updManager.SetParameter(UpdateConstants.ExtraStyle, UpdateConstants.UpdateUiDialog);
            updManager.AutoUpdate(this, this);

            shareAction = new ShareAction(this).SetDisplayList(SHARE_MEDIA.Weixin, SHARE_MEDIA.WeixinCircle, SHARE_MEDIA.WeixinFavorite, SHARE_MEDIA.Sina).SetShareboardclickCallback(this);
        }
Exemple #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            StatusBarUtil.SetColorStatusBars(this);
            LinearLayout ll_csdn        = FindViewById <LinearLayout>(Resource.Id.ll_csdn);
            LinearLayout ll_qq          = FindViewById <LinearLayout>(Resource.Id.ll_qq);
            LinearLayout ll_joinQQGroup = FindViewById <LinearLayout>(Resource.Id.ll_joinQQGroup);
            LinearLayout ll_version     = FindViewById <LinearLayout>(Resource.Id.ll_version);

            updManager = IFlytekUpdate.GetInstance(this.ApplicationContext);
            updManager.SetDebugMode(true);
            updManager.SetParameter(UpdateConstants.ExtraWifionly, "true");
            updManager.SetParameter(UpdateConstants.ExtraNotiIcon, "true");
            ll_version.Click += (s, e) =>
            {
                updManager.SetParameter(UpdateConstants.ExtraStyle, UpdateConstants.UpdateUiDialog);
                updManager.AutoUpdate(this, this);
            };
            ll_csdn.Click += (s, e) =>
            {
                //  Intent intent = new Intent();
                //intent.SetAction("android.intent.action.VIEW");
                Android.Net.Uri uri    = Android.Net.Uri.Parse("http://blog.csdn.net/kebi007");
                Intent          intent = new Intent();
                intent.SetAction("android.intent.action.VIEW");
                intent.SetData(uri);
                StartActivity(intent);
            };
            ll_joinQQGroup.Click += (s, e) =>
            {
                joinQQGroup("Q90lFEYkStricLdyCyJQMzJJq_5bo7gb");
            };
            ll_qq.Click += (s, e) =>
            {
                string qqUrl = "mqqwpa://im/chat?chat_type=wpa&uin=976720945&version=1";
                StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse(qqUrl)));
            };
            // Create your application here
        }
Exemple #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            mContext = ApplicationContext;
            mHandler = new Handler();

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            updManager = IFlytekUpdate.GetInstance(mContext);
            updManager.SetDebugMode(true);
            updManager.SetParameter(UpdateConstants.ExtraWifionly, "true");
            updManager.SetParameter(UpdateConstants.ExtraStyle, UpdateConstants.UpdateUiDialog);
            updManager.ForceUpdate(this, this);


            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button> (Resource.Id.myButton);

            mToast = Toast.MakeText(this, "", ToastLength.Short);
        }
Exemple #5
0
        protected override async void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            addActivity(this);

            StatusBarUtil.SetColorStatusBars(this);
            handler = new Handler();
            _fm     = SupportFragmentManager;
            //SetSupportActionBar(_toolbar);
            tv_blog       = FindViewById <TextView>(Resource.Id.tv_blog);
            tv_news       = FindViewById <TextView>(Resource.Id.tv_news);
            tv_status     = FindViewById <TextView>(Resource.Id.tv_status);
            tv_question   = FindViewById <TextView>(Resource.Id.tv_question);
            tv_userCenter = FindViewById <TextView>(Resource.Id.tv_userCenter);
            BindViewsClick();
            tv_blog.PerformClick();
            updManager = IFlytekUpdate.GetInstance(this.ApplicationContext);
            updManager.SetDebugMode(true);
            updManager.SetParameter(UpdateConstants.ExtraWifionly, "true");
            updManager.SetParameter(UpdateConstants.ExtraNotiIcon, "true");
            updManager.SetParameter(UpdateConstants.ExtraStyle, UpdateConstants.UpdateUiDialog);
            updManager.AutoUpdate(this, this);
        }