修改拍照模式
This commit is contained in:
parent
48ed8dd67a
commit
4f4c8e551d
@ -21,6 +21,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
@ -164,16 +165,28 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
tvMapView.setOnClickListener(this);
|
||||
ivPicRoadImage = findViewById(R.id.iv_pic);
|
||||
ivPicVideoImage = findViewById(R.id.iv_pic_video);
|
||||
if (type == 3) {
|
||||
ivPicVideoImage.setVisibility(View.VISIBLE);
|
||||
ivPicRoadImage.setVisibility(View.GONE);
|
||||
} else if (type == 4) {
|
||||
ivPicRoadImage.setVisibility(View.VISIBLE);
|
||||
ivPicVideoImage.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
Button btnSwitch = findViewById(R.id.btn_switch);
|
||||
btnSwitch.setOnClickListener(this);
|
||||
RadioGroup radioGroupPicture = findViewById(R.id.radio_group_picture);
|
||||
RadioButton radioBtnHand = findViewById(R.id.radio_btn_hand);
|
||||
RadioButton radioBtnAuto = findViewById(R.id.radio_btn_auto);
|
||||
RadioButton radioBtnAutoSec = findViewById(R.id.radio_btn_auto_sec);
|
||||
if (type == 3) {//poiVideo 1秒
|
||||
ivPicVideoImage.setVisibility(View.VISIBLE);
|
||||
ivPicRoadImage.setVisibility(View.GONE);
|
||||
radioPicture = 2;
|
||||
radioBtnAuto.setTextColor(Color.parseColor("#FFEB3B"));
|
||||
radioBtnHand.setTextColor(Color.WHITE);
|
||||
radioBtnAutoSec.setTextColor(Color.WHITE);
|
||||
} else if (type == 4) {//道路2秒
|
||||
ivPicRoadImage.setVisibility(View.VISIBLE);
|
||||
ivPicVideoImage.setVisibility(View.GONE);
|
||||
radioPicture = 3;
|
||||
radioBtnAutoSec.setTextColor(Color.parseColor("#FFEB3B"));
|
||||
radioBtnAuto.setTextColor(Color.WHITE);
|
||||
radioBtnHand.setTextColor(Color.WHITE);
|
||||
}
|
||||
radioGroupPicture.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
@ -182,14 +195,29 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
radioPicture = 1;
|
||||
isOration = true;
|
||||
capturePicture.setText("拍摄");
|
||||
capturePicture.setChecked(false);
|
||||
radioBtnHand.setTextColor(Color.parseColor("#FFEB3B"));
|
||||
radioBtnAuto.setTextColor(Color.WHITE);
|
||||
radioBtnAutoSec.setTextColor(Color.WHITE);
|
||||
stopTimer();
|
||||
break;
|
||||
case R.id.radio_btn_auto://自动1秒:
|
||||
radioPicture = 2;
|
||||
capturePicture.setText("开始采集");
|
||||
capturePicture.setChecked(false);
|
||||
radioBtnAuto.setTextColor(Color.parseColor("#FFEB3B"));
|
||||
radioBtnHand.setTextColor(Color.WHITE);
|
||||
radioBtnAutoSec.setTextColor(Color.WHITE);
|
||||
stopTimer();
|
||||
break;
|
||||
case R.id.radio_btn_auto_sec://自动2 秒
|
||||
radioPicture = 3;
|
||||
capturePicture.setText("开始采集");
|
||||
capturePicture.setChecked(false);
|
||||
radioBtnAutoSec.setTextColor(Color.parseColor("#FFEB3B"));
|
||||
radioBtnAuto.setTextColor(Color.WHITE);
|
||||
radioBtnHand.setTextColor(Color.WHITE);
|
||||
stopTimer();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -211,7 +239,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
capturePicture.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (radioPicture==0){
|
||||
if (radioPicture == 0) {
|
||||
capturePicture.setChecked(false);
|
||||
capturePicture.setText("开始采集");
|
||||
Toast.makeText(PicturesActivity.this, "请选择模式", Toast.LENGTH_SHORT).show();
|
||||
@ -264,7 +292,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
capturePicture.setChecked(false);
|
||||
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
@ -293,7 +320,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
message.what = 0x103;
|
||||
handler.sendMessage(message);
|
||||
}*/
|
||||
if (file.exists()) {
|
||||
if (file.exists() && file != null) {
|
||||
WebPNative webPNative = new WebPNative();
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
@ -338,9 +365,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
});
|
||||
} else {
|
||||
isBack = false;
|
||||
Message message = new Message();
|
||||
message.what = 0x103;
|
||||
handler.sendMessage(message);
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
capturePicture.setChecked(false);
|
||||
stopTimer();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -584,6 +613,12 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
tvMapView.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
@ -687,7 +722,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||
// initSpeed();
|
||||
//快到终点的语音播报
|
||||
//initTerminus();
|
||||
initTerminus();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
UMCrash.generateCustomLog(e, "自定义");
|
||||
|
@ -7,6 +7,7 @@ import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Point;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -779,7 +780,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
} else if (getPhoneBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -789,9 +797,23 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1217,25 +1239,29 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
}
|
||||
}
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", poiEntity.getBodyId());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.C_TASK_UP_LOAD_PIC)
|
||||
.fileList(chargingStationList)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(PoiUploadBean.class);
|
||||
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getChargingUploadCallback(getActivity(), showPoiEntity, chargingStationList));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
}
|
||||
});
|
||||
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", poiEntity.getBodyId());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.C_TASK_UP_LOAD_PIC)
|
||||
.fileList(chargingStationList)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(PoiUploadBean.class);
|
||||
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getChargingUploadCallback(getActivity(), showPoiEntity, chargingStationList));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
@ -1288,12 +1314,26 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (chargingStationBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1302,10 +1342,24 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (message.equals("timeout")|| message.equals("Read time out")) {
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
@ -1383,9 +1437,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
@ -1654,7 +1718,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1664,9 +1735,25 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
|
@ -475,7 +475,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -568,7 +573,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -637,7 +647,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -704,7 +719,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -754,7 +774,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -887,7 +912,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1018,7 +1048,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,14 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,9 +190,25 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -225,7 +248,15 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,9 +266,26 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -277,7 +325,15 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,9 +343,25 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -329,7 +401,15 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -339,9 +419,24 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -383,7 +478,15 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,9 +496,25 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -160,7 +160,14 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.toString());
|
||||
}
|
||||
@ -171,9 +178,23 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
|
@ -701,12 +701,26 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (poiSaveBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), poiSaveBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -716,10 +730,23 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -865,7 +892,14 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -875,9 +909,23 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -224,8 +224,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
super.initView();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
CheckBox checkBoxRight = findViewById(R.id.check_pot_right);
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -327,6 +327,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
//数据展示
|
||||
@ -615,7 +616,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
} else if (getPhoneBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -625,9 +634,24 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -871,9 +895,24 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1018,12 +1057,26 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (poiSaveBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1033,9 +1086,23 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
@ -1236,7 +1303,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1246,9 +1320,23 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
|
@ -669,12 +669,28 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getContext(), "" + poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), "" + poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (poiVideoBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getContext(), poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getContext(), poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -684,9 +700,25 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
@ -806,7 +838,15 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -816,9 +856,22 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -660,12 +660,24 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
}
|
||||
} else if (roadSaveBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
}
|
||||
}
|
||||
|
||||
@ -675,9 +687,21 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -796,7 +820,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
}
|
||||
}
|
||||
|
||||
@ -806,9 +836,22 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -154,6 +154,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private File logFile;
|
||||
private StringBuilder treasureBuilder;
|
||||
private Marker gatherMarker;
|
||||
|
||||
/*private boolean isHandler = false;
|
||||
private Handler handler = new Handler(new Handler.Callback() {
|
||||
@Override
|
||||
@ -432,7 +433,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (messageNoticeBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), messageNoticeBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), messageNoticeBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -442,9 +450,23 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
@ -480,12 +502,24 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
if (getPhoneBean.getCode() == 200) {
|
||||
String code = getPhoneBean.getBody().getCode();
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength = telLength;
|
||||
if (code != null) {
|
||||
Constant.CODE = code;
|
||||
}
|
||||
if (telLength != null) {
|
||||
Constant.TelLength = telLength;
|
||||
}
|
||||
|
||||
} else if (getPhoneBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -495,9 +529,23 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
@ -556,11 +604,25 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {//上传用户位置金纬度 寻宝删选接口请求成功
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,9 +632,23 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -835,7 +911,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "任务搜索接口:" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -845,9 +928,24 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
if (getActivity()!=null){
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1027,10 +1125,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
public void run() {
|
||||
List<PoiEntity> allTaskStatus = poiDao.getAllTaskStatus(taskStatus, taskStatus, type, type, limit, limit);
|
||||
//List<PoiEntity> allTaskStatus = poiDao.getAllPoi();
|
||||
List<PoiEntity> allPoiStatus = poiDao.getAllPoiStatus();
|
||||
/*List<PoiEntity> allPoiStatus = poiDao.getAllPoiStatus();
|
||||
if (allPoiStatus != null) {
|
||||
poiDao.deleteAll(allPoiStatus);
|
||||
}
|
||||
}*/
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
@ -129,7 +129,7 @@
|
||||
android:id="@+id/radio_group_picture"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toTopOf="@+id/capture_picture"
|
||||
@ -142,6 +142,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:button="@null"
|
||||
android:text="手动"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
@ -151,6 +152,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:button="@null"
|
||||
android:text="自动1秒"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
@ -160,6 +162,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:button="@null"
|
||||
android:text="自动2秒"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
<color name="colorRed">#F44236</color>
|
||||
<color name="colorText">#87CDF6</color>
|
||||
<color name="colorRead">#ED1931</color>
|
||||
|
||||
<color name="colorGrays">#BDBDBD</color>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user