d
This commit is contained in:
@@ -145,6 +145,7 @@ android {
|
||||
//引入ormlite
|
||||
implementation 'com.j256.ormlite:ormlite-core:5.1'
|
||||
implementation 'com.j256.ormlite:ormlite-android:5.1'
|
||||
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,28 @@ public class CommentBeanData extends DbBean implements Serializable {
|
||||
@DatabaseField(columnName = "comment")
|
||||
private String comment;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getPwd() {
|
||||
return pwd;
|
||||
}
|
||||
|
||||
public void setPwd(String pwd) {
|
||||
this.pwd = pwd;
|
||||
}
|
||||
|
||||
@DatabaseField(columnName = "code")
|
||||
private String code;
|
||||
|
||||
@DatabaseField(columnName = "pwd")
|
||||
private String pwd;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,21 @@ public class CommentDao {
|
||||
}
|
||||
return userAccountList;
|
||||
}
|
||||
public long deleteOne(CommentBeanData DATA){
|
||||
int id = 0;
|
||||
try {
|
||||
try {
|
||||
// id = userAccountDao.deleteById(DATA.getId());
|
||||
// id = userAccountDao.deleteById(Integer.parseInt(DATA.getId()));
|
||||
id = userAccountDao.delete(DATA);
|
||||
} catch (java.sql.SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
public long delete(List<CommentBeanData> DATA){
|
||||
int id = 0;
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.sl.house_property.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sl.house_property.MyDialog;
|
||||
import com.sl.house_property.R;
|
||||
|
||||
/**
|
||||
* Time: 2020/5/12
|
||||
* Author: jianbo
|
||||
* Description: 封装的自定义对话框
|
||||
*/
|
||||
public class DialogHelp {
|
||||
|
||||
Context mcontext;
|
||||
ClickListener clickListener;
|
||||
|
||||
public void showDownloadDialog(Context mcontext,final String s1, final String s2, final ClickListener clickListener) {
|
||||
this.clickListener=clickListener;
|
||||
this.mcontext=mcontext;
|
||||
final Dialog dialog = new Dialog(mcontext, R.style.DialogStyle);
|
||||
dialog.setCancelable(false);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
View view = LayoutInflater.from(mcontext).inflate(R.layout.item_dialogdiaozhi, null);
|
||||
dialog.setContentView(view);
|
||||
TextView tv_title = (TextView) view.findViewById(R.id.tv_title);
|
||||
TextView tvSexCancel = (TextView) view.findViewById(R.id.tvSexCancel);
|
||||
TextView tvPhone = (TextView) view.findViewById(R.id.tvPhone);
|
||||
TextView tvSexSend = (TextView) view.findViewById(R.id.tvSexSend);
|
||||
tv_title.setText("温馨提示");
|
||||
tvPhone.setText(Html.fromHtml(s1));
|
||||
tvSexSend.setText(s2);
|
||||
tvPhone.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
tvSexSend.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// if (pagetype.equals("3")) {
|
||||
// updClerkStore(updClerkStoreBean.getTrans_storeid(), updClerkStoreBean.getTrans_usertype(), updClerkStoreBean.getHand_uid());
|
||||
// } else {
|
||||
// updLeaveTime(updClerkStoreBean.getHand_uid());
|
||||
// }
|
||||
clickListener.confirm();
|
||||
dialog.dismiss();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
tvSexCancel.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
clickListener.cancle();
|
||||
dialog.dismiss();
|
||||
|
||||
}
|
||||
});
|
||||
Window mWindow = dialog.getWindow();
|
||||
WindowManager.LayoutParams lp = mWindow.getAttributes();
|
||||
lp.width = MyDialog.getScreenWidth(mcontext);
|
||||
mWindow.setGravity(Gravity.CENTER);
|
||||
// mWindow.setWindowAnimations(R.style.dialogAnim);
|
||||
mWindow.setAttributes(lp);
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public interface ClickListener{
|
||||
|
||||
void confirm();
|
||||
void cancle();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.text.TextPaint;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目名:erp
|
||||
* 包名:com.realize.erp.view.fragment
|
||||
* 文件名:BaseFragment
|
||||
* 创建者:任剑波
|
||||
* 创建时间:2017/9/29 17:42
|
||||
* 描述:TODO
|
||||
*/
|
||||
public class BaseFragment extends Fragment {
|
||||
|
||||
protected Activity mContext;
|
||||
|
||||
public static final int REQUEST_CALL_PERMISSION = 10111; //拨号请求码
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 申请指定的权限.
|
||||
*/
|
||||
public void requestPermission(int code, String... permissions) {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
requestPermissions(permissions, code);
|
||||
}
|
||||
}
|
||||
|
||||
/**s
|
||||
* 判断是否有指定的权限
|
||||
*/
|
||||
public boolean hasPermission(String... permissions) {
|
||||
|
||||
for (String permisson : permissions) {
|
||||
if (ContextCompat.checkSelfPermission(getActivity(), permisson)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void doOpenCamera() {
|
||||
|
||||
}
|
||||
|
||||
public void doWriteSDCard() {
|
||||
|
||||
}
|
||||
/**
|
||||
* 字体加粗
|
||||
*/
|
||||
protected void Thickening(TextView mLayTopTitle) {
|
||||
TextPaint tp = mLayTopTitle.getPaint();
|
||||
tp.setFakeBoldText(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启一个Activity
|
||||
*
|
||||
* @param clz 需要开启的Activity
|
||||
*/
|
||||
public void startActivity(Context mContext,Class<? extends Activity> clz) {
|
||||
startActivity(new Intent(mContext, clz));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 拨打电话(直接拨打)
|
||||
*
|
||||
* @param telPhone 电话
|
||||
*/
|
||||
public void call(String telPhone) {
|
||||
if (checkReadPermission(Manifest.permission.CALL_PHONE, REQUEST_CALL_PERMISSION)) {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_CALL);
|
||||
Uri phoneNum = Uri.parse("tel:" + telPhone);
|
||||
intent.setData(phoneNum);
|
||||
mContext.startActivity(intent);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 判断是否有某项权限
|
||||
*
|
||||
* @param string_permission 权限
|
||||
* @param request_code 请求码
|
||||
* @return
|
||||
*/
|
||||
public boolean checkReadPermission(String string_permission, int request_code) {
|
||||
boolean flag = false;
|
||||
if (ContextCompat.checkSelfPermission(getActivity(), string_permission) == PackageManager.PERMISSION_GRANTED) {//已有权限
|
||||
flag = true;
|
||||
} else {//申请权限
|
||||
ActivityCompat.requestPermissions(getActivity(), new String[]{string_permission}, request_code);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.db.CommentBeanData;
|
||||
import com.sl.house_property.db.dao.CommentDao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class HeaderAndFooterAdapter extends BaseQuickAdapter<CommentBeanData, BaseViewHolder> {
|
||||
DeleteListen deleteListen;
|
||||
public HeaderAndFooterAdapter(List<CommentBeanData> statuses) {
|
||||
super(R.layout.item_header_and_footer,statuses);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(final BaseViewHolder helper, final CommentBeanData item) {
|
||||
TextView tv_01 = (TextView) helper.getView(R.id.tv_01);
|
||||
final int layoutPosition = helper.getLayoutPosition()+1;
|
||||
tv_01.setText("临时密钥"+layoutPosition);
|
||||
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_coneten02.setText("有效期:"+item.getType());
|
||||
tv_delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// commentDao = new CommentDao(ShareCodeActivity.this);
|
||||
// processdetailsDao.delete(processdetailsBeans);
|
||||
deleteListen.itemDelete(helper.getLayoutPosition());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface DeleteListen{
|
||||
void itemDelete(int position);
|
||||
}
|
||||
public void delete(DeleteListen deleteListen){
|
||||
this.deleteListen=deleteListen;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.sl.house_property.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@SuppressLint("ValidFragment")
|
||||
public abstract class MobanFragment extends BaseFragment {
|
||||
public static final String ARG_PAGE = "ARG_PAGE";
|
||||
private boolean IS_LOADED = false;
|
||||
private static int mSerial = 0;
|
||||
private boolean isFirst = true;
|
||||
@SuppressLint("HandlerLeak")
|
||||
private Handler handler = new Handler() {
|
||||
public void handleMessage(Message msg) {
|
||||
Log.e("tag", "IS_LOADED=" + IS_LOADED);
|
||||
if (!IS_LOADED) {
|
||||
IS_LOADED = true;
|
||||
//请求我的客户已流失数据
|
||||
requesdata();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
private RelativeLayout rl_top;
|
||||
private RelativeLayout layTop_left_tv;
|
||||
|
||||
public MobanFragment() {
|
||||
|
||||
}
|
||||
public BaseQuickAdapter markingtwoAdapter;
|
||||
public void sendMessage() {
|
||||
Message message = handler.obtainMessage();
|
||||
message.sendToTarget();
|
||||
}
|
||||
|
||||
private String uid;
|
||||
public RecyclerView mMarkingFragmentRecyclerView;
|
||||
public int mNextRequestPage = 1;
|
||||
private static final int PAGE_SIZE = 10;
|
||||
View view;
|
||||
public View notDataView;
|
||||
public View errorView;
|
||||
public TextView mLayTopTitle;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mContext = getActivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
if (view != null) {
|
||||
ViewGroup parent = (ViewGroup) view.getParent();
|
||||
if (parent != null) {
|
||||
parent.removeView(view);
|
||||
}
|
||||
return view;
|
||||
}
|
||||
view = inflater.inflate(R.layout.kehumobanfragment, container, false);
|
||||
initView(view);
|
||||
//设置页和当前页一致时加载,防止预加载
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
sendMessage();
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
private void initView(View mContentView) {
|
||||
mMarkingFragmentRecyclerView = (RecyclerView) view.findViewById(R.id.marking_fragment_recyclerView);
|
||||
// notDataView = getActivity().getLayoutInflater().inflate(R.layout.empty_view, (ViewGroup) mMarkingFragmentRecyclerView.getParent(), false);
|
||||
// notDataView.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// // refresh();
|
||||
// }
|
||||
// });
|
||||
// errorView = getActivity().getLayoutInflater().inflate(R.layout.error_view, (ViewGroup) mMarkingFragmentRecyclerView.getParent(), false);
|
||||
// errorView.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// // onRefresh();
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
public void requesdata() {
|
||||
initAdapter();
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
public abstract void initAdapter();
|
||||
|
||||
|
||||
private void refresh() {
|
||||
mNextRequestPage = 1;
|
||||
markingtwoAdapter.setEnableLoadMore(false);//这里的作用是防止下拉刷新的时候还可以上拉加载
|
||||
requestData();
|
||||
}
|
||||
|
||||
public void loadMore() {
|
||||
requestData();
|
||||
}
|
||||
|
||||
public void setData(boolean isRefresh, List data) {
|
||||
mNextRequestPage++;
|
||||
final int size = data == null ? 0 : data.size();
|
||||
if (isRefresh) {
|
||||
markingtwoAdapter.setNewData(data);
|
||||
} else {
|
||||
if (size > 0) {
|
||||
markingtwoAdapter.addData(data);
|
||||
}
|
||||
}
|
||||
if (size < PAGE_SIZE) {
|
||||
//第一页如果不够一页就不显示没有更多数据布局
|
||||
markingtwoAdapter.loadMoreEnd(isRefresh);
|
||||
} else {
|
||||
markingtwoAdapter.loadMoreComplete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public abstract void requestData();
|
||||
|
||||
public void getAdpter(BaseQuickAdapter markingtwoAdapter){
|
||||
this.markingtwoAdapter=markingtwoAdapter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,11 +2,15 @@ package com.sl.house_property.discovery;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
@@ -16,6 +20,7 @@ import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.db.CommentBeanData;
|
||||
import com.sl.house_property.db.dao.CommentDao;
|
||||
import com.sl.house_property.dialog.DialogHelp;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
@@ -24,7 +29,9 @@ import org.json.JSONObject;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import entity.HomelistitemEntity;
|
||||
import entity.RegisterUser;
|
||||
@@ -43,6 +50,9 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
private String user_home_id;
|
||||
private String fangchan,time;
|
||||
private CommentDao commentDao;
|
||||
private List<CommentBeanData> statuses;
|
||||
private RecyclerView mRecyclerView;
|
||||
private HeaderAndFooterAdapter headerAndFooterAdapter;
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
@@ -70,6 +80,7 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
|
||||
|
||||
map.put("sign", Md5.md5("Cas" + "GetMyAddress" + Md5.secret));
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "GetMyAddress");
|
||||
@@ -78,6 +89,20 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
// String address = getIntent().getStringExtra("address");
|
||||
|
||||
|
||||
mRecyclerView = (RecyclerView) findViewById(R.id.rv_list);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
ArrayList<CommentBeanData> commentBeanDatas1 = commentDao.queryAll();
|
||||
statuses = new ArrayList<>();
|
||||
if (commentBeanDatas1.size() == 0) {
|
||||
} else {
|
||||
|
||||
statuses.addAll(commentBeanDatas1);
|
||||
}
|
||||
initAdapter();
|
||||
|
||||
|
||||
|
||||
|
||||
mDataBinding.myradio2.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
@@ -319,14 +344,18 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
return;
|
||||
}else {
|
||||
CommentBeanData commentBeanData = new CommentBeanData();
|
||||
commentBeanData.setId("1");
|
||||
commentBeanData.setId(new Random().nextInt(10000)+"");
|
||||
commentBeanData.setComment(fangchan);
|
||||
commentBeanData.setType(time);
|
||||
commentBeanData.setCode(code);
|
||||
commentBeanData.setPwd(pwd);
|
||||
if (null != commentDao.queryByCustom("Id", commentBeanData.getId()) && commentDao.queryByCustom("Id", commentBeanData.getId()).size() > 0) {
|
||||
commentDao.updateData(commentBeanData);
|
||||
} else {
|
||||
commentDao.addInsert(commentBeanData);
|
||||
}
|
||||
statuses.add(commentBeanData);
|
||||
headerAndFooterAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -352,4 +381,47 @@ public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databi
|
||||
});
|
||||
addSubscription(subscribe);
|
||||
}
|
||||
private void initAdapter() {
|
||||
|
||||
headerAndFooterAdapter = new HeaderAndFooterAdapter(statuses);
|
||||
headerAndFooterAdapter.openLoadAnimation();
|
||||
mRecyclerView.setAdapter(headerAndFooterAdapter);
|
||||
headerAndFooterAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
// Toast.makeText(ShareCodeActivity.this, "" + Integer.toString(position), Toast.LENGTH_LONG).show();
|
||||
|
||||
CommentBeanData commentBeanData = statuses.get(position);
|
||||
String code = commentBeanData.getCode();
|
||||
String pwd = commentBeanData.getPwd();
|
||||
String time = commentBeanData.getType();
|
||||
String fangchan = commentBeanData.getComment();
|
||||
ShareCodeDialog shareCodeDialog = new ShareCodeDialog(ShareCodeActivity.this);
|
||||
shareCodeDialog.setCode(code);
|
||||
shareCodeDialog.setPwd(pwd,time,fangchan);
|
||||
new XPopup.Builder(ShareCodeActivity.this).asCustom(shareCodeDialog).show();
|
||||
}
|
||||
});
|
||||
headerAndFooterAdapter.delete(new HeaderAndFooterAdapter.DeleteListen() {
|
||||
@Override
|
||||
public void itemDelete(final int position) {
|
||||
|
||||
new DialogHelp().showDownloadDialog(ShareCodeActivity.this, "确定要删除该密钥吗?", "确定", new DialogHelp.ClickListener() {
|
||||
@Override
|
||||
public void confirm() {
|
||||
CommentBeanData commentBeanData = statuses.get(position);
|
||||
commentDao.deleteOne(commentBeanData);
|
||||
//刷新数据
|
||||
statuses.remove(position);
|
||||
headerAndFooterAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancle() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,13 +125,19 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
|
||||
public void onClick(View view) {
|
||||
//此处接口返回的is_host是1,但是解析后是double类型的1.0,所以做了特别处理,如果日后有问题,看看后台返回的is_host值
|
||||
if (homegridentityvArrayList.get(position).getString13().equals("1.0")) {
|
||||
AddFamilyDialog addFamilyDialog = new AddFamilyDialog(MyPropertyActivity.this, new AddFamilyDialog.OnAddFamilyListener() {
|
||||
@Override
|
||||
public void click(String phone,String username) {
|
||||
addFamily(phone, homegridentityvArrayList.get(position).getString8(),username);
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(MyPropertyActivity.this).asCustom(addFamilyDialog).show();
|
||||
//必须审核通过的才能添加
|
||||
if(homegridentityvArrayList.get(position).getIs_verify().equals("1")){
|
||||
AddFamilyDialog addFamilyDialog = new AddFamilyDialog(MyPropertyActivity.this, new AddFamilyDialog.OnAddFamilyListener() {
|
||||
@Override
|
||||
public void click(String phone,String username) {
|
||||
addFamily(phone, homegridentityvArrayList.get(position).getString8(),username);
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(MyPropertyActivity.this).asCustom(addFamilyDialog).show();
|
||||
}else {
|
||||
setToast("房产信息未审核通过");
|
||||
}
|
||||
|
||||
} else {
|
||||
setToast("家庭成员不允许添加家庭成员");
|
||||
}
|
||||
@@ -422,19 +428,29 @@ public class MyPropertyActivity extends BaseActivity<ActivityMyPropertyBinding>
|
||||
}).show();
|
||||
}
|
||||
});
|
||||
if (homegridentityvArrayList.get(position).getString13().equals("1.0")) {
|
||||
homeGridAdapterItemBinding.llJt.setVisibility(VISIBLE);
|
||||
}else {
|
||||
homeGridAdapterItemBinding.llJt.setVisibility(View.GONE);
|
||||
}
|
||||
homeGridAdapterItemBinding.llJt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//此处接口返回的is_host是1,但是解析后是double类型的1.0,所以做了特别处理,如果日后有问题,看看后台返回的is_host值
|
||||
if (homegridentityvArrayList.get(position).getString13().equals("1.0")) {
|
||||
if (homegridentityvArrayList.get(position).isString9()){
|
||||
Intent intent = new Intent(MyPropertyActivity.this,MyAuthorizedFamilyHistory.class);
|
||||
intent.putExtra("usertitile", "授权家庭");
|
||||
intent.putExtra("homeId", homegridentityvArrayList.get(position).getString8());
|
||||
startActivityForResult(intent, 0);
|
||||
return;
|
||||
}}else {
|
||||
setToast("家庭成员不允许查看家庭成员");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
android:layout_margin="20dip"
|
||||
android:background="@drawable/retacal_background"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15dip"
|
||||
android:paddingLeft="0dip"
|
||||
android:paddingRight="15dip">
|
||||
|
||||
<LinearLayout
|
||||
@@ -180,13 +180,22 @@
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginTop="20dip"
|
||||
android:layout_marginRight="15dip"
|
||||
android:layout_marginBottom="50dip"
|
||||
android:layout_marginBottom="20dip"
|
||||
android:background="@drawable/selector_common_btn"
|
||||
android:gravity="center"
|
||||
android:padding="15dip"
|
||||
android:text="确认授权"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rv_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
84
app/src/main/res/layout/item_dialogdiaozhi.xml
Normal file
84
app/src/main/res/layout/item_dialogdiaozhi.xml
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="276dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/dialogwhite"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="109dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
android:text="温馨提示"
|
||||
android:textColor="#ff000000"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPhone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:autoLink = "web"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text=""
|
||||
android:textColor="#ff000000"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/light" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSexCancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp" />
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/light" />
|
||||
<TextView
|
||||
android:id="@+id/tvSexSend"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="调职"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
86
app/src/main/res/layout/item_header_and_footer.xml
Normal file
86
app/src/main/res/layout/item_header_and_footer.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="19dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rel_01"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="临时密钥1"
|
||||
android:textColor="#ff000000"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="删除"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingBottom="5dp"
|
||||
android:textSize="15sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/rel_02"
|
||||
android:layout_below="@+id/rel_01"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_coneten"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:text="房屋号:"
|
||||
android:textColor="#ff000000"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/rel_02"
|
||||
android:layout_marginLeft="23dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_coneten02"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff000000"
|
||||
android:paddingBottom="5dp"
|
||||
android:textSize="15sp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
16
app/src/main/res/layout/kehumobanfragment.xml
Normal file
16
app/src/main/res/layout/kehumobanfragment.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:omi="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/marking_fragment_recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user