Ejemplo n.º 1
0
 @Override
 protected void onResume() {
   // TODO Auto-generated method stub
   Constants.shareContent =
       "Hi,我刚使用了如意彩手机客户端买彩票,很方便呢!"
           + "你也试试吧,彩票随身投,大奖时时有!中奖了记的要请客啊!下载地址:http://wap.ruyicai.com/w/client/download.jspx";
   Constants.source = "3";
   if (returnType == 3) {
     AccessTokenManager manager = new AccessTokenManager(this);
     if (manager.getAccessToken() == null || manager.getAccessToken().equals("")) {
       is_sharetorenren.setBackgroundResource(R.drawable.off);
     } else {
       is_sharetorenren.setBackgroundResource(R.drawable.on);
     }
   }
   super.onResume();
   MobclickAgent.onResume(this); // BY贺思明 2012-7-24
 }
Ejemplo n.º 2
0
 /** *分享绑定设置 */
 private void showsharesettingView() {
   returnType = 3;
   setContentView(R.layout.weibo_bind);
   is_sharetorenren = (Button) findViewById(R.id.isSharetoRenren);
   is_sharetosinaweibo = (Button) findViewById(R.id.isSharetoSina);
   is_sharetorenren.setBackgroundResource(R.drawable.off);
   token = shellRW.getStringValue("token");
   expires_in = shellRW.getStringValue("expires_in");
   if (token.equals("")) {
     is_sharetosinaweibo.setBackgroundResource(R.drawable.off);
   } else {
     is_sharetosinaweibo.setBackgroundResource(R.drawable.on);
   }
   is_sharetosinaweibo.setOnClickListener(moreActivityListener);
   is_sharetorenren.setOnClickListener(moreActivityListener);
   AccessTokenManager manager = new AccessTokenManager(this);
   if (manager.getAccessToken() == null || manager.getAccessToken().equals("")) {
     is_sharetorenren.setBackgroundResource(R.drawable.off);
   } else {
     is_sharetorenren.setBackgroundResource(R.drawable.on);
   }
 }
Ejemplo n.º 3
0
        @Override
        public void onClick(View v) {
          // TODO Auto-generated method stub
          switch (v.getId()) {
            case R.id.tableRow_sharetosina:
              oauthOrShare();
              break;
            case R.id.tableRow_sharetotecent:
              break;
            case R.id.tableRow_sharetorenren:
              StatusDemo st = new StatusDemo();
              st.publishStatusOneClick(MoreActivity.this, renren);
              break;
            case R.id.tableRow_sharetomsg:
              shareToMsg();
              break;
            case R.id.tableRow_kaijiangdingyue:
              orderPrizeDialog.orderPrizeDialog().show();
              break;
            case R.id.tableRow_weibobangding:
              showsharesettingView();
              break;
            case R.id.auto_login_set_checkbox:
              boolean is_auto_login = shellRW.getBooleanValue("auto_login");
              if (isLogined.equals("") || isLogined.equals("null")) {
                Toast.makeText(MoreActivity.this, "请先登录!", Toast.LENGTH_SHORT).show();
              } else {
                if (is_auto_login) {
                  cancleAutoLogin();
                } else {
                  Toast.makeText(MoreActivity.this, "自动登录只能在登录时设置!", Toast.LENGTH_SHORT).show();
                }
              }

              break;
            case R.id.isSharetoSina:
              isSinaTiaoZhuan = false;
              token = shellRW.getStringValue("token");
              if (token.equals("")) {
                oauth();
                ;
              } else {
                shellRW.putStringValue("token", "");
                is_sharetosinaweibo.setBackgroundResource(R.drawable.off);
              }
              break;
            case R.id.isSharetoRenren:
              AccessTokenManager manager = new AccessTokenManager(MoreActivity.this);
              renren = new Renren(MoreActivity.this);
              if (manager.getAccessToken() == null || manager.getAccessToken().equals("")) {
                StatusDemo st1 = new StatusDemo();
                st1.publishStatusOneClick(MoreActivity.this, renren);
              } else {
                renren.logout(MoreActivity.this);
                is_sharetorenren.setBackgroundResource(R.drawable.off);
              }
              break;
            case R.id.caizhong_setting: // 彩种设置
              Intent intent = new Intent(MoreActivity.this, CaizhongSettingActivity.class);
              startActivity(intent);
              break;
          }
        }