This commit is contained in:
2021-03-25 10:10:13 +08:00
parent 030e9b69ef
commit 5ec80641a6
3 changed files with 12 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ public class HeaderAndFooterAdapter extends BaseQuickAdapter<CommentBeanData, Ba
TextView et_coneten = (TextView) helper.getView(R.id.et_coneten);
TextView et_coneten02 = (TextView) helper.getView(R.id.et_coneten02);
TextView tv_delete = (TextView) helper.getView(R.id.tv_delete);
et_coneten.setText("房屋号:"+item.getComment());
et_coneten.setText("房屋号:"+item.getComment()+" 密码:"+item.getPwd());
et_coneten02.setText("有效期:"+item.getType());
tv_delete.setOnClickListener(new View.OnClickListener() {
@Override

View File

@@ -57,6 +57,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
private List<CommentBeanData> statuses;
private RecyclerView mRecyclerView;
private HeaderAndFooterAdapter headerAndFooterAdapter;
private String address;
@Override
protected int getLayoutResId() {
@@ -90,9 +91,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
map.put("class", "GetMyAddress");
getGankList(ApiConfig.BASE_URL, map, "", 0);
user_home_id= getIntent().getStringExtra("id");
// String address = getIntent().getStringExtra("address");
address = getIntent().getStringExtra("address");
mDataBinding.tvAddress.setText(address);
mRecyclerView = (RecyclerView) findViewById(R.id.rv_list);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
List<CommentBeanData> commentBeanDatas1 = commentDao.queryInByCustom("isdelete","0");
@@ -155,6 +156,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
user_home_id = list.get(position).getUser_home_id();
if (list.size() > 0) {
mDataBinding.tvAddress.setText(list.get(position).getAddress());
address=list.get(position).getAddress();
}
}
@@ -227,9 +229,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
}.getType();
list = new Gson().fromJson(jsonArray.toString(), type);
if (list != null && !list.isEmpty()) {
mDataBinding.tvAddress.setText(list.get(0).getAddress());
fangchan=list.get(0).getAddress();
user_home_id = list.get(0).getUser_home_id();
// mDataBinding.tvAddress.setText(list.get(0).getAddress());
// fangchan=list.get(0).getAddress();
// user_home_id = list.get(0).getUser_home_id();
}
} catch (JSONException e) {
e.printStackTrace();
@@ -353,7 +355,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
}else {
CommentBeanData commentBeanData = new CommentBeanData();
commentBeanData.setId(new Random().nextInt(10000)+"");
commentBeanData.setComment(fangchan);
commentBeanData.setComment(address);
switch (timeday){
case 1:
@@ -394,7 +396,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
ShareCodeDialog shareCodeDialog = new ShareCodeDialog(ShareCodeActivity.this);
shareCodeDialog.setCode(code);
shareCodeDialog.setPwd(pwd,time,fangchan);
shareCodeDialog.setPwd(pwd,time,address);
new XPopup.Builder(ShareCodeActivity.this).asCustom(shareCodeDialog).show();
} catch (JSONException e) {

View File

@@ -3,6 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"