@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub super.onActivityResult(requestCode, resultCode, data); if (resultCode == Activity.RESULT_OK) { if (requestCode == 1) { // 重新加载我关注的企业页面 int pageSize = getIntent().getIntExtra("pageSize", 10); // 每页显示的条数 int page = getIntent().getIntExtra("page", 0); // 每页显示的条数 Integer uid = PreferencesUtils.getInt(this, Constants.ACCOUNT_ID); // 关注者id AttentListAction attentAction = new AttentListAction(this, (MyAttentWebView) this.findViewById(R.id.webView)); attentAction.execute(1, uid, page, pageSize, true); } else if (requestCode == 2) { // 重新加载我关注的专家页面 int pageSize = getIntent().getIntExtra("pageSize", 10); // 每页显示的条数 int page = getIntent().getIntExtra("page", 0); // 每页显示的条数 Integer uid = PreferencesUtils.getInt(this, Constants.ACCOUNT_ID); // 关注者id AttentListAction attentAction = new AttentListAction(this, (MyAttentWebView) this.findViewById(R.id.webView)); attentAction.execute(2, uid, page, pageSize, true); } } }
@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_my_attent); int type = getIntent().getIntExtra("attent-type", 1); // 1我关注的专家 2我关注的企业 if (type == 2) { this.setCommonTitleBar("我关注的专家", R.id.webView, null, false); } else if (type == 1) { this.setCommonTitleBar("我关注的企业", R.id.webView, null, false); } }