Merge branch 'master' of https://gitee.com/renjianbo0118/HouseProperty
This commit is contained in:
1
.idea/runConfigurations.xml
generated
1
.idea/runConfigurations.xml
generated
@@ -3,7 +3,6 @@
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
|
||||
@@ -156,6 +156,8 @@ android {
|
||||
implementation 'com.lzy.net:okgo:3.0.4'
|
||||
implementation 'cn.jiguang.sdk:jpush:3.6.6'
|
||||
implementation 'cn.jiguang.sdk:jcore:2.3.8'
|
||||
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
|
||||
api 'io.reactivex.rxjava2:rxjava:2.1.5'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,15 +62,15 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
|
||||
//获取当前日期
|
||||
String gettimetwo = DateUtilss.gettimetwo();
|
||||
Log.e("当前日期",gettimetwo);
|
||||
if(gettimetwo.equals("2021年04月02日")||gettimetwo.equals("2021年04月03日")||gettimetwo.equals("2021年04月04日")||gettimetwo.equals("2021年04月05日")||gettimetwo.equals("2021年04月06日")){
|
||||
mDataBinding.rlzhuce.setVisibility(View.GONE);
|
||||
mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
|
||||
mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
mDataBinding.rlzhuce.setVisibility(View.GONE);
|
||||
mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
|
||||
mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
|
||||
}
|
||||
// if(gettimetwo.equals("2021年04月02日")||gettimetwo.equals("2021年04月03日")||gettimetwo.equals("2021年04月04日")||gettimetwo.equals("2021年04月05日")||gettimetwo.equals("2021年04月06日")){
|
||||
// mDataBinding.rlzhuce.setVisibility(View.GONE);
|
||||
// mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
|
||||
// mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
|
||||
// }else {
|
||||
// mDataBinding.rlzhuce.setVisibility(View.GONE);
|
||||
// mDataBinding.lyfuwu.setVisibility(View.VISIBLE);
|
||||
// mDataBinding.lyyinsi.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,16 +104,16 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
|
||||
setToast(getString(R.string.me_input_password_tip));
|
||||
return;
|
||||
}
|
||||
if (!mDataBinding.agreewhitemeg.isChecked()) {
|
||||
setToast("请先同意注册协议");
|
||||
|
||||
return;
|
||||
}
|
||||
if (!mDataBinding.agreewhitemegy.isChecked()) {
|
||||
setToast("请先同意隐私政策");
|
||||
|
||||
return;
|
||||
}
|
||||
// if (!mDataBinding.agreewhitemeg.isChecked()) {
|
||||
// setToast("请先同意注册协议");
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
// if (!mDataBinding.agreewhitemegy.isChecked()) {
|
||||
// setToast("请先同意隐私政策");
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("phone", phone);
|
||||
map.put("password", password);
|
||||
|
||||
@@ -51,6 +51,19 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
mDataBinding.getcode.setOnClickListener(this);
|
||||
|
||||
mDataBinding.register.setOnClickListener(this);
|
||||
|
||||
// BindHouseDialog bindHouseDialog = new BindHouseDialog(RegisterActivity.this);
|
||||
// bindHouseDialog.setUserId("1");
|
||||
// bindHouseDialog.setOnBindHouseListener(new BindHouseDialog.OnBindHouseListener() {
|
||||
// @Override
|
||||
// public void onSubmit() {
|
||||
//
|
||||
// setToast("提交成功");
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
// new XPopup.Builder(RegisterActivity.this).asCustom(bindHouseDialog).show();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,10 +24,13 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.sl.house_property.R;
|
||||
import com.tbruyelle.rxpermissions2.RxPermissions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
|
||||
public class SelectPicDanimicActivity extends Activity implements OnClickListener {
|
||||
private TextView btn_take_photo, btn_pick_photo, btn_cancel;
|
||||
@@ -53,17 +56,18 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
|
||||
|
||||
setContentView(R.layout.activity_select_pic_danimic);
|
||||
final String permission = Manifest.permission.CAMERA; //相机权限
|
||||
final String permission1 = Manifest.permission.WRITE_EXTERNAL_STORAGE; //写入数据权限
|
||||
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED
|
||||
|| ContextCompat.checkSelfPermission(this, permission1) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
requestPermissions(new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 2);
|
||||
}
|
||||
}
|
||||
// final String permission = Manifest.permission.CAMERA; //相机权限
|
||||
// final String permission1 = Manifest.permission.WRITE_EXTERNAL_STORAGE; //写入数据权限
|
||||
// if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED
|
||||
// || ContextCompat.checkSelfPermission(this, permission1) != PackageManager.PERMISSION_GRANTED) {
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// requestPermissions(new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
|
||||
// }
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 2);
|
||||
// }
|
||||
// }
|
||||
getPermissions();
|
||||
intent = getIntent();
|
||||
btn_take_photo = (Button) this.findViewById(R.id.btn_take_photo);
|
||||
btn_pick_photo = (Button) this.findViewById(R.id.btn_pick_photo);
|
||||
@@ -106,19 +110,60 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
fileolod = Environment.getExternalStorageDirectory().getPath() + string + filelodother;
|
||||
break;
|
||||
}
|
||||
if(entertype==100){
|
||||
try {
|
||||
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
|
||||
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
// if(entertype==100){
|
||||
// try {
|
||||
//
|
||||
//
|
||||
// Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// intent.putExtra("android.intent.extras.CAMERA_FACING", 1); // 调用前置摄像头
|
||||
// intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
// .fromFile(new File(fileolod)));
|
||||
// startActivityForResult(intent, 1);
|
||||
//
|
||||
//
|
||||
// //拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
// //有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
//
|
||||
//
|
||||
// /* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
|
||||
// Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
// System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
final String permission = Manifest.permission.CAMERA; //相机权限
|
||||
final String permission1 = Manifest.permission.WRITE_EXTERNAL_STORAGE; //写入数据权限
|
||||
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED
|
||||
|| ContextCompat.checkSelfPermission(this, permission1) != PackageManager.PERMISSION_GRANTED) { //先判断是否被赋予权限,没有则申请权限
|
||||
if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) { //给出权限申请说明
|
||||
Toast.makeText(SelectPicDanimicActivity.this, "No pemission", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
|
||||
}
|
||||
}else {
|
||||
if(entertype==100){
|
||||
try {
|
||||
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra("android.intent.extras.CAMERA_FACING", 1); // 调用前置摄像头
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
|
||||
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
|
||||
|
||||
/* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
@@ -126,12 +171,68 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getPermissions() {
|
||||
|
||||
|
||||
RxPermissions rxPermissions = new RxPermissions(this);
|
||||
rxPermissions.request(Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
.subscribe(new io.reactivex.Observer<Boolean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(Boolean aBoolean) {
|
||||
if (aBoolean) {
|
||||
if(entertype==100){
|
||||
try {
|
||||
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra("android.intent.extras.CAMERA_FACING", 1); // 调用前置摄像头
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
|
||||
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
|
||||
|
||||
/* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
|
||||
Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(SelectPicDanimicActivity.this, "获取权限失败,请重新授权", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
android:layout_marginRight="20dip"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/white">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/_xpopup_round3_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择小区"
|
||||
android:text="@{myentity.string1}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@@ -83,7 +82,6 @@
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择楼号"
|
||||
android:text="@{myentity.string2}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@@ -127,7 +125,6 @@
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择单元"
|
||||
android:text="@{myentity.string3}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@@ -171,7 +168,6 @@
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择房号"
|
||||
android:text="@{myentity.string4}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/fangchan"
|
||||
android:src="@mipmap/icon_dianzan"
|
||||
/>
|
||||
<TextView
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/fangchan"
|
||||
android:src="@mipmap/icon_renzheng"
|
||||
/>
|
||||
<TextView
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/fangchan"
|
||||
android:src="@mipmap/icon_shezhi"
|
||||
/>
|
||||
<TextView
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/fangchan"
|
||||
android:src="@mipmap/icon_privacy"
|
||||
/>
|
||||
<TextView
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/fangchan"
|
||||
android:src="@mipmap/icon_privacy"
|
||||
/>
|
||||
<TextView
|
||||
|
||||
|
||||
BIN
app/src/main/res/mipmap-xxhdpi/icon_dianzan.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_dianzan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_privacy.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_privacy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_renzheng.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_renzheng.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_shezhi.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_shezhi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
Reference in New Issue
Block a user