private void bindControls()
 {
     BlogApplication.InitImageLoader(this);
     imgLoader           = ImageLoader.Instance;
     displayImageOptions = new DisplayImageOptions.Builder()
                           .ShowImageForEmptyUri(Resource.Drawable.girl)
                           .ShowImageOnFail(Resource.Drawable.girl)
                           .ShowImageOnLoading(Resource.Drawable.girl)
                           .CacheInMemory(true)
                           .CacheOnDisk(true)
                           .ResetViewBeforeLoading()
                           .Build();
     btnBack        = FindViewById <Button>(Resource.Id.title_bar_back);
     btnBack.Click += delegate { Finish(); };
     textName       = FindViewById <TextView>(Resource.Id.text_nickname);
     textAge        = FindViewById <TextView>(Resource.Id.text_age);
     myBlog         = FindViewById <LinearLayout>(Resource.Id.my_blog);
     myBlog.Click  += delegate
     {
         if (CommonHelper.userInfo == null)
         {
             Msg.AppMsg.MakeText(this, "请先登录", Msg.AppMsg.STYLE_INFO).Show();
             return;
         }
         StartActivity(new Intent(this, typeof(MyPostsActivity)));
     };
     myCollect        = FindViewById <LinearLayout>(Resource.Id.my_collect);
     myCollect.Click += delegate
     {
         if (CommonHelper.userInfo == null)
         {
             Msg.AppMsg.MakeText(this, "请先登录", Msg.AppMsg.STYLE_INFO).Show();
             return;
         }
         StartActivity(new Intent(this, typeof(BookMarksActivity)));
     };
     setting        = FindViewById <LinearLayout>(Resource.Id.setting);
     setting.Click += delegate
     {
         AlertDialog.Builder builder = new AlertDialog.Builder(this);
         builder.SetMessage("APP作者:胡帅。一个不出名的帅小伙,只想安安静静写个代码。");
         builder.SetPositiveButton("我知道啦", (object sender, DialogClickEventArgs e) =>
         {
             AlertDialog dialog = sender as AlertDialog;
             dialog.Dismiss();
         });
         builder.SetTitle("提示");
         builder.Show();
     };
     btnLoginOut        = FindViewById <Button>(Resource.Id.btn_loginout);
     btnLoginOut.Click += btnLoginOut_Click;
     rImgView           = FindViewById <RoundImageView>(Resource.Id.img_headPic);
 }
예제 #2
0
 protected void InitalComponents()
 {
     BlogApplication.InitImageLoader(this.Context);
     imgLoader           = ImageLoader.Instance;
     displayImageOptions = new DisplayImageOptions.Builder()
                           .ShowImageForEmptyUri(Resource.Drawable.girl)
                           .ShowImageOnFail(Resource.Drawable.girl)
                           .ShowImageOnLoading(Resource.Drawable.girl)
                           .CacheInMemory(true)
                           .CacheOnDisk(true)
                           .ResetViewBeforeLoading()
                           .Build();
 }
예제 #3
0
 protected void InitalComponents()
 {
     BlogApplication.InitImageLoader(this);
     imgLoader           = ImageLoader.Instance;
     displayImageOptions = new DisplayImageOptions.Builder()
                           .ShowImageForEmptyUri(Resource.Drawable.girl)
                           .ShowImageOnFail(Resource.Drawable.girl)
                           .ShowImageOnLoading(Resource.Drawable.girl)
                           .CacheInMemory(true)
                           .CacheOnDisk(true)
                           .ResetViewBeforeLoading()
                           .Build();
     btnBack        = FindViewById <Button>(Resource.Id.title_bar_back);
     btnBack.Click += delegate { Finish(); };
     textPageTitle  = FindViewById <TextView>(Resource.Id.head_title);
     ptrl           = FindViewById <PullToRefreshLayout>(Resource.Id.refresh_view);
     pListView      = FindViewById <PullableListView>(Resource.Id.pListView);
 }