|
@ -50,6 +50,7 @@ import com.electric.chargingpile.data.AuthSignBean;
|
50
|
50
|
import com.electric.chargingpile.data.HomePageBean;
|
51
|
51
|
import com.electric.chargingpile.data.TalkRecommendBean;
|
52
|
52
|
import com.electric.chargingpile.data.UploadPic;
|
|
53
|
import com.electric.chargingpile.manager.ProfileManager;
|
53
|
54
|
import com.electric.chargingpile.util.BarColorUtil;
|
54
|
55
|
import com.electric.chargingpile.util.Bimp;
|
55
|
56
|
import com.electric.chargingpile.util.ImageItem;
|
|
@ -217,26 +218,26 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
|
217
|
218
|
public void afterTextChanged(Editable editable) {
|
218
|
219
|
String s = editable.toString();
|
219
|
220
|
Log.e(TAG, "afterTextChanged: s=" + s);
|
220
|
|
if (containsEmoji(s)) {
|
221
|
|
tv_right.setEnabled(false);
|
222
|
|
tv_right.setTextColor(getResources().getColor(R.color.ui_68));
|
223
|
|
ToastUtil.showToast(getApplicationContext(), "不支持输入表情", Toast.LENGTH_SHORT);
|
224
|
|
return;
|
225
|
|
}
|
226
|
|
if (s.length() > 500) {
|
227
|
|
tv_right.setEnabled(false);
|
228
|
|
tv_right.setBackgroundColor(Color.parseColor("color_9ed3ae"));
|
229
|
|
// tv_right.setTextColor(getResources().getColor(R.color.ui_68));
|
230
|
|
ToastUtil.showToast(getApplicationContext(), "输入字数不能超过500", Toast.LENGTH_SHORT);
|
231
|
|
return;
|
232
|
|
}
|
|
221
|
// if (containsEmoji(s)) {
|
|
222
|
// tv_right.setEnabled(false);
|
|
223
|
// tv_right.setTextColor(getResources().getColor(R.color.ui_68));
|
|
224
|
// ToastUtil.showToast(getApplicationContext(), "不支持输入表情", Toast.LENGTH_SHORT);
|
|
225
|
// return;
|
|
226
|
// }
|
|
227
|
// if (s.length() > 500) {
|
|
228
|
// tv_right.setEnabled(false);
|
|
229
|
// tv_right.setBackgroundColor(Color.parseColor("color_9ed3ae"));
|
|
230
|
//// tv_right.setTextColor(getResources().getColor(R.color.ui_68));
|
|
231
|
// ToastUtil.showToast(getApplicationContext(), "输入字数不能超过500", Toast.LENGTH_SHORT);
|
|
232
|
// return;
|
|
233
|
// }
|
233
|
234
|
if (!s.trim().isEmpty() && s.length() > 0) {
|
234
|
235
|
tv_right.setEnabled(true);
|
235
|
236
|
// tv_right.setTextColor(getResources().getColor(R.color.lvse));
|
236
|
237
|
tv_right.setBackgroundColor(Color.parseColor("#02b637"));
|
237
|
238
|
} else {
|
238
|
239
|
tv_right.setEnabled(false);
|
239
|
|
tv_right.setBackgroundColor(Color.parseColor("color_9ed3ae"));
|
|
240
|
tv_right.setBackgroundColor(Color.parseColor("#9ed3ae"));
|
240
|
241
|
}
|
241
|
242
|
if(TextUtils.isEmpty(s))
|
242
|
243
|
publishtopic_word_num.setText("0");
|
|
@ -838,10 +839,13 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
|
838
|
839
|
map.put("content", et_context.getText().toString());
|
839
|
840
|
map.put("urls", urls);
|
840
|
841
|
map.put("topicId", topicId);
|
|
842
|
map.put("coverImgUrl", "");
|
841
|
843
|
if (MainApplication.isLogin()) {
|
842
|
844
|
map.put("userId", MainApplication.userId);
|
843
|
|
map.put("appToken", MainApplication.messageToken);
|
|
845
|
String token = ProfileManager.getInstance().getKeyMessageToken(getApplicationContext());
|
|
846
|
map.put("appToken", token+"");
|
844
|
847
|
}
|
|
848
|
Log.e(TAG, map.toString());
|
845
|
849
|
OkHttpUtils.post().params(map).url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
|
846
|
850
|
@Override
|
847
|
851
|
public void onError(Call call, Exception e) {
|