@ -83,6 +84,7 @@ public class PublishVideoTopicActivity extends Activity implements OnClickListen
public static final String IMAGE_CACHE = CACHE_DIR + "/cache/image/";
LocalMedia media;
ProgressDialog uploadDialog;
private PublishItemSerializable intentData;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -98,6 +100,7 @@ public class PublishVideoTopicActivity extends Activity implements OnClickListen
}
private void initView() {
intentData = (PublishItemSerializable) getIntent().getSerializableExtra("intent_data");
mPublishtopicBack = (ImageView) findViewById(R.id.publishtopic_back);
mPublishtopicPublish = (TextView) findViewById(R.id.publishtopic_publish);
mPublishtopicCon = (EditText) findViewById(R.id.publishtopic_con);
@ -111,6 +114,13 @@ public class PublishVideoTopicActivity extends Activity implements OnClickListen
mItemVideo = (ImageView) findViewById(R.id.item_video);
mItemVideoDelete = (View) findViewById(R.id.item_video_delete);
if (intentData.getFrom().equals(PublishItemsActivity.FROM_TOPIC_DETAIL)) {
chatRecommendBean = new ChatRecommendBean();
chatRecommendBean.topicId = Long.parseLong(intentData.getTopicId());
mPublishtopicChooseTopic.setText(intentData.getName());
mPublishTopicDe.setVisibility(View.VISIBLE);
}
mPublishtopicCon.addTextChangedListener(new TextWatcher() {
@Override
@ -322,12 +332,15 @@ public class PublishVideoTopicActivity extends Activity implements OnClickListen
@Override
public void onResponse(String response) {
String code = JsonUtils.getKeyResult(response, "code");
String desc = JsonUtils.getKeyResult(response, "desc");
Log.d(TAG, "onResponse: " + response);
if ("1000".equals(code)) {
if ("1000".equals(code)) { // 视频发布成功
ToastUtil.showToast(getApplicationContext(), "发布成功", Toast.LENGTH_SHORT);
startActivity(new Intent(getApplicationContext(), ChatActivity.class));
if (intentData.getFrom().equals(PublishItemsActivity.FROM_CHAT_HOME)) {
startActivity(new Intent(getApplicationContext(), ChatActivity.class));
} else {
startActivity(new Intent(getApplicationContext(), TopicDetailActivity.class));
}
} else {
String desc = JsonUtils.getKeyResult(response, "desc");
ToastUtil.showToast(getApplicationContext(), desc, Toast.LENGTH_SHORT);
}
uploadDialog.dismiss();
|
||
| 40 | 40 |
|
| 41 | 41 |
|
| 42 | 42 |
|
| 43 |
|
|
| 44 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 | 45 |
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 | 46 |
|
| 72 | 47 |
|
| 73 |
|
|
| 74 |
|
|
| 48 |
|
|
| 75 | 49 |
|
| 76 | 50 |
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 51 |
|
|
| 81 | 52 |
|
| 82 |
|
|
| 83 |
|
|
| 53 |
|
|
| 84 | 54 |
|
| 85 |
|
|
| 55 |
|
|
| 56 |
|
|
| 86 | 57 |
|
| 87 | 58 |
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 91 | 80 |
|
| 92 | 81 |
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
|
| 116 |
|
|
| 117 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 118 | 102 |
|
| 119 | 103 |
|
| 120 |
|
|
| 121 |
|
|
| 122 |
|
|
| 123 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
|
| 116 |
|
|
| 117 |
|
|
| 118 |
|
|
| 119 |
|
|
| 120 |
|
|
| 124 | 121 |
|
| 125 | 122 |
|
| 123 |
|
|
| 126 | 124 |
|
| 127 | 125 |
|
| 128 | 126 |
|