This commit is contained in:
jinyuera
2021-02-26 10:48:03 +08:00
parent 0098d5166a
commit 26b2a7163b
6 changed files with 223 additions and 7 deletions

View File

@@ -29,17 +29,17 @@
<remote-repository>
<option name="id" value="E:\AndroidSDK\extras\google\m2repository" />
<option name="name" value="E:\AndroidSDK\extras\google\m2repository" />
<option name="url" value="file:/E:/AndroidSDK/extras/google/m2repository/" />
<option name="url" value="file:/$PROJECT_DIR$/../AndroidSDK/extras/google/m2repository/" />
</remote-repository>
<remote-repository>
<option name="id" value="E:\AndroidSDK\extras\m2repository" />
<option name="name" value="E:\AndroidSDK\extras\m2repository" />
<option name="url" value="file:/E:/AndroidSDK/extras/m2repository/" />
<option name="url" value="file:/$PROJECT_DIR$/../AndroidSDK/extras/m2repository/" />
</remote-repository>
<remote-repository>
<option name="id" value="E:\AndroidSDK\extras\android\m2repository" />
<option name="name" value="E:\AndroidSDK\extras\android\m2repository" />
<option name="url" value="file:/E:/AndroidSDK/extras/android/m2repository/" />
<option name="url" value="file:/$PROJECT_DIR$/../AndroidSDK/extras/android/m2repository/" />
</remote-repository>
<remote-repository>
<option name="id" value="D:\sdk\extras\m2repository" />
@@ -71,5 +71,20 @@
<option name="name" value="C:\Users\Administrator\AppData\Local\Android\Sdk\extras\android\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/android/m2repository/" />
</remote-repository>
<remote-repository>
<option name="id" value="C:\Users\jinli\AppData\Local\Android\Sdk\extras\android\m2repository" />
<option name="name" value="C:\Users\jinli\AppData\Local\Android\Sdk\extras\android\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/android/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="C:\Users\jinli\AppData\Local\Android\Sdk\extras\google\m2repository" />
<option name="name" value="C:\Users\jinli\AppData\Local\Android\Sdk\extras\google\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/google/m2repository" />
</remote-repository>
<remote-repository>
<option name="id" value="C:\Users\jinli\AppData\Local\Android\Sdk\extras\m2repository" />
<option name="name" value="C:\Users\jinli\AppData\Local\Android\Sdk\extras\m2repository" />
<option name="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/extras/m2repository" />
</remote-repository>
</component>
</project>

View File

@@ -1068,13 +1068,13 @@ public class MainFragment extends BaseFragment<FragmentMainBinding> implements V
private OnRefreshLoadMoreListener onrefalshlister = new OnRefreshLoadMoreListener() {
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
page = 1;
getlist(page);
}
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
getlist(1);
page=1;
getlist(page);
}

View File

@@ -0,0 +1,58 @@
package com.sl.house_property.user;
import android.content.Context;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import com.lxj.xpopup.core.CenterPopupView;
import com.sl.house_property.R;
public class AddFamilyDialog extends CenterPopupView {
private OnAddFamilyListener listener;
private EditText etPhone;
public AddFamilyDialog(@NonNull Context context, OnAddFamilyListener listener) {
super(context);
this.listener = listener;
}
@Override
protected int getImplLayoutId() {
return R.layout.dialog_add_family;
}
@Override
protected void onCreate() {
super.onCreate();
etPhone = findViewById(R.id.et_input);
findViewById(R.id.btn_submit).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
String phone = etPhone.getText().toString().trim();
if (TextUtils.isEmpty(phone)||phone.length()!=11){
Toast.makeText(getContext(),"请输入正确手机号",Toast.LENGTH_SHORT).show();
return;
}
if (listener!=null){
listener.click(phone);
dismiss();
}
}
});
findViewById(R.id.iv_close).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
}
interface OnAddFamilyListener{
void click(String phone);
}
}

