资源简介
一键分享到新浪微博,腾讯微博,人人网,QQ空间,微信好友圈
代码片段和文件信息
package com.openshare.demo;
import java.util.ArrayList;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.open.share.OpenAppConstant;
import com.open.share.OpenManager;
import com.open.share.interfaces.IOpenResponse;
import com.open.share.net.AbstractRunnable;
import com.open.share.net.NetPool;
import com.open.share.qqzone.QQZoneShareImpl;
import com.open.share.qqzone.QQZoneTokenBean;
import com.open.share.renren.RenrenTokenBean;
import com.open.share.renren.RenrenUserInfo;
import com.open.share.sina.SinaShareImpl;
import com.open.share.sina.SinaTokenBean;
import com.open.share.sina.SinaUserInfo;
import com.open.share.tencent.TenTokenBean;
import com.open.share.tencent.TenUserInfo;
import com.open.share.utils.SharedPreferenceUtil;
import com.openshare.demo.util.OpenDemoApp;
import com.openshare.demo.util.SpUtil;
import com.tencent.tauth.bean.UserInfo;
public class OpenUI extends Activity {
private ArrayList openList=new ArrayList();
private LinearLayout openParentLayout;
private final int TAG_EXTRA_VALUE=100;
private QQZoneShareImpl qqzoneImpl=new QQZoneShareImpl();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.open_ui);
initData();
initView();
}
private void initData()
{
openList.add(OpenManager.SINA_WEIBO);
openList.add(OpenManager.TENCENT_WEIBO);
openList.add(OpenManager.RENREN);
openList.add(OpenManager.QQZONE);
IntentFilter filter = new IntentFilter();
filter.addAction(OpenManager.AUTH_RESULT_ACTION);
registerReceiver(authResultReceiver filter);
}
private void initView()
{
openParentLayout=(LinearLayout)findViewById(R.id.openPlatforms_parent);
int size=openList.size();
openParentLayout.setVisibility(size>0?View.VISIBLE:View.GONE);
LinearLayout item=null;
for(int i=0;i {
item=(LinearLayout)this.getLayoutInflater().inflate(R.layout.open_ui_item null);
TextView name=(TextView)item.findViewById(R.id.open_platform_name);
TextView username=(TextView)item.findViewById(R.id.open_account_username);
Button bindBtn=(Button)item.findViewById(R.id.open_bindBtn);
ImageView logoView = (ImageView) item.findViewById(R.id.open_platform_logo);
item.setTag(openList.get(i)+TAG_EXTRA_VALUE);
bindBtn.setTag(openList.get(i));
boolean isValid=OpenManager.getInstatnce().isVaild(openList.get(i) this);
name.setText(OpenManager.getInstatnce().getName(openList.get(i)));
String sUsername=SpUtil.getString(OpenManager.getInstatnce
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-05-08 01:16 openshare-master\
文件 231 2013-05-08 01:16 openshare-master\.gitignore
文件 104 2013-05-08 01:16 openshare-master\README.md
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\.settings\
文件 208 2013-05-08 01:16 openshare-master\git_openshare_demo\.settings\org.eclipse.jdt.core.prefs
文件 2937 2013-05-08 01:16 openshare-master\git_openshare_demo\AndroidManifest.xm
文件 781 2013-05-08 01:16 openshare-master\git_openshare_demo\proguard-project.txt
文件 616 2013-05-08 01:16 openshare-master\git_openshare_demo\project.properties
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\res\
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\
文件 248 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\bg.9.png
文件 1078 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\button_bind_f.9.png
文件 1073 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\button_bind_nf.9.png
文件 485 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\button_unbind_f.9.png
文件 531 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\button_unbind_nf.9.png
文件 9262 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\ic_launcher.png
文件 460 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\img_all_fr
文件 4767 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\img_share_management_qqzoneicon.png
文件 4328 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\img_share_management_renrenicon.png
文件 5216 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\img_share_management_sinaicon.png
文件 4892 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\img_share_management_tencenticon.png
文件 4351 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\img_share_management_weixinicon.png
文件 2801 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-hdpi\list_item_ganline.png
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-mdpi\
文件 4823 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-mdpi\ic_launcher.png
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-xhdpi\
文件 14189 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-xhdpi\ic_launcher.png
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-xxhdpi\
文件 26861 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable-xxhdpi\ic_launcher.png
目录 0 2013-05-08 01:16 openshare-master\git_openshare_demo\res\drawable\
............此处省略162个文件信息
- 上一篇:Hough霍夫直线检测代码
- 下一篇:局域网广播程序的实现.rar
评论
共有 条评论