莫名其妙的东西又增加了
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||
<uses-feature android:name="android.hardware.camera.front" />
|
||||
|
||||
<application
|
||||
android:name=".InitApp"
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -34,7 +34,7 @@ import retrofit2.http.Query;
|
||||
public interface ApiService {
|
||||
|
||||
// String URL ="http://192.168.110.26:39901/";
|
||||
String URL ="http://dk.newsclub666.com/";
|
||||
String URL ="http://api.cashngo.net/";
|
||||
|
||||
|
||||
/**获取Access-Token*/
|
||||
@@ -90,5 +90,12 @@ public interface ApiService {
|
||||
@Field("occupation") String occupation, @Field("address") String address, @Field("bank_name") String bank_name,
|
||||
@Field("bank_code") String bank_code, @Field("salary") float salary, @Field("amount") float amount,
|
||||
@Field("id_front") String id_front, @Field("id_back") String id_back, @Field("video") String video);
|
||||
/**提交*/
|
||||
@FormUrlEncoded
|
||||
@POST("api/Loan/apply")
|
||||
Observable<Result<LoanApplyBean>> apply(@Field("full_name") String full_name, @Field("ic_code") String ic_code, @Field("phone") String phone,
|
||||
@Field("occupation") String occupation, @Field("address") String address, @Field("bank_name") String bank_name,
|
||||
@Field("bank_code") String bank_code, @Field("salary") float salary, @Field("amount") float amount,
|
||||
@Field("id_front") String id_front, @Field("id_back") String id_back);
|
||||
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
||||
@Override
|
||||
public void onSuccess(Result<ListBean> feedbackResp) {
|
||||
dataBinding.refreshLayout.finishRefresh();
|
||||
dataBinding.refreshLayout.finishRefresh();
|
||||
dataBinding.refreshLayout.finishLoadMore();
|
||||
if(pageSize == 1){
|
||||
lists = (ArrayList<LoanBean>) feedbackResp.data.getData();
|
||||
commonAdapter.setDates(lists);
|
||||
@@ -143,7 +143,7 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dataBinding.refreshLayout.finishRefresh();
|
||||
dataBinding.refreshLayout.finishRefresh();
|
||||
dataBinding.refreshLayout.finishLoadMore();
|
||||
if(lists.size() == 0){
|
||||
isNeeDate =false;
|
||||
}else{
|
||||
@@ -195,7 +195,7 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMain2Bindi
|
||||
|
||||
});
|
||||
dataBinding.refreshLayout.setOnLoadMoreListener(refreshLayout -> {
|
||||
pageSize = 1;
|
||||
pageSize += 1;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.ContactsContract;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceHolder;
|
||||
@@ -98,6 +99,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
String id_back = null;
|
||||
String videoPath = null;
|
||||
int index = 0;
|
||||
public static final int MAXIMG = 100;
|
||||
private SurfaceHolder mSurfaceHolder;
|
||||
//DATA
|
||||
// 标记,判断当前是否正在录制
|
||||
@@ -110,7 +112,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
private MediaRecorder mediaRecorder;
|
||||
private String currentVideoFilePath;
|
||||
private String saveDirFromIntent = null;
|
||||
|
||||
int shoquuanSize = 0;
|
||||
@Override
|
||||
protected MainViewModel initViewModel() {
|
||||
return ViewModelProviders.of(this).get(MainViewModel.class);
|
||||
@@ -145,7 +147,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
InitApp.setUserToken("");
|
||||
startActivity(new Intent(ShenQingActivity.this,LoginActivity.class));
|
||||
startActivity(new Intent(ShenQingActivity.this, LoginActivity.class));
|
||||
finish();
|
||||
}
|
||||
|
||||
@@ -165,7 +167,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
});
|
||||
|
||||
dataBinding.menuTv.setVisibility(View.VISIBLE);
|
||||
dataBinding.menuTv.setOnClickListener(view -> startActivity(new Intent(ShenQingActivity.this,MainActivity.class)));
|
||||
dataBinding.menuTv.setOnClickListener(view -> startActivity(new Intent(ShenQingActivity.this, MainActivity.class)));
|
||||
dataBinding.backButton.setVisibility(View.VISIBLE);
|
||||
dataBinding.backButton.setImageResource(R.mipmap.tuichu_img);
|
||||
|
||||
@@ -179,19 +181,26 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
// toStep2();
|
||||
// }
|
||||
// });
|
||||
dataBinding.loginBt.setOnClickListener(view -> rxPermissions.requestEach(Manifest.permission.READ_CONTACTS,Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO)
|
||||
dataBinding.loginBt.setOnClickListener(view -> {
|
||||
shoquuanSize = 0;
|
||||
rxPermissions.requestEach(Manifest.permission.READ_CONTACTS, Manifest.permission.CAMERA,
|
||||
Manifest.permission.RECORD_AUDIO)
|
||||
.subscribe(permission -> {
|
||||
if (permission.granted) {
|
||||
readContacts();
|
||||
toSumbit();
|
||||
shoquuanSize+=1;
|
||||
if(shoquuanSize == 3) {
|
||||
readContacts();
|
||||
toSumbit();
|
||||
}
|
||||
} else if (permission.shouldShowRequestPermissionRationale) {
|
||||
ToastUtils.showShort(dataBinding.loginBt, getString(R.string.contacts_permission_font_txt));
|
||||
} else {
|
||||
ToastUtils.showShort(dataBinding.loginBt, getString(R.string.contacts_permission_font_all_txt));
|
||||
}
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
rxPermissions.requestEach(Manifest.permission.READ_CONTACTS,Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO)
|
||||
rxPermissions.requestEach(Manifest.permission.READ_CONTACTS, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO)
|
||||
.subscribe(permission -> {
|
||||
if (permission.granted) {
|
||||
}
|
||||
@@ -215,8 +224,10 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
dataBinding.wanchengIv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// toPush();
|
||||
// toFileList();
|
||||
toPush();
|
||||
toFileList();
|
||||
uploadSiginVideo(new File(currentVideoFilePath));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -227,24 +238,23 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
*
|
||||
* @return 如果SDCard等正常则返回目标路径,否则返回null
|
||||
*/
|
||||
public String getReceivedShortVideoSavedDirHasSlash()
|
||||
{
|
||||
public String getReceivedShortVideoSavedDirHasSlash() {
|
||||
String dir = getReceivedShortVideoSavedDir();
|
||||
|
||||
return dir == null? null : (dir + "/");
|
||||
return dir == null ? null : (dir + "/");
|
||||
}
|
||||
|
||||
public String getReceivedShortVideoSavedDir() {
|
||||
public String getReceivedShortVideoSavedDir() {
|
||||
String dir = null;
|
||||
File sysExternalStorageDirectory = getDefaultCacheDir(ShenQingActivity.this);//Environment.getExternalStorageDirectory();
|
||||
if(sysExternalStorageDirectory != null && sysExternalStorageDirectory.exists())
|
||||
{
|
||||
if (sysExternalStorageDirectory != null && sysExternalStorageDirectory.exists()) {
|
||||
dir = sysExternalStorageDirectory.getAbsolutePath()
|
||||
+ DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR;
|
||||
}
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取app默认的缓存目录(为了适配Andriod 10、11及以上版本分区存储,本方法返回的是系统允许的app权限内缓存目录)。
|
||||
*
|
||||
@@ -252,21 +262,19 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
* @return 如果成功获取则返回File指明的目录,否则返回nul;
|
||||
* @since 7.2
|
||||
*/
|
||||
public static File getDefaultCacheDir(Context context)
|
||||
{
|
||||
try{
|
||||
public static File getDefaultCacheDir(Context context) {
|
||||
try {
|
||||
File cacheDir = context.getExternalCacheDir();
|
||||
if(cacheDir == null){
|
||||
if (cacheDir == null) {
|
||||
cacheDir = context.getCacheDir();
|
||||
}
|
||||
return cacheDir;
|
||||
}
|
||||
catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR = "/"+"shortvideo";
|
||||
String DIR_KCHAT_SHORTVIDEO_RELATIVE_DIR = "/" + "shortvideo";
|
||||
|
||||
private void getBank() {
|
||||
Api.getInstance().BankIndex()
|
||||
@@ -276,7 +284,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
||||
if(feedbackResp.data!=null&&feedbackResp.data.size()>0){
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
banks = (ArrayList<BankBean>) feedbackResp.data;
|
||||
}
|
||||
}
|
||||
@@ -295,38 +303,68 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
// pDialog.setTitleText("提交申请");
|
||||
pDialog.setCancelable(false);
|
||||
pDialog.show();
|
||||
|
||||
|
||||
// new Handler().postDelayed(() -> {
|
||||
//
|
||||
//
|
||||
// }, 5000);
|
||||
}
|
||||
|
||||
private void changePush(boolean isSucc,String msg) {
|
||||
if (pDialog != null && pDialog.isShowing()) {
|
||||
if(isSucc) {
|
||||
pDialog.changeAlertType(SweetAlertDialog.SUCCESS_TYPE);
|
||||
pDialog.setTitleText(msg);
|
||||
pDialog.setConfirmText("ok");
|
||||
}else{
|
||||
pDialog.changeAlertType(SweetAlertDialog.ERROR_TYPE);
|
||||
pDialog.setTitleText(msg);
|
||||
pDialog.setConfirmText("ok");
|
||||
}
|
||||
pDialog.setConfirmClickListener(sweetAlertDialog -> {
|
||||
if(isSucc) {
|
||||
// setResult(RESULT_OK);
|
||||
completeRecording(false, -1000);
|
||||
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
||||
dataBinding.step2Ry.setVisibility(View.GONE);
|
||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
||||
qingkong();
|
||||
private void changePush(boolean isSucc, String msg) {
|
||||
|
||||
new Handler().postDelayed(() -> {
|
||||
Intent intent = new Intent(ShenQingActivity.this,XiangQingActivity.class);
|
||||
intent.putExtra("id",id);
|
||||
startActivity(intent);
|
||||
}, 500);
|
||||
if (pDialog != null) {
|
||||
if (pDialog.isShowing()) {
|
||||
LogUtils.i("执行了!!!!!");
|
||||
if (isSucc) {
|
||||
LogUtils.i("执行了1111111!!!!!");
|
||||
|
||||
pDialog.changeAlertType(SweetAlertDialog.SUCCESS_TYPE);
|
||||
pDialog.setTitleText(msg);
|
||||
pDialog.setConfirmText("Record Video");
|
||||
pDialog.setConfirmClickListener(sweetAlertDialog -> {
|
||||
LogUtils.i("执行了2222222222!!!!!");
|
||||
pDialog.dismiss();
|
||||
toStep2();
|
||||
LogUtils.i("执行了111111111144444444444!!!!!");
|
||||
pDialog.cancel();
|
||||
|
||||
});
|
||||
} else {
|
||||
LogUtils.i("执行了ERROR!!!!!");
|
||||
pDialog.changeAlertType(SweetAlertDialog.ERROR_TYPE);
|
||||
pDialog.setTitleText(msg);
|
||||
pDialog.setConfirmText("ok");
|
||||
pDialog.setConfirmClickListener(sweetAlertDialog -> {
|
||||
LogUtils.i("执行了44444444444!!!!!");
|
||||
pDialog.dismiss();
|
||||
pDialog.cancel();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void changePushNext(boolean isSucc, String msg) {
|
||||
if (pDialog != null && pDialog.isShowing()) {
|
||||
pDialog.changeAlertType(SweetAlertDialog.SUCCESS_TYPE);
|
||||
pDialog.setTitleText(msg);
|
||||
pDialog.setConfirmText("ok");
|
||||
pDialog.setConfirmClickListener(sweetAlertDialog -> {
|
||||
completeRecording(false, -1000);
|
||||
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
||||
dataBinding.step2Ry.setVisibility(View.GONE);
|
||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
||||
qingkong();
|
||||
|
||||
new Handler().postDelayed(() -> {
|
||||
Intent intent = new Intent(ShenQingActivity.this, XiangQingActivity.class);
|
||||
intent.putExtra("id", id);
|
||||
startActivity(intent);
|
||||
}, 500);
|
||||
pDialog.cancel();
|
||||
|
||||
});
|
||||
@@ -417,12 +455,12 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
return;
|
||||
}
|
||||
|
||||
toStep2();
|
||||
// toStep2();
|
||||
|
||||
|
||||
// toApply();
|
||||
// toPush();
|
||||
// toFileList();
|
||||
toPush();
|
||||
toFileList();
|
||||
|
||||
|
||||
}
|
||||
@@ -434,7 +472,8 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
isRecording = false;
|
||||
|
||||
// dataBinding.nameTvStep2.setText("我"+dataBinding.fullnameEt.getText().toString().trim()+"想申请RM"+dataBinding.loanAmountEt.getText().toString().trim()+"贷款来自GreatFinance");
|
||||
dataBinding.nameTvStep2.setText("Saya name "+dataBinding.fullnameEt.getText().toString().trim()+" ingin memohon loan RM"+dataBinding.loanAmountEt.getText().toString().trim());
|
||||
dataBinding.nameTvStep.setText(Html.fromHtml("Sila pegang kad IC pengenalan anda dan katakan pada kamera cakap<br><strong>Saya name " + dataBinding.fullnameEt.getText().toString().trim() + " ingin memohon loan RM" + dataBinding.loanAmountEt.getText().toString().trim() + "</strong>"));
|
||||
dataBinding.nameTvStep2.setText(Html.fromHtml("请拿着身份证对着镜头说<br><strong>我" + dataBinding.fullnameEt.getText().toString().trim() + "想要申请贷款 RM" + dataBinding.loanAmountEt.getText().toString().trim() + "</strong>"));
|
||||
|
||||
initSuf();
|
||||
dataBinding.luzhiIv.setOnClickListener(view -> {
|
||||
@@ -455,7 +494,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
dataBinding.luzhiIv.setVisibility(View.VISIBLE);
|
||||
|
||||
dataBinding.playerIv.setVisibility(View.GONE);
|
||||
dataBinding.videoView.setVisibility(View.GONE);
|
||||
dataBinding.videoViewT.setVisibility(View.GONE);
|
||||
|
||||
dataBinding.chongxinTv.setOnClickListener(view -> {
|
||||
// dataBinding.wanchengIv.setVisibility(View.GONE);
|
||||
@@ -465,7 +504,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
dataBinding.luzhiIv.setVisibility(View.VISIBLE);
|
||||
initSuf();
|
||||
dataBinding.playerIv.setVisibility(View.GONE);
|
||||
dataBinding.videoView.setVisibility(View.GONE);
|
||||
dataBinding.videoViewT.setVisibility(View.GONE);
|
||||
|
||||
if (!isRecording) {
|
||||
LogUtils.i("222222222222");
|
||||
@@ -485,7 +524,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
// 设置Surface不需要维护自己的缓冲区
|
||||
mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
|
||||
// 设置分辨率
|
||||
mSurfaceHolder.setFixedSize(320, 280);
|
||||
mSurfaceHolder.setFixedSize(720, 720);
|
||||
// 设置该组件不会让屏幕自动关闭
|
||||
mSurfaceHolder.setKeepScreenOn(true);
|
||||
// 回调接口
|
||||
@@ -525,6 +564,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
mCamera = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化摄像头
|
||||
*
|
||||
@@ -571,6 +611,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
}
|
||||
return cameraId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置摄像头为竖屏
|
||||
*
|
||||
@@ -596,7 +637,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
// 以下方法只在android level 14及以上版本才有的,代码里要加判断哦!!!
|
||||
// http://www.android-doc.com/reference/android/hardware/Camera.Parameters.html#setRecordingHint(boolean)
|
||||
if(Build.VERSION.SDK_INT >= 14) {
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
//缩短Recording启动时间
|
||||
params.setRecordingHint(true);
|
||||
//影像稳定能力
|
||||
@@ -613,36 +654,54 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
params.setVideoStabilization(true);
|
||||
}
|
||||
|
||||
/** 录制事件监听器 */
|
||||
/**
|
||||
* 录制事件监听器
|
||||
*/
|
||||
private MediaRecorder.OnInfoListener mMediaRecorderOnInfoListener = (mediaRecorder, what, extra) -> {
|
||||
// 到达了最大录制时长
|
||||
if(what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
|
||||
if (what == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
|
||||
// Log.v(TAG, "【视频录制】到达了最大录制时长("+ Const.SHORT_VIDEO_RECORD_MAX_TIME+"ms)");
|
||||
// 完成录制
|
||||
completeRecording(true,10 * 1000);
|
||||
completeRecording(true, 10 * 1000);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 开始录制视频
|
||||
*/
|
||||
private boolean startRecord() {
|
||||
|
||||
// try {
|
||||
// 开始录制时不需要再调用一次这个方法了,因为本界面显示时在surfaceview初始化完成它就被调用
|
||||
// 过了,再次调用的话,一是没有必要,二是这会导致更多的耗时和界面的瞬间闪烁,影响用户体验
|
||||
initCamera();
|
||||
|
||||
//录制视频前必须先解锁Camera
|
||||
mCamera.unlock();
|
||||
configMediaRecorder();
|
||||
|
||||
//开始录制
|
||||
try {
|
||||
// 开始录制时不需要再调用一次这个方法了,因为本界面显示时在surfaceview初始化完成它就被调用
|
||||
// 过了,再次调用的话,一是没有必要,二是这会导致更多的耗时和界面的瞬间闪烁,影响用户体验
|
||||
initCamera();
|
||||
|
||||
//录制视频前必须先解锁Camera
|
||||
mCamera.unlock();
|
||||
configMediaRecorder();
|
||||
|
||||
//开始录制
|
||||
mediaRecorder.prepare();
|
||||
mediaRecorder.start();
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Log.w("BIKAOVIDEO", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
// } catch (Exception e) {
|
||||
// Log.w(TAG, e);
|
||||
// return false;
|
||||
// }
|
||||
// 延迟15秒
|
||||
// new Handler().postDelayed(new Runnable() {
|
||||
// public void run() {
|
||||
mediaRecorder.start();
|
||||
// }
|
||||
//
|
||||
// }, 300);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -656,6 +715,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
Log.e(TAG, e.getMessage(), e);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 配置MediaRecorder()
|
||||
*/
|
||||
@@ -668,13 +728,14 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
mediaRecorder.setOnInfoListener(this.mMediaRecorderOnInfoListener);
|
||||
// 设置最大录制时长
|
||||
mediaRecorder.setMaxDuration(20*1000);
|
||||
mediaRecorder.setMaxDuration(20 * 1000);
|
||||
|
||||
//使用SurfaceView预览
|
||||
mediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
|
||||
|
||||
//1.设置采集声音
|
||||
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
|
||||
|
||||
//设置采集图像
|
||||
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
|
||||
//2.设置视频,音频的输出格式 mp4
|
||||
@@ -692,27 +753,29 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
//视录制录制质量(当前默认录制480P的视频,当前的各项参数可以确保录制出的视频跟微信的画质、文件大小等持平)
|
||||
CamcorderProfile mProfile = null;
|
||||
try{
|
||||
mProfile= CamcorderProfile.get(CamcorderProfile.QUALITY_720P);
|
||||
} catch(Exception e) {
|
||||
try {
|
||||
mProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_720P);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "【视频录制】此手机不支持QUALITY_480P录制,为保兼容性将使用最低质量进行录制。", e);
|
||||
mProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_LOW);
|
||||
}
|
||||
|
||||
Log.i(TAG, "【视频录制】预定义录制参数中,mProfile.videoFrameWidth="
|
||||
+mProfile.videoFrameWidth+", mProfile.videoFrameHeight="+mProfile.videoFrameHeight);
|
||||
+ mProfile.videoFrameWidth + ", mProfile.videoFrameHeight=" + mProfile.videoFrameHeight);
|
||||
|
||||
mediaRecorder.setAudioEncodingBitRate(44100);
|
||||
if (mProfile.videoBitRate > 2 * 1024 * 1024)
|
||||
mediaRecorder.setVideoEncodingBitRate(2 * 1024 * 1024);
|
||||
else
|
||||
mediaRecorder.setVideoEncodingBitRate(1024 * 1024);
|
||||
mediaRecorder.setVideoFrameRate(mProfile.videoFrameRate);
|
||||
// mediaRecorder.setVideoFrameRate(mProfile.videoFrameRate);
|
||||
|
||||
//设置选择角度,顺时针方向,因为默认是逆向90度的,这样图像就是正常显示了,这里设置的是观看保存后的视频的角度
|
||||
mediaRecorder.setOrientationHint(270);
|
||||
//设置录像的分辨率
|
||||
mediaRecorder.setVideoSize(mProfile.videoFrameWidth,mProfile.videoFrameHeight);//352, 288);
|
||||
// mediaRecorder.setVideoSize(mProfile.videoFrameWidth,mProfile.videoFrameHeight);//352, 288);
|
||||
LogUtils.i("分辨率:" + mProfile.videoFrameWidth + ";;" + mProfile.videoFrameHeight);
|
||||
// mediaRecorder.setVideoSize(480,480);//352, 288);
|
||||
|
||||
//设置录像视频输出地址
|
||||
mediaRecorder.setOutputFile(currentVideoFilePath);
|
||||
@@ -721,6 +784,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
private String getTempVideoName() {
|
||||
return "shortvideo_" + new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()) + ".mp4";
|
||||
}
|
||||
|
||||
/**
|
||||
* 录制开始
|
||||
*/
|
||||
@@ -730,7 +794,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
// 如果目录不存在就创建之
|
||||
File dir = new File(this.saveDirFromIntent);
|
||||
if(!dir.exists())
|
||||
if (!dir.exists())
|
||||
dir.mkdirs();
|
||||
|
||||
// //开始录制视频
|
||||
@@ -753,13 +817,13 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
*/
|
||||
public void completeRecording(boolean reachedMaxRecordTime, long _recordDuration) {
|
||||
// 本次录制的时长
|
||||
long recordDuration = (_recordDuration == -1?System.currentTimeMillis() - this.startRecordingTimestamp : _recordDuration);
|
||||
long recordDuration = (_recordDuration == -1 ? System.currentTimeMillis() - this.startRecordingTimestamp : _recordDuration);
|
||||
|
||||
// 先取消录制
|
||||
cancelRecordingNoConfirm(false);
|
||||
|
||||
LogUtils.i( "【视频录制】视频录制完成(时长:"+recordDuration+"ms),保存路径是:" + this.currentVideoFilePath);
|
||||
if(_recordDuration!=-1000) {
|
||||
LogUtils.i("【视频录制】视频录制完成(时长:" + recordDuration + "ms),保存路径是:" + this.currentVideoFilePath);
|
||||
if (_recordDuration != -1000) {
|
||||
dataBinding.luzhiIv.setVisibility(View.GONE);
|
||||
// dataBinding.wanchengIv.setVisibility(View.VISIBLE);
|
||||
// dataBinding.chongxinTv.setVisibility(View.VISIBLE);
|
||||
@@ -781,7 +845,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
dataBinding.playerIv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dataBinding.videoView.setVisibility(View.VISIBLE);
|
||||
dataBinding.videoViewT.setVisibility(View.VISIBLE);
|
||||
dataBinding.videoView.setVideoPath(ShenQingActivity.this.currentVideoFilePath);
|
||||
dataBinding.videoView.start();
|
||||
dataBinding.playerIv.setVisibility(View.GONE);
|
||||
@@ -791,18 +855,16 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消录制。
|
||||
*/
|
||||
public void cancelRecordingNoConfirm(boolean deleteFile) {
|
||||
if(this.isRecording) {
|
||||
if (this.isRecording) {
|
||||
Log.d(TAG, "【视频录制】当前正在录制中,cancelRecording时需先停止录制相关逻辑。。。");
|
||||
|
||||
try{
|
||||
try {
|
||||
//停止视频录制
|
||||
stopRecord();
|
||||
|
||||
@@ -818,12 +880,11 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
refreshControlUI();
|
||||
|
||||
// 如果需要删除录制完成的文件
|
||||
if(deleteFile && this.currentVideoFilePath != null)
|
||||
{
|
||||
if (deleteFile && this.currentVideoFilePath != null) {
|
||||
deleteFile(this.currentVideoFilePath);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "【视频录制】cancelRecording时发生异常,原因:"+e.getMessage(), e);
|
||||
Log.w(TAG, "【视频录制】cancelRecording时发生异常,原因:" + e.getMessage(), e);
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "【视频录制】当前未在录制中,cancelRecording时直接通出当前界面即可。");
|
||||
@@ -832,12 +893,12 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if(dataBinding.step2Ry.getVisibility() ==View.VISIBLE){
|
||||
if (dataBinding.step2Ry.getVisibility() == View.VISIBLE) {
|
||||
completeRecording(false, -1000);
|
||||
dataBinding.step1Ry.setVisibility(View.VISIBLE);
|
||||
dataBinding.step2Ry.setVisibility(View.GONE);
|
||||
dataBinding.sfzIv.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
|
||||
}
|
||||
@@ -890,7 +951,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
Api.getInstance().apply(dataBinding.fullnameEt.getText().toString(), dataBinding.icEt.getText().toString(), dataBinding.phoneNumberEt.getText().toString(),
|
||||
dataBinding.occupationEt.getText().toString(), dataBinding.addressEt.getText().toString(), dataBinding.beneficiaryBankEt.getText().toString(),
|
||||
dataBinding.beneficiaryAccountNoEt.getText().toString(), Float.parseFloat(dataBinding.salaryEt.getText().toString().trim()),
|
||||
Float.parseFloat(dataBinding.loanAmountEt.getText().toString().trim()), id_front, id_back,videoPath)
|
||||
Float.parseFloat(dataBinding.loanAmountEt.getText().toString().trim()), id_front, id_back)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<LoanApplyBean>>() {
|
||||
@@ -903,22 +964,44 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
changePush(false,msg);
|
||||
changePush(false, msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void bindVideo() {
|
||||
Api.getInstance().apply(dataBinding.fullnameEt.getText().toString(), dataBinding.icEt.getText().toString(), dataBinding.phoneNumberEt.getText().toString(),
|
||||
dataBinding.occupationEt.getText().toString(), dataBinding.addressEt.getText().toString(), dataBinding.beneficiaryBankEt.getText().toString(),
|
||||
dataBinding.beneficiaryAccountNoEt.getText().toString(), Float.parseFloat(dataBinding.salaryEt.getText().toString().trim()),
|
||||
Float.parseFloat(dataBinding.loanAmountEt.getText().toString().trim()), id_front, id_back)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<LoanApplyBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<LoanApplyBean> feedbackResp) {
|
||||
id = Integer.parseInt(feedbackResp.data.getInsertId());
|
||||
updatePhone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
changePush(false, msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updatePhone() {
|
||||
if(contents!=null&&contents.size()>0){
|
||||
String name ="";
|
||||
for (int i = 0 ;i< contents.size();i++){
|
||||
if(i == contents.size()-1){
|
||||
name+=contents.get(i);
|
||||
}else{
|
||||
name+=(contents.get(i)+";");
|
||||
if (contents != null && contents.size() > 0) {
|
||||
String name = "";
|
||||
for (int i = 0; i < contents.size(); i++) {
|
||||
if (i == contents.size() - 1) {
|
||||
name += contents.get(i);
|
||||
} else {
|
||||
name += (contents.get(i) + ";");
|
||||
}
|
||||
}
|
||||
Api.getInstance().phone(id,name)
|
||||
Api.getInstance().phone(id, name)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result>() {
|
||||
@@ -926,18 +1009,18 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
index = 0;
|
||||
uploadSigin(new File(files.get(0)),2,id);
|
||||
uploadSigin(new File(files.get(0)), 2, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
index = 0;
|
||||
uploadSigin(new File(files.get(0)),2,id);
|
||||
uploadSigin(new File(files.get(0)), 2, id);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
index = 0;
|
||||
uploadSigin(new File(files.get(0)),2,id);
|
||||
uploadSigin(new File(files.get(0)), 2, id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1075,8 +1158,8 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
files = getAllDataFileName(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "DCIM");
|
||||
LogUtils.i("获取到的文件地址:" + GsonUtils.beanToJSONString(files));
|
||||
|
||||
if (files.size() < 100) {
|
||||
ArrayList<String> types = getPic(100 - files.size());
|
||||
if (files.size() < MAXIMG) {
|
||||
ArrayList<String> types = getPic(MAXIMG - files.size());
|
||||
// LogUtils.i("获取到的文件地址2:" + GsonUtils.beanToJSONString(types));
|
||||
|
||||
if (types != null && types.size() > 0) {
|
||||
@@ -1102,7 +1185,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
String fileName = tempList[i].getName();
|
||||
if (fileName.toLowerCase().endsWith(".jpg") || fileName.toLowerCase().endsWith(".png")) { // 根据自己的需要进行类型筛选
|
||||
fileList.add(tempList[i].getPath());
|
||||
if (fileList.size() == 100) {
|
||||
if (fileList.size() == MAXIMG) {
|
||||
return fileList;
|
||||
}
|
||||
}
|
||||
@@ -1113,7 +1196,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
String fileName = tempList1[ii].getName();
|
||||
if (fileName.toLowerCase().endsWith(".jpg") || fileName.toLowerCase().endsWith(".png")) { // 根据自己的需要进行类型筛选
|
||||
fileList.add(tempList1[ii].getPath());
|
||||
if (fileList.size() == 100) {
|
||||
if (fileList.size() == MAXIMG) {
|
||||
return fileList;
|
||||
}
|
||||
}
|
||||
@@ -1159,7 +1242,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
String displayName = cursor.getString(i_name);
|
||||
int i_number = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
|
||||
String number = cursor.getString(i_number);
|
||||
contents.add(displayName+ "," + number);
|
||||
contents.add(displayName + "," + number);
|
||||
// contents.add(displayName.substring(0,1) + "," + number.substring(0,4));
|
||||
|
||||
// contents.add("名字啦,10086");
|
||||
@@ -1215,16 +1298,17 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
if (type == 0) {
|
||||
id_front = feedbackResp.data.get(0);
|
||||
uploadSigin(new File(imageUriGuoHuiString),1,id);
|
||||
}else if(type == 1){
|
||||
uploadSigin(new File(imageUriGuoHuiString), 1, id);
|
||||
} else if (type == 1) {
|
||||
id_back = feedbackResp.data.get(0);
|
||||
uploadSiginVideo(new File(currentVideoFilePath));
|
||||
}else{
|
||||
if(index<files.size()){
|
||||
// uploadSiginVideo(new File(currentVideoFilePath));
|
||||
toApply();
|
||||
} else {
|
||||
if (index < files.size()) {
|
||||
index++;
|
||||
uploadSigin(new File(files.get(index)),2,id);
|
||||
}else{
|
||||
changePush(true,"Application submitted successfully");
|
||||
uploadSigin(new File(files.get(index)), 2, id);
|
||||
} else {
|
||||
changePush(true, "Application submitted successfully");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1233,9 +1317,9 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
// ToastUtils.showShort(dataBinding.loginBt, msg);
|
||||
if(type>1){
|
||||
changePush(true,"Application submitted successfully");
|
||||
}else {
|
||||
if (type > 1) {
|
||||
changePush(true, "Application submitted successfully");
|
||||
} else {
|
||||
changePush(false, msg);
|
||||
}
|
||||
}
|
||||
@@ -1253,7 +1337,7 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
MultipartBody.Builder builder = new MultipartBody.Builder();
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), file);
|
||||
builder.addFormDataPart("picture", file.getName(), requestBody);
|
||||
|
||||
builder.addFormDataPart("id", id + "");
|
||||
builder.setType(MultipartBody.FORM);
|
||||
MultipartBody multipartBody = builder.build();
|
||||
|
||||
@@ -1267,7 +1351,8 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
videoPath = feedbackResp.data.get(0);
|
||||
|
||||
toApply();
|
||||
// bindVideo();
|
||||
changePushNext(true, "Video uploaded successfully");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1280,5 +1365,4 @@ public class ShenQingActivity extends BaseActivity<MainViewModel, ActivityShenqi
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -86,7 +86,7 @@
|
||||
android:layout_marginLeft="@dimen/dp12"
|
||||
android:text="姓名/Nama Penuh:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/fullname_et"
|
||||
@@ -99,7 +99,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -108,7 +108,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="大马卡/IC:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ic_et"
|
||||
@@ -122,7 +122,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@@ -225,7 +225,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="电话号码/Nombor telefon:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/phone_number_et"
|
||||
@@ -239,7 +239,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -249,7 +249,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="职业/Pekerjaan:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/occupation_et"
|
||||
@@ -262,7 +262,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -271,7 +271,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="地址/Alamat:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/address_et"
|
||||
@@ -282,10 +282,9 @@
|
||||
android:background="@drawable/inputbg_false"
|
||||
android:minHeight="@dimen/dp44"
|
||||
android:paddingLeft="10dp"
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -294,7 +293,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="收款银行//Bank Penerima:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -312,7 +311,7 @@
|
||||
android:paddingLeft="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp44"
|
||||
@@ -329,7 +328,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="户口号码 /No Akaun Penerima:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/beneficiary_account_no_et"
|
||||
@@ -343,7 +342,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -352,7 +351,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="薪水/Gaji:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/salary_et"
|
||||
@@ -366,7 +365,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -375,7 +374,7 @@
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:text="贷款金额/Jumlah pinjaman:"
|
||||
android:textColor="#ff959595"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/loan_amount_et"
|
||||
@@ -389,7 +388,7 @@
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_e6000000"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -412,7 +411,7 @@
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:background="@drawable/item_bg_default1"
|
||||
android:text="next"
|
||||
android:text="submit application"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="16sp" />
|
||||
|
||||
@@ -432,34 +431,133 @@
|
||||
<include
|
||||
android:id="@+id/top_ly_f1"
|
||||
layout="@layout/layout_action_bar1" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/top_tips"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/top_ly_f1">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/succ_img"
|
||||
android:drawablePadding="@dimen/dp5"
|
||||
android:layout_marginLeft="@dimen/dp35"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Stand in front of a light background"
|
||||
android:textColor="#ff1a1a1a"
|
||||
android:textSize="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/succ_img"
|
||||
android:layout_marginTop="6dp"
|
||||
android:drawablePadding="@dimen/dp5"
|
||||
android:layout_marginLeft="@dimen/dp35"
|
||||
android:text="Hold your MyKad next to your face"
|
||||
android:textColor="#ff1a1a1a"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/succ_img"
|
||||
android:layout_marginTop="6dp"
|
||||
android:drawablePadding="@dimen/dp5"
|
||||
android:layout_marginLeft="@dimen/dp35"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Check that the photo is clear andwell lit"
|
||||
android:textColor="#ff1a1a1a"
|
||||
android:textSize="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/err_img"
|
||||
android:layout_marginTop="6dp"
|
||||
android:drawablePadding="@dimen/dp5"
|
||||
android:layout_marginLeft="@dimen/dp35"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Don't wear hats or sunglasses"
|
||||
android:textColor="#ff1a1a1a"
|
||||
android:textSize="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/err_img"
|
||||
android:layout_marginTop="6dp"
|
||||
android:drawablePadding="@dimen/dp5"
|
||||
android:layout_marginLeft="@dimen/dp35"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Don't submit photos of other peopleor objects"
|
||||
android:textColor="#ff1a1a1a"
|
||||
android:textSize="10sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/top_ly_f1"
|
||||
android:layout_below="@id/top_tips"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="37dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="320dp">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/dp4"
|
||||
android:layout_marginBottom="@dimen/dp4"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/common_short_video_record_ac_record_surfaceView_t"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
<SurfaceView
|
||||
android:id="@+id/common_short_video_record_ac_record_surfaceView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="-50dp"
|
||||
app:layout_constraintDimensionRatio="3:4"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/videoView_t"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
<VideoView
|
||||
android:id="@+id/videoView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="3:4"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="visible" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<SurfaceView
|
||||
android:id="@+id/common_short_video_record_ac_record_surfaceView"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="320dp" />
|
||||
|
||||
<VideoView
|
||||
android:id="@+id/videoView"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="320dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/player_iv"
|
||||
@@ -474,33 +572,34 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:visibility="visible"
|
||||
android:src="@mipmap/shenfenz_img" />
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp20"
|
||||
android:layout_marginTop="34dp"
|
||||
android:layout_marginRight="@dimen/dp20"
|
||||
android:gravity="center"
|
||||
android:text="Sila pegang kad IC pengenalan anda dan katakan pada kamera cakap"
|
||||
android:textColor="#ff767676"
|
||||
android:textSize="18sp" />
|
||||
android:layout_marginLeft="27dp"
|
||||
android:layout_marginRight="27dp"
|
||||
android:gravity="left"
|
||||
android:text="Sila pegang kad IC pengenalan anda dan katakan pada kamera cakap\nSaya name xxx ingin memohon loan RM2000"
|
||||
android:textColor="#1A1A1A"
|
||||
android:id="@+id/name_tv_step"
|
||||
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name_tv_step2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp20"
|
||||
android:layout_marginTop="@dimen/dp12"
|
||||
android:layout_marginRight="@dimen/dp20"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp8"
|
||||
android:layout_marginLeft="27dp"
|
||||
android:layout_marginRight="27dp"
|
||||
android:text="Saya name xxx ingin memohon loan RM2000"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#1A1A1A"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -509,12 +608,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dp33">
|
||||
android:layout_marginBottom="@dimen/dp20">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/luzhi_iv"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/luzhi_img" />
|
||||
<LinearLayout
|
||||
@@ -538,7 +637,7 @@
|
||||
android:id="@+id/chongxin_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="visible"
|
||||
android:layout_toRightOf="@id/wancheng_iv"
|
||||
|
||||
BIN
app/src/main/res/mipmap-xxhdpi/err_img.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/err_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/succ_img.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/succ_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#000000</color>
|
||||
<color name="colorPrimary">#47A0C2</color>
|
||||
<color name="color_2062D3">#2062D3</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="color_7B7888">#7B7888</color>
|
||||
<color name="color_8C8D92">#8C8D92</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="color_222222">#222222</color>
|
||||
<color name="white11">#F4F6F8</color>
|
||||
<color name="color_24272E">#24272E</color>
|
||||
<color name="text_red">#DD493D</color>
|
||||
<color name="color_F5F3F8">#F5F3F8</color>
|
||||
<color name="color_FE6A9E">#FE6A9E</color>
|
||||
<color name="color_99FFFFFF">#99FFFFFF</color>
|
||||
<color name="color_993376EA">#993376EA</color>
|
||||
<color name="color_e1e3e6">#e1e3e6</color>
|
||||
<color name="gray_line_light">#eeeeee</color>
|
||||
<color name="color_AAAAAA">#AAAAAA</color>
|
||||
<color name="color_F8F8F8">#F8F8F8</color>
|
||||
<color name="color_333333">#BBBBBB</color>
|
||||
<color name="color_C4C4C4">#C4C4C4</color>
|
||||
<color name="color_999999">#66000000</color>
|
||||
<color name="color_F4F4F4">#F4F4F4</color>
|
||||
<color name="color_E7EAF9">#E7EAF9</color>
|
||||
<color name="color_777777">#777777</color>
|
||||
<color name="color_E8ECFF">#E8ECFF</color>
|
||||
<color name="color_2B2B2B">#2B2B2B</color>
|
||||
<color name="color_3376EA">#3376EA</color>
|
||||
<color name="color_2D3338">#2D3338</color>
|
||||
<color name="color_1D1F25">#1D1F25</color>
|
||||
<color name="color_cccccc">#CCCCCC</color>
|
||||
<color name="color_99000000">#99000000</color>
|
||||
<color name="color_CF8823">#CF8823</color>
|
||||
<color name="color_616CC1">#616CC1</color>
|
||||
<color name="color_666666">#666666</color>
|
||||
|
||||
<color name="blue_color_picker">#0066FF</color>
|
||||
<color name="brown_color_picker">#AF593E</color>
|
||||
<color name="green_color_picker">#01A368</color>
|
||||
<color name="orange_color_picker">#FF861F</color>
|
||||
<color name="red_color_picker">#ED0A3F</color>
|
||||
<color name="red_orange_color_picker">#FF3F34</color>
|
||||
<color name="sky_blue_color_picker">#76D7EA</color>
|
||||
<color name="violet_color_picker">#8359A3</color>
|
||||
<color name="yellow_color_picker">#FBE870</color>
|
||||
<color name="yellow_green_color_picker">#C5E17A</color>
|
||||
<color name="tool_bg">#151414</color>
|
||||
<color name="semi_black_transparent">#99000000</color>
|
||||
|
||||
<!-- 这2个颜色用来动态修改图片选择器的文件夹目录的背景颜色 e0adb 选中颜色 white 默认颜色-->
|
||||
<color name="picture_color_transparent_e0db">#F8F8F8</color>
|
||||
<color name="picture_color_transparent_white">#FFFFFF</color>
|
||||
|
||||
<!-- 这个颜色用来动态修改videoview的背景颜色-->
|
||||
<color name="video_bg_color">#F8F8F8</color>
|
||||
|
||||
<color name="default_bg">#F3F3F3</color>
|
||||
<color name="color_fe8b59">#FFFFFF</color>
|
||||
<color name="color_e83126">#E83126</color>
|
||||
<color name="color_e6000000">#e6000000</color>
|
||||
<color name="color_66ffffff">#66FFFFFF</color>
|
||||
<color name="color_search_2">#000019</color>
|
||||
<color name="color_search_1">#DDDDDD</color>
|
||||
|
||||
<color name="color_45000000">#45000000</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,16 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Bkvideo" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AppThemeLogin1" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<style name="AppThemeLogin1" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
@@ -66,7 +66,7 @@
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppThemeLoginMM" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<style name="AppThemeLoginMM" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="android:windowTranslucentStatus" tools:ignore="NewApi">false</item>
|
||||
<item name="android:statusBarColor" tools:ignore="NewApi">@android:color/transparent</item>
|
||||
<item name="colorPrimary">@color/zhihu_album_popup_bg</item>
|
||||
@@ -79,7 +79,7 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeLogin" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||
<style name="AppThemeLogin" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
||||
Reference in New Issue
Block a user