View File

@@ -97,7 +97,7 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
} else {
homeGridAdapterItemBinding.llS.setVisibility(VISIBLE);
}
if (homegridentityvArrayList.get(position).getIs_verify()!=null){
if (homegridentityvArrayList.get(position).getIs_verify() != null) {
if (homegridentityvArrayList.get(position).getIs_verify().equals("0")) {
homeGridAdapterItemBinding.tvYz.setText("未验证");
@@ -106,7 +106,18 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
}
}
homeGridAdapterItemBinding.tvFamily.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
AddFamilyDialog addFamilyDialog = new AddFamilyDialog(MyPropertyActivity.this, new AddFamilyDialog.OnAddFamilyListener() {
@Override
public void click(String phone) {
addFamily(phone);
}
});
new XPopup.Builder(MyPropertyActivity.this).asCustom(addFamilyDialog).show();
}
});
homeGridAdapterItemBinding.delete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -366,6 +377,51 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
});
}
private void addFamily(String phone) {
mGankLoader = new Loader();
final RegisterUser user =
Config.getInstance(MyPropertyActivity.this).getUser();
Map<String, String> map = new HashMap<>();
if (user != null) {
map.put("userid", user.getUserid());
} else {
map.put("userid", 0 + "");
}
map.put("app", "Cas");
map.put("class", "AddFamilyMember");
map.put("phone", phone);
map.put("username", "家庭成员");
map.put("sign", Md5.md5("Cas" + "AddFamilyMember" + Md5.secret));
mGankLoader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
@Override
public void call(Resultcode resultcode) {
if (!(resultcode.status == 0)) {
setToast(resultcode.msg);
}
if (resultcode.status == 0) {
setToast("提交成功");
Map<String, String> map = new HashMap<>();
if (user != null) {
map.put("userid", user.getUserid());
} else {
map.put("userid", 0 + "");
}
map.put("app", "Cas");
map.put("class", "MyHouseList");
//map.put("home_id", "GetHomeByPid");
map.put("sign", Md5.md5("Cas" + "MyHouseList" + Md5.secret));
getGankList(ApiConfig.BASE_URL, map, getResources().getString(R.string.requsting), 0);
}
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
progressDialog.dismiss();
setToast(getString(R.string.getdatafailure));
throwable.printStackTrace();
}
});
}
private void getGankList(String myurl, Map<String, String> map, String msg, final int requstecode) {
// progressDialog.setMessage(msg);

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300dp"
android:background="@drawable/_xpopup_round3_bg"
android:orientation="vertical"
android:padding="8dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:text="新增家庭成员"
android:textSize="16sp"
android:textColor="#000"
android:layout_weight="1"
android:gravity="center"
android:layout_height="30dp"/>
<ImageView
android:id="@+id/iv_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_close"/>
</LinearLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="#000"
android:inputType="number"
android:id="@+id/et_input"
android:layout_marginTop="16dp"
android:digits="0123456789"
android:hint="请输入手机号"
android:layout_marginRight="8dp"
android:layout_marginLeft="8dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注:添加新家庭成员需成员确认才添加成功"
android:textSize="12sp"
android:layout_marginRight="12dp"
android:layout_marginLeft="12dp"
/>
<Button
android:id="@+id/btn_submit"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="40dp"
android:text="确认添加"
android:textSize="14sp"
android:textColor="#fff"
android:background="@drawable/selector_common_btn"
/>
</LinearLayout>

View File

@@ -328,5 +328,25 @@
android:background="@mipmap/returnme"
android:paddingBottom="7dp"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_rec"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/tv_family"
android:text="+添加家庭成员"
android:textColor="#000"
android:textSize="16sp"
android:background="@drawable/pay_complete_ststus_background"
android:layout_width="match_parent"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:paddingLeft="10dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:layout_height="wrap_content"/>
</LinearLayout>
</layout>