public void onClick(View v) { switch (v.getId()) { case R.id.btnEditOk: { //点击编辑完成 ,它就调到 ShareActvity页面去了 if(NullCheckUtil.isNotNull(edit_text.getText().toString())){ String cotent=edit_text.getText().toString(); try { share2weibo(cotent, imagePath); this.finish(); } catch (WeiboException e) { // TODO Auto-generated catch block e.printStackTrace(); } }else{ Toast.makeText(this, "说点什么把...", Toast.LENGTH_SHORT); } break; }case R.id.btnSelectImage:{ Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult( intent, 1); break; } } }