去除上报案件时录音导致部分手机无法打开页面
This commit is contained in:
parent
ba82e9e4b4
commit
da4099ca74
@ -1,5 +1,6 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="RIGHT_MARGIN" value="150" />
|
||||
<option name="ENABLE_SECOND_REFORMAT" value="true" />
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="FIELD_NAME_PREFIX" value="m" />
|
||||
@ -8,7 +9,6 @@
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
</JetCodeStyleSettings>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="WRAP_LONG_LINES" value="true" />
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="XML">
|
||||
|
@ -24,7 +24,7 @@
|
||||
<!-- 配置APP版本号 -->
|
||||
<meta-data
|
||||
android:name="BUGLY_APP_VERSION"
|
||||
android:value="1.0.0" />
|
||||
android:value="1.0.9" />
|
||||
<!-- 配置APP渠道号 -->
|
||||
<meta-data
|
||||
android:name="BUGLY_APP_CHANNEL"
|
||||
|
@ -30,7 +30,7 @@ public class PathConfig {
|
||||
public static final String ACTION_MSG_UPCOMING_BY_USER = "com.tenglionsoft.city-governance.by_user_upcoming";//待办点击
|
||||
public static final String ACTION_MSG_UPCOMING_INITIATIVE = "com.tenglionsoft.city-governance.by_user_initiative";//用户主动获取待办信息
|
||||
public static final String ACTION_PUSH_RESTART_SOCKET = "com.tengshisoft.city-governance.push_restart";//重新登录socket
|
||||
public static final String ACTION_MSG_FORCE_LOGIN_OUT = "com.tengshisoft.city-governance.push_force_login_out";//强制下线
|
||||
public static final String ACTION_MSG_FORCE_LOGIN_OUT = "com.tengshisoft.city-governance.push_force_grid_login_out";//强制下线
|
||||
public static final String ACTION_PUSH_STOP_SOCKET = "com.tengshisoft.city-governance.push_stop";//关闭socket
|
||||
public static final String ACTION_ONE_PIXE_FINISH_ACTIVITY = "com.tengshisoft.city-governance.finish_one_pixe_activity";//关闭activity
|
||||
public static final String ACTION_SCREEN_ON = "com.tengshisoft.city-governance.screen_on";//屏幕关闭
|
||||
|
@ -121,20 +121,20 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
EditText mEtContent;
|
||||
@BindView(R2.id.rlv_photos)
|
||||
RecyclerView mRlvPhotos;
|
||||
@BindView(R2.id.tv_voice)
|
||||
TextView mTvVoice;
|
||||
@BindView(R2.id.tv_voice_anim)
|
||||
TextView mTvVoiceAnim;
|
||||
@BindView(R2.id.ll_voice)
|
||||
LinearLayout mLlVoice;
|
||||
@BindView(R2.id.arb_audio)
|
||||
VoiceButton mArbAudio;
|
||||
// @BindView(R2.id.tv_voice)
|
||||
// TextView mTvVoice;
|
||||
// @BindView(R2.id.tv_voice_anim)
|
||||
// TextView mTvVoiceAnim;
|
||||
// @BindView(R2.id.ll_voice)
|
||||
// LinearLayout mLlVoice;
|
||||
// @BindView(R2.id.arb_audio)
|
||||
// VoiceButton mArbAudio;
|
||||
@BindView(R2.id.btn_submit)
|
||||
Button mBtnSubmit;
|
||||
@BindView(R2.id.et_address)
|
||||
EditText mEtAddress;
|
||||
@BindView(R2.id.iv_del_audio)
|
||||
ImageView mIvDelAudio;
|
||||
// @BindView(R2.id.iv_del_audio)
|
||||
// ImageView mIvDelAudio;
|
||||
@BindView(R2.id.iv_play_video)
|
||||
ImageView mIvPlayVideo;
|
||||
@BindView(R2.id.ll_video)
|
||||
@ -145,8 +145,8 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
TextureMapView mTmvMap;
|
||||
@BindView(R2.id.iv_cover)
|
||||
ImageView mIvCover;
|
||||
@BindView(R2.id.iv_voice)
|
||||
ImageView mIvVoice;
|
||||
// @BindView(R2.id.iv_voice)
|
||||
// ImageView mIvVoice;
|
||||
private Unbinder mBind;
|
||||
private List<CaseTypeBean> mTypeList;
|
||||
private OptionsPickerView mTypePicker;
|
||||
@ -243,39 +243,38 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
});
|
||||
mTvAddressSel.setOnClickListener(v -> ARouter.getInstance().build(PathConfig.PATH_MODULE_MAP_SEL_POINT).navigation(mActivity, 16));
|
||||
|
||||
//录音
|
||||
//TODO 录音
|
||||
// mArbAudio.setAudioFinishRecorderListener((seconds, filePath) -> uploadVoice(filePath));
|
||||
mArbAudio.setRecorderListener(new VoiceButton.RecorderListener() {
|
||||
@Override
|
||||
public void onStart() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(long time, @Nullable String filePath) {
|
||||
uploadVoice(filePath);
|
||||
}
|
||||
});
|
||||
mLlVoice.setOnClickListener(v -> {
|
||||
if (!TextUtils.isEmpty(mAudioPath)) {
|
||||
AnimationDrawable animationDrawable =
|
||||
(AnimationDrawable) mTvVoiceAnim.getBackground();
|
||||
animationDrawable.start();
|
||||
MediaManager.playSound(mAudioPath, mp -> {
|
||||
animationDrawable.selectDrawable(0);//显示动画第一帧
|
||||
animationDrawable.stop();
|
||||
MediaManager.destroy();
|
||||
});
|
||||
}
|
||||
});
|
||||
mIvDelAudio.setOnClickListener(v -> {
|
||||
mAudioId = "";
|
||||
mAudioPath = "";
|
||||
mIvDelAudio.setVisibility(View.GONE);
|
||||
mArbAudio.setVisibility(View.VISIBLE);
|
||||
mTvVoiceAnim.setVisibility(View.GONE);
|
||||
mIvVoice.setVisibility(View.VISIBLE);
|
||||
});
|
||||
// mArbAudio.setRecorderListener(new VoiceButton.RecorderListener() {
|
||||
// @Override
|
||||
// public void onStart() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFinish(long time, @Nullable String filePath) {
|
||||
// uploadVoice(filePath);
|
||||
// }
|
||||
// });
|
||||
// mLlVoice.setOnClickListener(v -> {
|
||||
// if (!TextUtils.isEmpty(mAudioPath)) {
|
||||
// AnimationDrawable animationDrawable = (AnimationDrawable) mTvVoiceAnim.getBackground();
|
||||
// animationDrawable.start();
|
||||
// MediaManager.playSound(mAudioPath, mp -> {
|
||||
// animationDrawable.selectDrawable(0);//显示动画第一帧
|
||||
// animationDrawable.stop();
|
||||
// MediaManager.destroy();
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// mIvDelAudio.setOnClickListener(v -> {
|
||||
// mAudioId = "";
|
||||
// mAudioPath = "";
|
||||
// mIvDelAudio.setVisibility(View.GONE);
|
||||
// mArbAudio.setVisibility(View.VISIBLE);
|
||||
// mTvVoiceAnim.setVisibility(View.GONE);
|
||||
// mIvVoice.setVisibility(View.VISIBLE);
|
||||
// });
|
||||
mLlVideo.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(mVideoPath)) {
|
||||
showSelectVideo();
|
||||
@ -330,19 +329,19 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
* 校验权限
|
||||
*/
|
||||
private void checkAuthority() {
|
||||
PermissionUtils.permission(PermissionConstants.STORAGE, PermissionConstants.LOCATION,
|
||||
PermissionConstants.CAMERA, PermissionConstants.MICROPHONE).callback(new PermissionUtils.SimpleCallback() {
|
||||
PermissionUtils.permission(PermissionConstants.STORAGE, PermissionConstants.LOCATION, PermissionConstants.CAMERA,
|
||||
PermissionConstants.MICROPHONE).callback(new PermissionUtils.SimpleCallback() {
|
||||
@Override
|
||||
public void onGranted() {
|
||||
// mArbAudio.setHasRecordPromission(true);
|
||||
mArbAudio.setEnabled(true);
|
||||
// mArbAudio.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDenied() {
|
||||
ToastUtils.show("App需要读取SD的权限,和定位的权限,请前往设置里授权.");
|
||||
// mArbAudio.setHasRecordPromission(false);
|
||||
mArbAudio.setEnabled(false);
|
||||
// mArbAudio.setEnabled(false);
|
||||
finish();
|
||||
}
|
||||
}).request();
|
||||
@ -356,8 +355,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "上报中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance().create(GridApis.class).doSaveCase(body,
|
||||
UserLgUtils.getToken()).compose(RxTransformer.getTransformer()).subscribe(new Observer<SuccessBean>() {
|
||||
RetrofitManager.getInstance().create(GridApis.class).doSaveCase(body, UserLgUtils.getToken()).compose(RxTransformer.getTransformer()).subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
@ -422,8 +420,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
* 显示地区选择
|
||||
*/
|
||||
private void onShowArea() {
|
||||
AreaChooseDialog dialog =
|
||||
new AreaChooseDialog.DialogBuilder(mActivity).setDefault(true).build();
|
||||
AreaChooseDialog dialog = new AreaChooseDialog.DialogBuilder(mActivity).setDefault(true).build();
|
||||
dialog.addOnChoseListener((names, id, code) -> {
|
||||
mSelAreaCode = code;
|
||||
mSelAreaId = id;
|
||||
@ -520,8 +517,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
}
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; " +
|
||||
"charset=utf-8"), obj);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; " + "charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
@ -550,7 +546,9 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
mCurrentBean = bean;
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_BASELIB_TAKE_PHOTO).withString("path", getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getPath()).withString("type", "photo").navigation(mActivity, BaseUrlApi.CAMERA_REQUEST);
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_BASELIB_TAKE_PHOTO).withString("path",
|
||||
getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getPath()).withString("type", "photo").navigation(mActivity,
|
||||
BaseUrlApi.CAMERA_REQUEST);
|
||||
buttomDialogView.dismiss();
|
||||
}
|
||||
|
||||
@ -588,7 +586,9 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_BASELIB_TAKE_PHOTO).withString("path", getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getPath()).withString("type", "video").navigation(mActivity, BaseUrlApi.CAMERA_REQUEST_VIDEO);
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_BASELIB_TAKE_PHOTO).withString("path",
|
||||
getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getPath()).withString("type", "video").navigation(mActivity,
|
||||
BaseUrlApi.CAMERA_REQUEST_VIDEO);
|
||||
buttomDialogView.dismiss();
|
||||
}
|
||||
|
||||
@ -619,8 +619,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
Uri uri = data.getData();
|
||||
String[] proj = {MediaStore.Images.Media.DATA};
|
||||
Cursor cursor = managedQuery(uri, proj, null, null, null);
|
||||
int column_index =
|
||||
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
cursor.moveToFirst();
|
||||
String srcPath = cursor.getString(column_index);
|
||||
uploadImg(srcPath, 2);
|
||||
@ -638,8 +637,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
Uri uri = data.getData();
|
||||
String[] proj = {MediaStore.Images.Media.DATA};
|
||||
Cursor cursor = managedQuery(uri, proj, null, null, null);
|
||||
int column_index =
|
||||
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
cursor.moveToFirst();
|
||||
String srcPath = cursor.getString(column_index);
|
||||
uploadVideo(srcPath);
|
||||
@ -650,8 +648,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
}
|
||||
} else if (resultCode == 13) {
|
||||
if (requestCode == 13) {
|
||||
mSelComponentBean = (CaseComponentListBean.RowsBean) data.getSerializableExtra(
|
||||
"bean");
|
||||
mSelComponentBean = (CaseComponentListBean.RowsBean) data.getSerializableExtra("bean");
|
||||
mTvComponent.setText(mSelComponentBean.getObjName());
|
||||
}
|
||||
} else if (resultCode == 22) {
|
||||
@ -735,44 +732,46 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
progressDialog.show();
|
||||
File file = new File(videoPath);
|
||||
if (file.exists()) {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"),
|
||||
file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("video", file.getName(),
|
||||
requestFile);
|
||||
RetrofitManager.getInstance().create(BaseApiService.class).uploadVideo(body,
|
||||
UserLgUtils.getToken()).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("video", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.uploadVideo(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseUserBean) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("上传成功");
|
||||
mVideoPath = videoPath;
|
||||
mVideoId = baseUserBean.getData();
|
||||
mIvDelVideo.setVisibility(View.VISIBLE);
|
||||
mIvPlayVideo.setBackgroundResource(R.drawable.ic_play_white_icon);
|
||||
Glide.with(mActivity).setDefaultRequestOptions(new RequestOptions().frame(0).centerCrop()).load(mVideoPath).into(mIvCover);
|
||||
}
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseUserBean) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("上传成功");
|
||||
mVideoPath = videoPath;
|
||||
mVideoId = baseUserBean.getData();
|
||||
mIvDelVideo.setVisibility(View.VISIBLE);
|
||||
mIvPlayVideo.setBackgroundResource(R.drawable.ic_play_white_icon);
|
||||
Glide.with(mActivity).setDefaultRequestOptions(new RequestOptions().frame(0).centerCrop()).load(mVideoPath).into(mIvCover);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
progressDialog.dismiss();
|
||||
ToastUtils.show("视频文件路径有误.");
|
||||
@ -780,7 +779,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传录音
|
||||
* TODO 上传录音
|
||||
*
|
||||
* @param filePath
|
||||
*/
|
||||
@ -789,12 +788,9 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
progressDialog.show();
|
||||
File file = new File(filePath);
|
||||
if (file.exists()) {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"),
|
||||
file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("audio", file.getName(),
|
||||
requestFile);
|
||||
RetrofitManager.getInstance().create(BaseApiService.class).uploadAudio(body,
|
||||
UserLgUtils.getToken()).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<BaseSuccessBean>() {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("audio", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance().create(BaseApiService.class).uploadAudio(body, UserLgUtils.getToken()).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
@ -802,16 +798,16 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseUserBean) {
|
||||
mIvVoice.setVisibility(View.GONE);
|
||||
// mIvVoice.setVisibility(View.GONE);
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("上传成功");
|
||||
mAudioPath = filePath;
|
||||
mAudioId = baseUserBean.getData();
|
||||
mTvVoiceAnim.setVisibility(View.VISIBLE);
|
||||
mIvDelAudio.setVisibility(View.VISIBLE);
|
||||
mArbAudio.setVisibility(View.GONE);
|
||||
// mTvVoiceAnim.setVisibility(View.VISIBLE);
|
||||
// mIvDelAudio.setVisibility(View.VISIBLE);
|
||||
// mArbAudio.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -820,10 +816,10 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
mTvVoiceAnim.setVisibility(View.GONE);
|
||||
mIvDelAudio.setVisibility(View.GONE);
|
||||
mArbAudio.setVisibility(View.VISIBLE);
|
||||
mIvVoice.setVisibility(View.VISIBLE);
|
||||
// mTvVoiceAnim.setVisibility(View.GONE);
|
||||
// mIvDelAudio.setVisibility(View.GONE);
|
||||
// mArbAudio.setVisibility(View.VISIBLE);
|
||||
// mIvVoice.setVisibility(View.VISIBLE);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@ -853,10 +849,8 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "正在上传...");
|
||||
progressDialog.show();
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("image", file.getName(),
|
||||
requestFile);
|
||||
RetrofitManager.getInstance().create(BaseApiService.class).uploadImage(body,
|
||||
UserLgUtils.getToken()).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<BaseSuccessBean>() {
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("image", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance().create(BaseApiService.class).uploadImage(body, UserLgUtils.getToken()).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
|
@ -132,9 +132,9 @@ public class ChooseGridActivity extends BaseActivity {
|
||||
mRlvComponents.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
|
||||
|
||||
mTvPublish.setOnClickListener(v -> doConfirm());
|
||||
// getAreaGridList(1);
|
||||
getMineGridList();
|
||||
// mSrlContent.setOnLoadMoreListener(refreshLayout -> doLoadMore());
|
||||
getAreaGridList(1);
|
||||
// getMineGridList();
|
||||
mSrlContent.setOnLoadMoreListener(refreshLayout -> doLoadMore());
|
||||
mSrlContent.setEnableLoadMore(false);
|
||||
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
|
||||
setStateView(13);
|
||||
@ -142,15 +142,15 @@ public class ChooseGridActivity extends BaseActivity {
|
||||
|
||||
//加载更多
|
||||
private void doLoadMore() {
|
||||
// getAreaGridList(mCurrentPage);
|
||||
getAreaGridList(mCurrentPage);
|
||||
}
|
||||
|
||||
//刷新
|
||||
private void doRefresh() {
|
||||
mBeans.clear();
|
||||
mAdapter.setData(mBeans);
|
||||
// getAreaGridList(1);
|
||||
getMineGridList();
|
||||
getAreaGridList(1);
|
||||
// getMineGridList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,8 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_area_3"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择事发地区" />
|
||||
android:hint="请选择事发地区"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white">
|
||||
@ -75,7 +76,8 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_grid_id"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择部件所在网格" />
|
||||
android:hint="请选择部件所在网格"
|
||||
tools:ignore="TouchTargetSizeCheck,TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -95,7 +97,8 @@
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入事发详细地址"
|
||||
android:inputType="text" />
|
||||
android:inputType="text"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white">
|
||||
@ -110,7 +113,8 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_address_sel"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择事发位置坐标" />
|
||||
android:hint="请选择事发位置坐标"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -138,7 +142,8 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_component"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择部件名称" />
|
||||
android:hint="请选择部件名称"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white">
|
||||
@ -153,7 +158,8 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择事件类型" />
|
||||
android:hint="请选择事件类型"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -187,7 +193,8 @@
|
||||
app:splitTrack="false"
|
||||
app:theme="@style/scstyle"
|
||||
app:thumbTint="#00000000"
|
||||
app:trackTint="#00000000" />
|
||||
app:trackTint="#00000000"
|
||||
tools:ignore="TouchTargetSizeCheck" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -269,87 +276,87 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical">
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:layout_marginTop="5dp"-->
|
||||
<!-- android:layout_marginRight="10dp"-->
|
||||
<!-- android:orientation="vertical">-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_voice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="录音"
|
||||
android:textColor="@color/text_20" />
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_voice"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:drawablePadding="8dp"-->
|
||||
<!-- android:gravity="left"-->
|
||||
<!-- android:padding="5dp"-->
|
||||
<!-- android:text="录音"-->
|
||||
<!-- android:textColor="@color/text_20" />-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/shape_rectangle_gray_5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:background="@drawable/shape_rectangle_gray_5"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_voice"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/ll_voice"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_voice"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/ic_voice_icon_gray" />
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_voice"-->
|
||||
<!-- android:layout_width="30dp"-->
|
||||
<!-- android:layout_height="30dp"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:src="@drawable/ic_voice_icon_gray" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_voice_anim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="@drawable/anim_yuyin_sign"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="invisible" />
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_voice_anim"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="15dp"-->
|
||||
<!-- android:background="@drawable/anim_yuyin_sign"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true"-->
|
||||
<!-- android:visibility="invisible" />-->
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
<!-- <View-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.3">
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="0.3">-->
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.voicebutton.VoiceButton
|
||||
android:id="@+id/arb_audio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:background="@drawable/sel_btn_submit_circle"
|
||||
android:gravity="center"
|
||||
android:textColor="#fff"
|
||||
android:textSize="14dp" />
|
||||
<!-- <com.tenlionsoft.baselib.core.widget.voicebutton.VoiceButton-->
|
||||
<!-- android:id="@+id/arb_audio"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="35dp"-->
|
||||
<!-- android:background="@drawable/sel_btn_submit_circle"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:textColor="#fff"-->
|
||||
<!-- android:textSize="14dp" />-->
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_del_audio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_del_tong" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_del_audio"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerInParent="true"-->
|
||||
<!-- android:src="@drawable/ic_del_tong" />-->
|
||||
<!-- </RelativeLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
<!-- </LinearLayout>-->
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
|
@ -745,7 +745,7 @@ public class MainTabActivity extends BaseActivity implements LoginView, LocalBro
|
||||
break;
|
||||
}
|
||||
if (!TextUtils.isEmpty(msgHint)) {
|
||||
CloudLinkDialog dialogHint = new CloudLinkDialog(mActivity);
|
||||
CloudLinkDialog dialogHint = new CloudLinkDialog(MainTabActivity.this);
|
||||
dialogHint.setOnlyYes(true);
|
||||
dialogHint.setYes(getString(R.string.cloudLink_sure), null, dialogHint::dismiss);
|
||||
dialogHint.setStr_message(msgHint, null);
|
||||
@ -861,9 +861,9 @@ public class MainTabActivity extends BaseActivity implements LoginView, LocalBro
|
||||
mFragments.get(2).refreshContentView("failed");
|
||||
}
|
||||
} else if (PathConfig.ACTION_MSG_FORCE_LOGIN_OUT.equals(action)) {
|
||||
//强制退出
|
||||
LoginMangerV2.getInstance().logout();
|
||||
showLoginOutDialog();
|
||||
//强制退出 TODO Bug
|
||||
// LoginMangerV2.getInstance().logout();
|
||||
// showLoginOutDialog();
|
||||
} else if (PathConfig.ACTION_LOGIN_OUT.equals(action)) {
|
||||
reStartApp();
|
||||
} else if (PathConfig.ACTION_SOCKET_NOT_ALIVE.equals(action)) {
|
||||
|
@ -124,8 +124,9 @@ public class GridMainFragment extends BaseFragment {
|
||||
"实有车辆",
|
||||
"部件采集",
|
||||
"护路护线",
|
||||
"重点青少年事件",
|
||||
"工作日志"};
|
||||
"重点青少年事件"
|
||||
// "工作日志"
|
||||
};
|
||||
private int[] mBtnIds = new int[]{
|
||||
R.drawable.ic_house_person,
|
||||
R.drawable.ic_work_locus,
|
||||
@ -141,8 +142,8 @@ public class GridMainFragment extends BaseFragment {
|
||||
R.drawable.ic_car_manage,
|
||||
R.drawable.ic_parts_manage,
|
||||
R.drawable.ic_road_manage,
|
||||
R.drawable.ic_young_case_manage,
|
||||
R.drawable.ic_journal_list
|
||||
R.drawable.ic_young_case_manage
|
||||
// R.drawable.ic_journal_list
|
||||
};
|
||||
private FunctionTitleNumAdapter mNumAdapter;
|
||||
private String[] mHouseTitle = new String[]{
|
||||
|
Loading…
Reference in New Issue
Block a user