Merge branch 'master' of https://gitee.com/renjianbo0118/HouseProperty
This commit is contained in:
@@ -43,7 +43,7 @@ android {
|
||||
ndk {
|
||||
|
||||
//选择要添加的对应cpu类型的.so库。
|
||||
abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a', "x86"
|
||||
abiFilters 'armeabi-v7a'
|
||||
|
||||
}
|
||||
}
|
||||
@@ -140,6 +140,7 @@ android {
|
||||
implementation 'liji.library.dev:citypickerview:5.2.2'
|
||||
|
||||
implementation 'com.zhihu.android:matisse:0.5.2-beta2'
|
||||
implementation 'com.tencent.bugly:crashreport:latest.release' //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.2.0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
<application
|
||||
|
||||
android:usesCleartextTraffic="true"
|
||||
android:name="com.sl.house_property.MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@@ -298,6 +298,7 @@
|
||||
<activity android:name=".order.SettleActivity" />
|
||||
<activity android:name=".order.PayActivity" />
|
||||
<activity android:name=".discovery.HistoryRecordActivity" />
|
||||
<activity android:name=".discovery.ShareCodeActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
361
app/src/main/java/com/sl/house_property/BindHouseDialog.java
Normal file
361
app/src/main/java/com/sl/house_property/BindHouseDialog.java
Normal file
@@ -0,0 +1,361 @@
|
||||
package com.sl.house_property;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.selectpicker.OptionsPopupWindow;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import entity.MyHomequEntity;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import rx.functions.Action1;
|
||||
import utils.Md5;
|
||||
|
||||
public class BindHouseDialog extends CenterPopupView {
|
||||
|
||||
private TextView tvQu;
|
||||
private TextView tvLou;
|
||||
private TextView tvDan;
|
||||
private TextView tvFang;
|
||||
private EditText etName;
|
||||
private EditText etCardNumber;
|
||||
private String userId = "";
|
||||
Loader mGankLoader = new Loader();
|
||||
public ProgressDialog progressDialog;
|
||||
private MyHomequEntity mQu = null;
|
||||
private MyHomequEntity mLou = null;
|
||||
private MyHomequEntity mDan = null;
|
||||
private MyHomequEntity mFang = null;
|
||||
private OnBindHouseListener listener;
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public BindHouseDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_bind_house;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
progressDialog = new ProgressDialog(getContext());
|
||||
tvQu = findViewById(R.id.tv_qu);
|
||||
tvLou = findViewById(R.id.lou);
|
||||
tvDan = findViewById(R.id.dan);
|
||||
tvFang = findViewById(R.id.fang);
|
||||
etName = findViewById(R.id.et_name);
|
||||
etCardNumber = findViewById(R.id.et_cardNumber);
|
||||
findViewById(R.id.ll_qu).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userid", userId);
|
||||
map.put("app", "Trend");
|
||||
map.put("class", "GetHomeByPid");
|
||||
//map.put("home_id", "GetHomeByPid");
|
||||
map.put("sign", Md5.md5("Trend" + "GetHomeByPid" + Md5.secret));
|
||||
getGankList(ApiConfig.BASE_URL, map, 1);
|
||||
}
|
||||
});
|
||||
findViewById(R.id.ll_lou).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mQu == null) {
|
||||
Toast.makeText(getContext(), "请选择小区", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userid", userId);
|
||||
map.put("app", "Trend");
|
||||
map.put("class", "GetHomeByPid");
|
||||
map.put("home_id", mQu.getHome_id());
|
||||
//map.put("home_id", "GetHomeByPid");
|
||||
map.put("sign", Md5.md5("Trend" + "GetHomeByPid" + Md5.secret));
|
||||
getGankList(ApiConfig.BASE_URL, map, 2);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
findViewById(R.id.ll_dan).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mQu == null) {
|
||||
Toast.makeText(getContext(), "请选择小区", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (mLou == null) {
|
||||
Toast.makeText(getContext(), "请选择楼号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userid", userId);
|
||||
map.put("app", "Trend");
|
||||
map.put("class", "GetHomeByPid");
|
||||
map.put("home_id", mLou.getHome_id());
|
||||
//map.put("home_id", "GetHomeByPid");
|
||||
map.put("sign", Md5.md5("Trend" + "GetHomeByPid" + Md5.secret));
|
||||
getGankList(ApiConfig.BASE_URL, map, 3);
|
||||
}
|
||||
});
|
||||
findViewById(R.id.ll_fang).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mQu == null) {
|
||||
Toast.makeText(getContext(), "请选择小区", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (mLou == null) {
|
||||
Toast.makeText(getContext(), "请选择楼号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (mDan == null) {
|
||||
Toast.makeText(getContext(), "请选择单元", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userid", userId);
|
||||
map.put("app", "Trend");
|
||||
map.put("class", "GetHomeByPid");
|
||||
map.put("home_id", mDan.getHome_id());
|
||||
//map.put("home_id", "GetHomeByPid");
|
||||
map.put("sign", Md5.md5("Trend" + "GetHomeByPid" + Md5.secret));
|
||||
getGankList(ApiConfig.BASE_URL, map, 4);
|
||||
}
|
||||
});
|
||||
findViewById(R.id.tv_submit).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mQu == null) {
|
||||
Toast.makeText(getContext(), "请选择小区", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (mLou == null) {
|
||||
Toast.makeText(getContext(), "请选择楼号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (mDan == null) {
|
||||
Toast.makeText(getContext(), "请选择单元", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (mFang == null) {
|
||||
Toast.makeText(getContext(), "请选择单元", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
String name = etName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
Toast.makeText(getContext(), "请输入户主姓名", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
String cardNumber = etCardNumber.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(cardNumber)) {
|
||||
Toast.makeText(getContext(), "请输入身份证号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userid", userId);
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "AddMyHouse");
|
||||
map.put("home_id", mFang.getHome_id());
|
||||
map.put("relname", name);
|
||||
map.put("idcard", cardNumber);
|
||||
//map.put("home_id", "GetHomeByPid");
|
||||
map.put("sign", Md5.md5("Cas" + "AddMyHouse" + Md5.secret));
|
||||
getGankList(ApiConfig.BASE_URL, map, 5);
|
||||
}
|
||||
});
|
||||
findViewById(R.id.tv_cancel).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void getGankList(String myurl, Map<String, String> map, final int requstecode) {
|
||||
mGankLoader.getMovie(myurl, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
|
||||
if (!(resultcode.status == 0)) {
|
||||
Toast.makeText(getContext(), resultcode.msg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if (resultcode.status == 0) {
|
||||
if (requstecode == 1) {
|
||||
//选择区
|
||||
Gson gs = new Gson();
|
||||
ArrayList<LinkedTreeMap> adta = (ArrayList<LinkedTreeMap>) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
//final ArrayList<MyHomequEntity> list = null;
|
||||
Type type = new TypeToken<ArrayList<MyHomequEntity>>() {
|
||||
}.getType();
|
||||
final ArrayList<MyHomequEntity> list = new Gson().fromJson(s, type);
|
||||
final ArrayList<String> strings = new ArrayList<>();
|
||||
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
strings.add(list.get(i).getHome_name());
|
||||
}
|
||||
OptionsPopupWindow alarmOptionPop = new OptionsPopupWindow(getContext());
|
||||
alarmOptionPop.setPicker(strings);
|
||||
|
||||
alarmOptionPop.setOnoptionsSelectListener(new OptionsPopupWindow.OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int position, int option2, int options3) {
|
||||
mQu = list.get(position);
|
||||
tvQu.setText(mQu.getHome_name());
|
||||
mLou = null;
|
||||
tvLou.setText("请选择楼号");
|
||||
mDan = null;
|
||||
tvDan.setText("请选择单元");
|
||||
mFang = null;
|
||||
tvFang.setText("请选择房号");
|
||||
}
|
||||
});
|
||||
|
||||
alarmOptionPop.showAtLocation(getRootView(), Gravity.BOTTOM, 0, 0);
|
||||
|
||||
} else if (requstecode == 2) {
|
||||
//选择楼
|
||||
Gson gs = new Gson();
|
||||
ArrayList<LinkedTreeMap> adta = (ArrayList<LinkedTreeMap>) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
//final ArrayList<MyHomequEntity> list = null;
|
||||
Type type = new TypeToken<ArrayList<MyHomequEntity>>() {
|
||||
}.getType();
|
||||
final ArrayList<MyHomequEntity> list = new Gson().fromJson(s, type);
|
||||
final ArrayList<String> strings = new ArrayList<>();
|
||||
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
strings.add(list.get(i).getHome_name());
|
||||
}
|
||||
OptionsPopupWindow alarmOptionPop = new OptionsPopupWindow(getContext());
|
||||
alarmOptionPop.setPicker(strings);
|
||||
|
||||
alarmOptionPop.setOnoptionsSelectListener(new OptionsPopupWindow.OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int position, int option2, int options3) {
|
||||
mLou = list.get(position);
|
||||
tvLou.setText(mLou.getHome_name());
|
||||
|
||||
mDan = null;
|
||||
tvDan.setText("请选择单元");
|
||||
mFang = null;
|
||||
tvFang.setText("请选择房号");
|
||||
}
|
||||
});
|
||||
|
||||
alarmOptionPop.showAtLocation(getRootView(), Gravity.BOTTOM, 0, 0);
|
||||
} else if (requstecode == 3) {
|
||||
//选择单元
|
||||
Gson gs = new Gson();
|
||||
ArrayList<LinkedTreeMap> adta = (ArrayList<LinkedTreeMap>) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
//final ArrayList<MyHomequEntity> list = null;
|
||||
Type type = new TypeToken<ArrayList<MyHomequEntity>>() {
|
||||
}.getType();
|
||||
final ArrayList<MyHomequEntity> list = new Gson().fromJson(s, type);
|
||||
final ArrayList<String> strings = new ArrayList<>();
|
||||
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
strings.add(list.get(i).getHome_name());
|
||||
}
|
||||
OptionsPopupWindow alarmOptionPop = new OptionsPopupWindow(getContext());
|
||||
alarmOptionPop.setPicker(strings);
|
||||
|
||||
alarmOptionPop.setOnoptionsSelectListener(new OptionsPopupWindow.OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int position, int option2, int options3) {
|
||||
mDan = list.get(position);
|
||||
tvDan.setText(mDan.getHome_name());
|
||||
|
||||
mFang = null;
|
||||
tvFang.setText("请选择房号");
|
||||
}
|
||||
});
|
||||
|
||||
alarmOptionPop.showAtLocation(getRootView(), Gravity.BOTTOM, 0, 0);
|
||||
} else if (requstecode == 4) {
|
||||
//选择房号
|
||||
Gson gs = new Gson();
|
||||
ArrayList<LinkedTreeMap> adta = (ArrayList<LinkedTreeMap>) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
//final ArrayList<MyHomequEntity> list = null;
|
||||
Type type = new TypeToken<ArrayList<MyHomequEntity>>() {
|
||||
}.getType();
|
||||
final ArrayList<MyHomequEntity> list = new Gson().fromJson(s, type);
|
||||
final ArrayList<String> strings = new ArrayList<>();
|
||||
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
strings.add(list.get(i).getHome_name());
|
||||
}
|
||||
OptionsPopupWindow alarmOptionPop = new OptionsPopupWindow(getContext());
|
||||
alarmOptionPop.setPicker(strings);
|
||||
|
||||
alarmOptionPop.setOnoptionsSelectListener(new OptionsPopupWindow.OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int position, int option2, int options3) {
|
||||
mFang = list.get(position);
|
||||
tvFang.setText(mFang.getHome_name());
|
||||
}
|
||||
});
|
||||
|
||||
alarmOptionPop.showAtLocation(getRootView(), Gravity.BOTTOM, 0, 0);
|
||||
} else if (requstecode == 5) {
|
||||
if (listener != null) {
|
||||
listener.onSubmit();
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
Toast.makeText(getContext(), getContext().getString(R.string.getdatafailure), Toast.LENGTH_SHORT).show();
|
||||
// setToast(getString(R.string.getdatafailure));
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setOnBindHouseListener(OnBindHouseListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
interface OnBindHouseListener {
|
||||
void onSubmit();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -71,18 +71,18 @@ public class EntranceguardControl2Activity extends BaseActivity<ActivityEntrance
|
||||
}
|
||||
},0,null,0,null,0,null,"");
|
||||
list= (ArrayList<HomelistitemEntity>) getIntent().getSerializableExtra("list");
|
||||
for (int i = 0; i <list.size() ; i++) {
|
||||
RadioButton radioButton= (RadioButton) LayoutInflater.from(this).inflate(R.layout.radiort_item_for_entrangurdcontrol1,null);
|
||||
radioButton.setText(" "+list.get(i).getAddress());
|
||||
mDataBinding.myradio.addView(radioButton);
|
||||
radioButton.setId(1000+i); }
|
||||
mDataBinding.myradio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
aposition=i-1000;
|
||||
nowstringhiuse=list.get(aposition).getAddress();
|
||||
}
|
||||
});
|
||||
// for (int i = 0; i <list.size() ; i++) {
|
||||
// RadioButton radioButton= (RadioButton) LayoutInflater.from(this).inflate(R.layout.radiort_item_for_entrangurdcontrol1,null);
|
||||
// radioButton.setText(" "+list.get(i).getAddress());
|
||||
// mDataBinding.myradio.addView(radioButton);
|
||||
// radioButton.setId(1000+i); }
|
||||
// mDataBinding.myradio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
// @Override
|
||||
// public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
// aposition=i-1000;
|
||||
// nowstringhiuse=list.get(aposition).getAddress();
|
||||
// }
|
||||
// });
|
||||
final int[] timeday = {0};
|
||||
mDataBinding.myradio2.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
||||
@@ -90,8 +90,8 @@ public class Main2Fragment extends BaseFragment<FragmentMain2Binding> implements
|
||||
if (context instanceof OnFragmentInteractionListener) {
|
||||
mListener = (OnFragmentInteractionListener) context;
|
||||
} else {
|
||||
throw new RuntimeException(context.toString()
|
||||
+ " must implement OnFragmentInteractionListener");
|
||||
// throw new RuntimeException(context.toString()
|
||||
// + " must implement OnFragmentInteractionListener");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,9 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> {
|
||||
mDataBinding.userImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
Intent intent = new Intent(getActivity(), MyUserMessage.class);
|
||||
intent.putExtra("usertitile", "个人信息");
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
initTopView();
|
||||
@@ -218,6 +220,15 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> {
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder7.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 1);
|
||||
intent.putExtra("orderType", 4);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -245,6 +256,15 @@ public class Main4Fragment extends BaseFragment<FragmentMain4Binding> {
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.tvOrder8.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(getActivity(), OrderActivity.class);
|
||||
intent.putExtra("type", 2);
|
||||
intent.putExtra("orderType", 4);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// private void initMyReycyView() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,14 +15,14 @@ import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.sl.house_property.cart.CartFragment;
|
||||
import com.sl.house_property.databinding.ActivityMainTabBinding;
|
||||
import com.sl.house_property.discovery.DiscoveryFragment;
|
||||
import com.sl.house_property.discovery.LikeFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import tools.Config;
|
||||
import utils.UtilHelpers;
|
||||
|
||||
public class MainTabActivity extends BaseActivity<ActivityMainTabBinding>
|
||||
implements View.OnClickListener, MainFragment.OnFragmentInteractionListener,
|
||||
implements View.OnClickListener,
|
||||
Main1Fragment.OnFragmentInteractionListener,
|
||||
Main2Fragment.OnFragmentInteractionListener,
|
||||
Main3Fragment.OnFragmentInteractionListener,
|
||||
@@ -44,6 +44,7 @@ public class MainTabActivity extends BaseActivity<ActivityMainTabBinding>
|
||||
private Main3Fragment fragment2;
|
||||
private CartFragment fragment3;
|
||||
private Main4Fragment fragment4;
|
||||
private LikeFragment likeFragment;
|
||||
private Fragment currentFragment;
|
||||
|
||||
private int myeditcode = 1000;
|
||||
@@ -51,7 +52,7 @@ public class MainTabActivity extends BaseActivity<ActivityMainTabBinding>
|
||||
|
||||
private int nowradioId;
|
||||
|
||||
// @Override
|
||||
// @Override
|
||||
// public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
// switch (ev.getAction()) {
|
||||
// case MotionEvent.ACTION_DOWN:
|
||||
@@ -62,30 +63,36 @@ public class MainTabActivity extends BaseActivity<ActivityMainTabBinding>
|
||||
// return super.dispatchTouchEvent(ev);
|
||||
//
|
||||
// }
|
||||
public void visibilyBottom(int isVisibily){
|
||||
public void visibilyBottom(int isVisibily) {
|
||||
findViewById(R.id.rl_bottom).setVisibility(isVisibily);
|
||||
}
|
||||
|
||||
//2. 保存MyOnTouchListener接口的列表
|
||||
private ArrayList<MyOnTouchListener> onTouchListeners = new ArrayList<MyOnTouchListener>();
|
||||
|
||||
//1.触摸事件接口
|
||||
public interface MyOnTouchListener {
|
||||
public boolean onTouch(MotionEvent ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
for (MyOnTouchListener listener : onTouchListeners) {
|
||||
// listener.onTouch(ev);
|
||||
// listener.onTouch(ev);
|
||||
}
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
//4.提供给Fragment通过getActivity()方法来注册自己的触摸事件的方法
|
||||
public void registerMyOnTouchListener(MyOnTouchListener myOnTouchListener) {
|
||||
onTouchListeners.add(myOnTouchListener);
|
||||
}
|
||||
|
||||
//5.提供给Fragment通过getActivity()方法来注销自己的触摸事件的方法
|
||||
public void unregisterMyOnTouchListener(MyOnTouchListener myOnTouchListener) {
|
||||
onTouchListeners.remove(myOnTouchListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
|
||||
@@ -194,6 +201,15 @@ public class MainTabActivity extends BaseActivity<ActivityMainTabBinding>
|
||||
}
|
||||
currentFragment = fragment4;
|
||||
break;
|
||||
case R.id.like:
|
||||
if (likeFragment == null) {
|
||||
likeFragment = LikeFragment.newInstance();
|
||||
fragmentTransaction.add(R.id.mycontent, likeFragment, "likeFragment");
|
||||
} else {
|
||||
fragmentTransaction.show(likeFragment);
|
||||
}
|
||||
currentFragment = likeFragment;
|
||||
break;
|
||||
}
|
||||
try {
|
||||
fragmentTransaction.commit();
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.support.multidex.MultiDex;
|
||||
import android.util.Log;
|
||||
|
||||
import com.lzy.ninegrid.NineGridView;
|
||||
import com.tencent.bugly.Bugly;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -62,6 +63,7 @@ public class MyApplication extends Application{
|
||||
//
|
||||
// CrashHandler crashHandler = CrashHandler.getInstance();
|
||||
// crashHandler.init(this);
|
||||
Bugly.init(this,"d45325664f",false);
|
||||
System.setProperty("http.proxyHost", "haotian.hoheng.cn");
|
||||
System.setProperty("http.proxyPort", "8080");
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.cutil.RegexUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.sl.house_property.databinding.ActivityRegisterBinding;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -17,9 +18,10 @@ import java.util.Map;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import entity.RegisterUser;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import http.ApiConfig;
|
||||
import rx.Subscription;
|
||||
import rx.functions.Action1;
|
||||
import utils.Md5;
|
||||
@@ -30,7 +32,6 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
private Loader mGankLoader;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_register;
|
||||
@@ -39,14 +40,14 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
progressDialog=new ProgressDialog(RegisterActivity.this);
|
||||
progressDialog = new ProgressDialog(RegisterActivity.this);
|
||||
|
||||
setAbr(getString(R.string.register), new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
finish();
|
||||
}
|
||||
},0,null,0,null,0,null,"");
|
||||
}, 0, null, 0, null, 0, null, "");
|
||||
mDataBinding.getcode.setOnClickListener(this);
|
||||
|
||||
mDataBinding.register.setOnClickListener(this);
|
||||
@@ -54,37 +55,37 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()){
|
||||
switch (view.getId()) {
|
||||
|
||||
|
||||
case R.id.getcode:
|
||||
if(mDataBinding.registerphone.getText().toString().length()<1){
|
||||
case R.id.getcode:
|
||||
if (mDataBinding.registerphone.getText().toString().length() < 1) {
|
||||
setToast(getString(R.string.me_input_phone_tip));
|
||||
return;
|
||||
}
|
||||
if(!RegexUtils.isMobileExact(mDataBinding.registerphone.getText().toString())){
|
||||
if (!RegexUtils.isMobileExact(mDataBinding.registerphone.getText().toString())) {
|
||||
setToast(getString(R.string.me_input_phone_error_tip));
|
||||
return;
|
||||
}
|
||||
getMesgCode(R.id.getcode);
|
||||
break;
|
||||
case R.id.register:
|
||||
if(mDataBinding.registerphone.getText().toString().length()==0){
|
||||
case R.id.register:
|
||||
if (mDataBinding.registerphone.getText().toString().length() == 0) {
|
||||
setToast(getString(R.string.me_input_phone_tip));
|
||||
return;
|
||||
}
|
||||
if(!RegexUtils.isMobileExact(mDataBinding.registerphone.getText().toString())){
|
||||
if (!RegexUtils.isMobileExact(mDataBinding.registerphone.getText().toString())) {
|
||||
setToast(getString(R.string.me_input_phone_error_tip));
|
||||
return;
|
||||
}
|
||||
|
||||
if(mDataBinding.logincode.getText().toString().length()<1){
|
||||
if (mDataBinding.logincode.getText().toString().length() < 1) {
|
||||
setToast(getString(R.string.me_input_verification_tip));
|
||||
return;
|
||||
}
|
||||
|
||||
String password = mDataBinding.editpaw.getText().toString();
|
||||
if(password.length()<1){
|
||||
String password = mDataBinding.editpaw.getText().toString();
|
||||
if (password.length() < 1) {
|
||||
setToast(getString(R.string.me_input_password_tip));
|
||||
return;
|
||||
}
|
||||
@@ -93,24 +94,24 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
if(!tools.RegexUtils.checkPassword(password)){
|
||||
if (!tools.RegexUtils.checkPassword(password)) {
|
||||
setToast(getString(R.string.me_input_password_fail_tip));
|
||||
return;
|
||||
}
|
||||
|
||||
String againPassword = mDataBinding.editagainpaw.getText().toString().trim();
|
||||
if(againPassword.length()<1){
|
||||
if (againPassword.length() < 1) {
|
||||
setToast(getString(R.string.me_input_again_password_tip));
|
||||
return;
|
||||
}
|
||||
|
||||
if(!mDataBinding.editpaw.getText().toString().trim().equals(mDataBinding.editagainpaw.getText().toString().trim())){
|
||||
if (!mDataBinding.editpaw.getText().toString().trim().equals(mDataBinding.editagainpaw.getText().toString().trim())) {
|
||||
setToast(getString(R.string.me_password_Inconsistent_tip));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(!mDataBinding.agreewhitemeg.isChecked()){
|
||||
if (!mDataBinding.agreewhitemeg.isChecked()) {
|
||||
setToast("请先同意注册协议");
|
||||
|
||||
return;
|
||||
@@ -122,14 +123,14 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
}
|
||||
|
||||
private void register(int id) {
|
||||
Map<String,String> map=new HashMap<>();
|
||||
map.put("phone",mDataBinding.registerphone.getText().toString().trim());
|
||||
map.put("password",mDataBinding.editpaw.getText().toString().trim());
|
||||
map.put("code",mDataBinding.logincode.getText().toString().trim());
|
||||
map.put("sign", Md5.md5("Cas"+"UserReg"+Md5.secret));
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("phone", mDataBinding.registerphone.getText().toString().trim());
|
||||
map.put("password", mDataBinding.editpaw.getText().toString().trim());
|
||||
map.put("code", mDataBinding.logincode.getText().toString().trim());
|
||||
map.put("sign", Md5.md5("Cas" + "UserReg" + Md5.secret));
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "UserReg");
|
||||
getGankList(ApiConfig.BASE_URL,map, getResources().getString(R.string.registering),id);
|
||||
getGankList(ApiConfig.BASE_URL, map, getResources().getString(R.string.registering), id);
|
||||
}
|
||||
|
||||
|
||||
@@ -139,13 +140,13 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
/* getRegisterCode.setTextColor(getResources().getColor(R.color.regitergrey));*/
|
||||
|
||||
mDataBinding.getcode.setClickable(false);
|
||||
Map<String,String> map=new HashMap<>();
|
||||
map.put("sendto",mDataBinding.registerphone.getText().toString().trim());
|
||||
map.put("action","register");
|
||||
map.put("sign", Md5.md5("Cas"+"SendCode"+Md5.secret));
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("sendto", mDataBinding.registerphone.getText().toString().trim());
|
||||
map.put("action", "register");
|
||||
map.put("sign", Md5.md5("Cas" + "SendCode" + Md5.secret));
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "SendCode");
|
||||
getGankList(ApiConfig.BASE_URL,map, getResources().getString(R.string.getthecodenow),id);
|
||||
getGankList(ApiConfig.BASE_URL, map, getResources().getString(R.string.getthecodenow), id);
|
||||
// map = new HashMap<String, Object>();
|
||||
// map.put("telephone", editPhoneNo.getText().toString().trim());
|
||||
// getAsyTask(1, map, HttpUrl.registerUser(), "正在获取验证码", HttpNet.PROGRESSVISIBLE, HttpNet.POSTTYPE);//联网
|
||||
@@ -164,34 +165,43 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
progressDialog.dismiss();
|
||||
//setToast(1, getString(R.string.timeout));
|
||||
}
|
||||
},13000);
|
||||
mGankLoader = new Loader();
|
||||
}, 13000);
|
||||
mGankLoader = new Loader();
|
||||
/* Map<String,String> map=new HashMap<String,String>();
|
||||
map.put("phone");*/
|
||||
Subscription subscription = mGankLoader.getMovie(myurl,map).subscribe(new Action1<Resultcode>() {
|
||||
Subscription subscription = mGankLoader.getMovie(myurl, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
//setToast(0,resultcode.status);
|
||||
if((!(resultcode.status==0))){
|
||||
setToast( resultcode.msg);
|
||||
if ((!(resultcode.status == 0))) {
|
||||
setToast(resultcode.msg);
|
||||
mDataBinding.getcode.setClickable(true);
|
||||
return;
|
||||
}
|
||||
switch (getcode1) {
|
||||
case R.id.getcode:
|
||||
setToast( getString(R.string.megissucess));
|
||||
startTimer();
|
||||
case R.id.getcode:
|
||||
setToast(getString(R.string.megissucess));
|
||||
startTimer();
|
||||
break;
|
||||
|
||||
case R.id.register:
|
||||
setToast( getString(R.string.registersucess));
|
||||
mDataBinding.getRoot().postDelayed(new Runnable() {
|
||||
setToast(getString(R.string.registersucess));
|
||||
Gson gs = new Gson();
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
RegisterUser user = gs.fromJson(s, RegisterUser.class);//把JSON字符串转为对象
|
||||
BindHouseDialog bindHouseDialog = new BindHouseDialog(RegisterActivity.this);
|
||||
bindHouseDialog.setUserId(user.getUserid());
|
||||
bindHouseDialog.setOnBindHouseListener(new BindHouseDialog.OnBindHouseListener() {
|
||||
@Override
|
||||
public void run() {
|
||||
public void onSubmit() {
|
||||
|
||||
setToast("提交成功");
|
||||
finish();
|
||||
}
|
||||
},1500);
|
||||
});
|
||||
new XPopup.Builder(RegisterActivity.this).asCustom(bindHouseDialog).show();
|
||||
|
||||
break;
|
||||
|
||||
@@ -213,7 +223,7 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
addSubscription(subscription);
|
||||
}
|
||||
|
||||
private void startTimer(){
|
||||
private void startTimer() {
|
||||
final Timer timer = new Timer();
|
||||
final Handler handler = new Handler() {
|
||||
@Override
|
||||
@@ -249,9 +259,10 @@ public class RegisterActivity extends BaseActivity<ActivityRegisterBinding> impl
|
||||
|
||||
/**
|
||||
* 用户协议
|
||||
*
|
||||
* @param v v
|
||||
*/
|
||||
public void agreementEvent(View v){
|
||||
public void agreementEvent(View v) {
|
||||
Intent intent = new Intent(this, RegisterAgreementActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ public class DiscoveryFragment extends BaseFragment<FragmentDiscoveryBinding> im
|
||||
mDataBinding.tvSendComment.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.e("click", "comment");
|
||||
|
||||
MainTabActivity activity = (MainTabActivity) getActivity();
|
||||
CommonUtils.hideSoftInput(getContext(), mDataBinding.etComment);
|
||||
mDataBinding.llComment.setVisibility(View.GONE);
|
||||
@@ -492,7 +492,7 @@ public class DiscoveryFragment extends BaseFragment<FragmentDiscoveryBinding> im
|
||||
|
||||
if (discoveryListEntity.getPic().size() > 0) {
|
||||
|
||||
Log.e("pic", discoveryListEntity.getPic().get(0));
|
||||
// Log.e("pic", discoveryListEntity.getPic().get(0));
|
||||
for (int i = 0; i < discoveryListEntity.getPic().size(); i++) {
|
||||
if (discoveryListEntity.getPic().get(i).endsWith(".mp4") || discoveryListEntity.getPic().get(i).endsWith(".avi")) {
|
||||
ImageInfo imageInfo = new ImageInfo();
|
||||
@@ -579,7 +579,7 @@ public class DiscoveryFragment extends BaseFragment<FragmentDiscoveryBinding> im
|
||||
|
||||
BaseRecycleViewAdapter baseRecycleViewAdapter = (BaseRecycleViewAdapter) mDataBinding.recyView.getAdapter();
|
||||
baseRecycleViewAdapter.setData(discoveryListEntities);
|
||||
Log.e("sizi", discoveryListEntities.size() + "");
|
||||
// Log.e("sizi", discoveryListEntities.size() + "");
|
||||
// int count = jsonObject.getInt("count");
|
||||
if (o.isEmpty()) {
|
||||
mDataBinding.dw.finishLoadMoreWithNoMoreData();
|
||||
|
||||
@@ -139,7 +139,7 @@ public class GoodsInfoDialog extends BottomPopupView {
|
||||
|
||||
}
|
||||
|
||||
interface OnGoodsSelectPropertyListener {
|
||||
public interface OnGoodsSelectPropertyListener {
|
||||
void onSelect(String code, int num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,12 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -19,9 +22,8 @@ import com.google.gson.reflect.TypeToken;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.lzy.ninegrid.ImageInfo;
|
||||
import com.lzy.ninegrid.preview.NineGridViewClickAdapter;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.MainFragment;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.ItemCommentBinding;
|
||||
import com.sl.house_property.databinding.ItemDiscoveryBinding;
|
||||
@@ -55,6 +57,8 @@ public class HistoryRecordActivity extends BaseActivity<LayoutHistoryRecordBindi
|
||||
private String userId;
|
||||
private Loader loader;
|
||||
private ArrayList<DiscoveryListEntity> discoveryListEntities = new ArrayList<>();
|
||||
private ArrayList<Fragment> fragments;
|
||||
private String[] strings;
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
@@ -73,60 +77,93 @@ public class HistoryRecordActivity extends BaseActivity<LayoutHistoryRecordBindi
|
||||
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
|
||||
.init();
|
||||
userId = getIntent().getStringExtra("userId");
|
||||
String userName = getIntent().getStringExtra("userName");
|
||||
mDataBinding.tvTitle.setText(userName);
|
||||
|
||||
// mDataBinding.tvTitle.setText(userName);
|
||||
mDataBinding.left.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
mDataBinding.tv1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
if (type == 2) {
|
||||
type = 1;
|
||||
page = 1;
|
||||
getData();
|
||||
mDataBinding.tv1.setTextColor(getResources().getColor(R.color.white));
|
||||
mDataBinding.tv1.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
mDataBinding.tv2.setTextColor(getResources().getColor(R.color.black));
|
||||
mDataBinding.tv2.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
}
|
||||
});
|
||||
mDataBinding.tv2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (type == 1) {
|
||||
type = 2;
|
||||
page = 1;
|
||||
getData();
|
||||
mDataBinding.tv2.setTextColor(getResources().getColor(R.color.white));
|
||||
mDataBinding.tv2.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
mDataBinding.tv1.setTextColor(getResources().getColor(R.color.black));
|
||||
mDataBinding.tv1.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
}
|
||||
});
|
||||
mDataBinding.dw.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
getData();
|
||||
}
|
||||
});
|
||||
intRecycleView();
|
||||
mDataBinding.dw.autoRefresh();
|
||||
strings = new String[2];
|
||||
strings[0] = "说说";
|
||||
strings[1] = "商品";
|
||||
fragments = new ArrayList<>();
|
||||
fragments.add(HistoryRecordFragment.newInstance(1, userId));
|
||||
fragments.add(HistoryRecordFragment.newInstance(2, userId));
|
||||
MyViewPagerAdapter myViewPagerAdapter = new MyViewPagerAdapter(getSupportFragmentManager());
|
||||
mDataBinding.fl.setAdapter(myViewPagerAdapter);
|
||||
mDataBinding.tb.setupWithViewPager(mDataBinding.fl);
|
||||
// mDataBinding.tv1.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
//
|
||||
// if (type == 2) {
|
||||
// type = 1;
|
||||
// page = 1;
|
||||
// getData();
|
||||
// mDataBinding.tv1.setTextColor(getResources().getColor(R.color.white));
|
||||
// mDataBinding.tv1.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
// mDataBinding.tv2.setTextColor(getResources().getColor(R.color.black));
|
||||
// mDataBinding.tv2.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// mDataBinding.tv2.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// if (type == 1) {
|
||||
// type = 2;
|
||||
// page = 1;
|
||||
// getData();
|
||||
// mDataBinding.tv2.setTextColor(getResources().getColor(R.color.white));
|
||||
// mDataBinding.tv2.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
// mDataBinding.tv1.setTextColor(getResources().getColor(R.color.black));
|
||||
// mDataBinding.tv1.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// mDataBinding.dw.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
// @Override
|
||||
// public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
// getData();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// page = 1;
|
||||
// getData();
|
||||
// }
|
||||
// });
|
||||
// intRecycleView();
|
||||
// mDataBinding.dw.autoRefresh();
|
||||
}
|
||||
|
||||
|
||||
|
||||
class MyViewPagerAdapter extends FragmentPagerAdapter {
|
||||
public MyViewPagerAdapter(FragmentManager fm) {
|
||||
super(fm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return fragments.get(position);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragments.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return strings[position];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void intRecycleView() {
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lzy.ninegrid.ImageInfo;
|
||||
import com.lzy.ninegrid.preview.NineGridViewClickAdapter;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.sl.house_property.BaseFragment;
|
||||
import com.sl.house_property.Main2Fragment;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.FragmentHistoryRecordBinding;
|
||||
import com.sl.house_property.databinding.ItemCommentBinding;
|
||||
import com.sl.house_property.databinding.ItemDiscoveryBinding;
|
||||
import com.squareup.picasso.Picasso;
|
||||
import com.squareup.picasso.Target;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import adapter.BaseRecycleViewAdapter;
|
||||
import entity.DiscoveryListEntity;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import my_view.tao_bao_refresh.FullyGridLayoutManager;
|
||||
import rx.Subscription;
|
||||
import rx.functions.Action1;
|
||||
import tools.PicassoRoundTransform;
|
||||
import utils.DateUtils;
|
||||
import utils.Md5;
|
||||
|
||||
public class HistoryRecordFragment extends BaseFragment<FragmentHistoryRecordBinding> {
|
||||
private Context context;
|
||||
private int type = 2;
|
||||
private int page = 1;
|
||||
private String userId;
|
||||
private Loader loader;
|
||||
private ArrayList<DiscoveryListEntity> discoveryListEntities = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_history_record;
|
||||
}
|
||||
|
||||
public static HistoryRecordFragment newInstance(int param1, String param2) {
|
||||
HistoryRecordFragment fragment = new HistoryRecordFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("param1", param1);
|
||||
args.putString("param2", param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
type = getArguments().getInt("param1");
|
||||
userId = getArguments().getString("param2");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
|
||||
|
||||
context = getContext();
|
||||
loader = new Loader();
|
||||
mDataBinding.dw.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
getData();
|
||||
}
|
||||
});
|
||||
intRecycleView();
|
||||
mDataBinding.dw.autoRefresh();
|
||||
}
|
||||
|
||||
|
||||
private void intRecycleView() {
|
||||
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
|
||||
mDataBinding.recyView.setNestedScrollingEnabled(false);//禁止rcyc嵌套滑动
|
||||
mDataBinding.recyView.setLayoutManager(linearLayoutManager);
|
||||
BaseRecycleViewAdapter<DiscoveryListEntity, ItemDiscoveryBinding> baseRecycleViewAdapter = new BaseRecycleViewAdapter(context, R.layout.item_discovery);
|
||||
baseRecycleViewAdapter.setHasStableIds(true);
|
||||
|
||||
discoveryListEntities = new ArrayList<>();
|
||||
baseRecycleViewAdapter.setOnBindViewHolder(new BaseRecycleViewAdapter.BindView() {
|
||||
@Override
|
||||
public void onBindViewHolder(Object b, final int position) {
|
||||
if (!(position >= discoveryListEntities.size())) {
|
||||
final ItemDiscoveryBinding homeGridAdapterItemBinding = (ItemDiscoveryBinding) b;
|
||||
// homeGridAdapterItemBinding.setMyentity(discoveryListEntities.get(position));
|
||||
homeGridAdapterItemBinding.ivComment.setVisibility(View.GONE);
|
||||
final DiscoveryListEntity discoveryListEntity = discoveryListEntities.get(position);
|
||||
homeGridAdapterItemBinding.tvNikeName.setText(discoveryListEntity.getNickname());
|
||||
homeGridAdapterItemBinding.tvContent.setText(discoveryListEntity.getGoods_detail());
|
||||
|
||||
|
||||
if (discoveryListEntity.getLike().isEmpty()) {
|
||||
homeGridAdapterItemBinding.tvLike.setVisibility(View.GONE);
|
||||
} else {
|
||||
homeGridAdapterItemBinding.tvLike.setVisibility(View.VISIBLE);
|
||||
StringBuilder likeString = new StringBuilder();
|
||||
for (int i = 0; i < discoveryListEntity.getLike().size(); i++) {
|
||||
if (i == 0) {
|
||||
likeString.append("❤");
|
||||
|
||||
} else {
|
||||
likeString.append(",");
|
||||
}
|
||||
likeString.append(discoveryListEntity.getLike().get(i).getNickname());
|
||||
}
|
||||
homeGridAdapterItemBinding.tvLike.setText(likeString.toString());
|
||||
|
||||
homeGridAdapterItemBinding.tvTime.setText(DateUtils.getDate(discoveryListEntity.getCtime()));
|
||||
|
||||
}
|
||||
if (discoveryListEntity.getDis_content().isEmpty()) {
|
||||
homeGridAdapterItemBinding.rvComment.setVisibility(View.GONE);
|
||||
} else {
|
||||
homeGridAdapterItemBinding.rvComment.setVisibility(View.VISIBLE);
|
||||
FullyGridLayoutManager mgr = new FullyGridLayoutManager(context, 1);
|
||||
mgr.setOrientation(FullyGridLayoutManager.VERTICAL);
|
||||
mgr.setSmoothScrollbarEnabled(true);
|
||||
homeGridAdapterItemBinding.rvComment.setLayoutManager(mgr);
|
||||
BaseRecycleViewAdapter<DiscoveryListEntity.Dis_content, ItemCommentBinding> baseRecycleViewAdapter = new BaseRecycleViewAdapter(context, R.layout.item_comment);
|
||||
homeGridAdapterItemBinding.rvComment.setAdapter(baseRecycleViewAdapter);
|
||||
final ArrayList<DiscoveryListEntity.Dis_content> dis_content = discoveryListEntity.getDis_content();
|
||||
baseRecycleViewAdapter.setOnBindViewHolder(new BaseRecycleViewAdapter.BindView() {
|
||||
@Override
|
||||
public void onBindViewHolder(Object b, int position) {
|
||||
ItemCommentBinding itemCommentBinding = (ItemCommentBinding) b;
|
||||
itemCommentBinding.tvName.setText(dis_content.get(position).getNickname() + ": ");
|
||||
itemCommentBinding.tvInfo.setText(dis_content.get(position).getContents());
|
||||
if (dis_content.get(position).getReply().isEmpty()) {
|
||||
itemCommentBinding.llHf.setVisibility(View.GONE);
|
||||
|
||||
} else {
|
||||
itemCommentBinding.llHf.setVisibility(View.VISIBLE);
|
||||
itemCommentBinding.tvName2.setText(discoveryListEntity.getNickname());
|
||||
itemCommentBinding.tvInfo2.setText("回复");
|
||||
itemCommentBinding.tvName3.setText(dis_content.get(position).getNickname() + ":");
|
||||
itemCommentBinding.tvInfo3.setText(dis_content.get(position).getReply());
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
baseRecycleViewAdapter.setData(dis_content);
|
||||
|
||||
}
|
||||
|
||||
|
||||
RequestOptions requestOptions = new RequestOptions();
|
||||
requestOptions.placeholder(R.mipmap.icon_default_rectangle);
|
||||
requestOptions.error(R.mipmap.icon_default_rectangle);
|
||||
|
||||
Glide.with(context).load(discoveryListEntity.getAvatar())
|
||||
.apply(requestOptions)
|
||||
.into(homeGridAdapterItemBinding.imageHead);
|
||||
ArrayList<ImageInfo> imageInfos = new ArrayList<>();
|
||||
|
||||
if (discoveryListEntity.getPic().size() > 0) {
|
||||
|
||||
// Log.e("pic", discoveryListEntity.getPic().get(0));
|
||||
for (int i = 0; i < discoveryListEntity.getPic().size(); i++) {
|
||||
if (discoveryListEntity.getPic().get(i).endsWith(".mp4") || discoveryListEntity.getPic().get(i).endsWith(".avi")) {
|
||||
ImageInfo imageInfo = new ImageInfo();
|
||||
imageInfo.setType(2);
|
||||
imageInfo.setBigImageUrl(discoveryListEntity.getPic().get(i));
|
||||
imageInfo.setThumbnailUrl(discoveryListEntity.getPic().get(i));
|
||||
imageInfos.add(imageInfo);
|
||||
} else {
|
||||
ImageInfo imageInfo = new ImageInfo();
|
||||
imageInfo.setType(1);
|
||||
imageInfo.setBigImageUrl(discoveryListEntity.getPic().get(i));
|
||||
imageInfo.setThumbnailUrl(discoveryListEntity.getPic().get(i));
|
||||
imageInfos.add(imageInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
ImageInfo imageInfo = new ImageInfo();
|
||||
imageInfo.setType(1);
|
||||
imageInfo.setBigImageUrl(discoveryListEntity.getThumb());
|
||||
imageInfo.setThumbnailUrl(discoveryListEntity.getThumb());
|
||||
imageInfos.add(imageInfo);
|
||||
}
|
||||
homeGridAdapterItemBinding.nineGrid.setAdapter(new NineGridViewClickAdapter(context, imageInfos));
|
||||
}
|
||||
}
|
||||
});
|
||||
mDataBinding.recyView.setAdapter(baseRecycleViewAdapter);
|
||||
|
||||
baseRecycleViewAdapter.setData(discoveryListEntities);
|
||||
}
|
||||
|
||||
private void getData() {
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("userid", userId);
|
||||
map.put("type", type + "");
|
||||
map.put("app", "Goods");
|
||||
map.put("class", "MyGoodsLists");
|
||||
map.put("page", page + "");
|
||||
map.put("sign", Md5.md5("Goods" + "MyGoodsLists" + Md5.secret));
|
||||
Subscription subscribe = loader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
mDataBinding.dw.finishRefresh();
|
||||
mDataBinding.dw.finishLoadMore();
|
||||
progressDialog.dismiss();
|
||||
if (!(resultcode.status == 0)) {
|
||||
Toast.makeText(context, resultcode.msg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if (resultcode.status == 0) {
|
||||
// intRecycleView();
|
||||
Gson gs = new Gson();
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(s);
|
||||
org.json.JSONArray array = jsonObject.getJSONArray("info");
|
||||
Type type = new TypeToken<ArrayList<DiscoveryListEntity>>() {
|
||||
}.getType();
|
||||
if (page == 1) {
|
||||
String fengmian = jsonObject.getString("fengmian");
|
||||
String avatar = jsonObject.getString("avatar");
|
||||
Picasso.with(context).load(fengmian)
|
||||
.placeholder(R.mipmap.icon_default_rectangle)
|
||||
.into(target);
|
||||
Picasso.with(context).load(avatar)
|
||||
.placeholder(R.mipmap.icon_default_rectangle)
|
||||
.transform(new PicassoRoundTransform())
|
||||
.into(mDataBinding.head);
|
||||
ArrayList<DiscoveryListEntity> o = new Gson().fromJson(array.toString(), type);
|
||||
discoveryListEntities.clear();
|
||||
discoveryListEntities.addAll(o);
|
||||
BaseRecycleViewAdapter baseRecycleViewAdapter = (BaseRecycleViewAdapter) mDataBinding.recyView.getAdapter();
|
||||
baseRecycleViewAdapter.setData(discoveryListEntities);
|
||||
page++;
|
||||
} else {
|
||||
ArrayList<DiscoveryListEntity> o = new Gson().fromJson(array.toString(), type);
|
||||
discoveryListEntities.addAll(o);
|
||||
|
||||
BaseRecycleViewAdapter baseRecycleViewAdapter = (BaseRecycleViewAdapter) mDataBinding.recyView.getAdapter();
|
||||
baseRecycleViewAdapter.setData(discoveryListEntities);
|
||||
Log.e("sizi", discoveryListEntities.size() + "");
|
||||
// int count = jsonObject.getInt("count");
|
||||
if (o.isEmpty()) {
|
||||
mDataBinding.dw.finishLoadMoreWithNoMoreData();
|
||||
} else {
|
||||
|
||||
page++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.fillInStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
mDataBinding.dw.finishRefresh();
|
||||
mDataBinding.dw.finishLoadMore();
|
||||
Toast.makeText(context, getString(R.string.getdatafailure), Toast.LENGTH_SHORT).show();
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private Target target = new Target() {
|
||||
@Override
|
||||
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
|
||||
Drawable drawable = new BitmapDrawable(bitmap);
|
||||
mDataBinding.v.setBackground(drawable);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBitmapFailed(Drawable errorDrawable) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareLoad(Drawable placeHolderDrawable) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.sl.house_property.BaseFragment;
|
||||
import com.sl.house_property.R;
|
||||
import com.sl.house_property.databinding.FragmentLikeBinding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import entity.RegisterUser;
|
||||
import tools.Config;
|
||||
|
||||
public class LikeFragment extends BaseFragment<FragmentLikeBinding> {
|
||||
private ArrayList<Fragment> fragments;
|
||||
private String[] strings;
|
||||
|
||||
public static LikeFragment newInstance() {
|
||||
LikeFragment fragment = new LikeFragment();
|
||||
Bundle args = new Bundle();
|
||||
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_like;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
|
||||
}
|
||||
|
||||
class MyViewPagerAdapter extends FragmentPagerAdapter {
|
||||
public MyViewPagerAdapter(FragmentManager fm) {
|
||||
super(fm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return fragments.get(position);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragments.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return strings[position];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreateVew(LayoutInflater inflater, Bundle savedInstanceState) {
|
||||
super.onCreateVew(inflater, savedInstanceState);
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.keyboardEnable(true) //解决软键盘与底部输入框冲突问题
|
||||
// .keyboardEnable(true, WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
|
||||
// | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) //软键盘自动弹出
|
||||
.init();
|
||||
|
||||
strings = new String[2];
|
||||
strings[0] = "说说";
|
||||
strings[1] = "商品";
|
||||
fragments = new ArrayList<>();
|
||||
RegisterUser user =
|
||||
Config.getInstance(getActivity()).getUser();
|
||||
String userId = "";
|
||||
if (user != null) {
|
||||
userId = user.getUserid();
|
||||
} else {
|
||||
userId = "0";
|
||||
}
|
||||
fragments.add(HistoryRecordFragment.newInstance(1, userId));
|
||||
fragments.add(HistoryRecordFragment.newInstance(2, userId));
|
||||
MyViewPagerAdapter myViewPagerAdapter = new MyViewPagerAdapter(getChildFragmentManager());
|
||||
mDataBinding.fl.setAdapter(myViewPagerAdapter);
|
||||
mDataBinding.tb.setupWithViewPager(mDataBinding.fl);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.internal.LinkedTreeMap;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.selectpicker.OptionsPopupWindow;
|
||||
import com.sl.house_property.BaseActivity;
|
||||
import com.sl.house_property.R;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import entity.HomelistitemEntity;
|
||||
import entity.RegisterUser;
|
||||
import http.ApiConfig;
|
||||
import my_loader.Loader;
|
||||
import my_loader.Resultcode;
|
||||
import rx.Subscription;
|
||||
import rx.functions.Action1;
|
||||
import tools.Config;
|
||||
import utils.Md5;
|
||||
|
||||
public class ShareCodeActivity extends BaseActivity<com.sl.house_property.databinding.ActivityEntranceguardControl2Binding> {
|
||||
|
||||
private String user_home_id;
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_entranceguard_control2;
|
||||
}
|
||||
|
||||
private int timeday = 7;
|
||||
private OptionsPopupWindow alarmOptionPop;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setAbr("授权访客临时门禁", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
finish();
|
||||
}
|
||||
}, 0, null, 0, null, 0, null, "");
|
||||
Map<String, String> map = new HashMap<>();
|
||||
RegisterUser registerUser = Config.getInstance(ShareCodeActivity.this).getUser();
|
||||
if (registerUser != null) {
|
||||
map.put("userid", registerUser.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
|
||||
map.put("sign", Md5.md5("Cas" + "GetMyAddress" + Md5.secret));
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "GetMyAddress");
|
||||
getGankList(ApiConfig.BASE_URL, map, "", 0);
|
||||
|
||||
|
||||
mDataBinding.myradio2.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
if (i == R.id.myradio21) {
|
||||
timeday = 7;
|
||||
}
|
||||
if (i == R.id.myradio22) {
|
||||
timeday = 30;
|
||||
}
|
||||
if (i == R.id.myradio23) {
|
||||
timeday = 90;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mDataBinding.llAddress.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (list==null||list.isEmpty()){
|
||||
Map<String, String> map = new HashMap<>();
|
||||
RegisterUser registerUser = Config.getInstance(ShareCodeActivity.this).getUser();
|
||||
if (registerUser != null) {
|
||||
map.put("userid", registerUser.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
|
||||
map.put("sign", Md5.md5("Cas" + "GetMyAddress" + Md5.secret));
|
||||
map.put("app", "Cas");
|
||||
map.put("class", "GetMyAddress");
|
||||
getGankList(ApiConfig.BASE_URL, map, "", 0);
|
||||
return;
|
||||
}
|
||||
final ArrayList<String> strings = new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
strings.add(list.get(i).getAddress());
|
||||
}
|
||||
alarmOptionPop = new OptionsPopupWindow(ShareCodeActivity.this);
|
||||
alarmOptionPop.setPicker(strings);
|
||||
|
||||
alarmOptionPop.setOnoptionsSelectListener(new OptionsPopupWindow.OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int position, int option2, int options3) {
|
||||
user_home_id = list.get(position).getUser_home_id();
|
||||
if (list.size() > 0) {
|
||||
mDataBinding.tvAddress.setText(list.get(position).getAddress());
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
alarmOptionPop.showAtLocation(mDataBinding.getRoot(), Gravity.BOTTOM, 0, 0);
|
||||
}
|
||||
});
|
||||
mDataBinding.confirm.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
setToast("还没有房间");
|
||||
return;
|
||||
}
|
||||
|
||||
String phone = mDataBinding.telephone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
setToast("请输入访客手机号");
|
||||
return;
|
||||
}
|
||||
hideKeyboard(mDataBinding.telephone);
|
||||
|
||||
getPwd();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private ArrayList<HomelistitemEntity> list;
|
||||
private Loader mGankLoader;
|
||||
|
||||
private void getGankList(final String myurl, Map<String, String> map, String string, final int getcode1) {
|
||||
progressDialog.setMessage(string);
|
||||
|
||||
//map.put("")
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
mDataBinding.getRoot().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
progressDialog.dismiss();
|
||||
//setToast(1, getString(R.string.timeout));
|
||||
}
|
||||
}, 13000);
|
||||
mGankLoader = new Loader();
|
||||
/* Map<String,String> map=new HashMap<String,String>();
|
||||
map.put("phone");*/
|
||||
Subscription subscription = mGankLoader.getMovie(myurl, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
//setToast(0,resultcode.status);
|
||||
if ((!(resultcode.status == 0))) {
|
||||
setToast(1, resultcode.msg);
|
||||
return;
|
||||
}
|
||||
switch (getcode1) {
|
||||
|
||||
case 0:
|
||||
Gson gs = new Gson();
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(s);
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("home");
|
||||
Type type = new TypeToken<ArrayList<HomelistitemEntity>>() {
|
||||
}.getType();
|
||||
list = new Gson().fromJson(jsonArray.toString(), type);
|
||||
if (list != null && !list.isEmpty()) {
|
||||
mDataBinding.tvAddress.setText(list.get(0).getAddress());
|
||||
user_home_id = list.get(0).getUser_home_id();
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
setToast(2, getString(R.string.getdatafailure));
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
addSubscription(subscription);
|
||||
}
|
||||
|
||||
private void getPwd() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
RegisterUser registerUser = Config.getInstance(ShareCodeActivity.this).getUser();
|
||||
if (registerUser != null) {
|
||||
map.put("userid", registerUser.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
|
||||
map.put("sign", Md5.md5("Door" + "SendCustomerCode" + Md5.secret));
|
||||
map.put("app", "Door");
|
||||
map.put("class", "SendCustomerCode");
|
||||
map.put("type", "qrcode");
|
||||
map.put("validity_time", timeday + "");
|
||||
|
||||
//map.put("phone", mDataBinding.telephone.getText().toString().trim());
|
||||
// map.put("validity_time", mDataBinding.daytiems.getText().toString().trim());
|
||||
map.put("user_home_id", user_home_id);
|
||||
progressDialog.show();
|
||||
Subscription subscribe = mGankLoader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
if ((!(resultcode.status == 0))) {
|
||||
setToast(1, resultcode.msg);
|
||||
return;
|
||||
}
|
||||
Gson gs = new Gson();
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
try {
|
||||
JSONObject jsonArray = new JSONObject(s);
|
||||
String qrcode = jsonArray.optString("qrcode", "");
|
||||
getCode(qrcode);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
setToast(2, getString(R.string.getdatafailure));
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
addSubscription(subscribe);
|
||||
// getGankList(ApiConfig.BASE_URL, map, getResources().getString(R.string.requsting), 0);
|
||||
}
|
||||
|
||||
private void getCode(final String code) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
RegisterUser registerUser = Config.getInstance(ShareCodeActivity.this).getUser();
|
||||
if (registerUser != null) {
|
||||
map.put("userid", registerUser.getUserid());
|
||||
} else {
|
||||
map.put("userid", 0 + "");
|
||||
}
|
||||
map.put("sign", Md5.md5("Door" + "SendCustomerCode" + Md5.secret));
|
||||
map.put("app", "Door");
|
||||
map.put("class", "SendCustomerCode");
|
||||
map.put("type", "password");
|
||||
map.put("phone", mDataBinding.telephone.getText().toString().trim());
|
||||
// map.put("validity_time", mDataBinding.daytiems.getText().toString().trim());
|
||||
map.put("user_home_id", user_home_id);
|
||||
Subscription subscribe = mGankLoader.getMovie(ApiConfig.BASE_URL, map).subscribe(new Action1<Resultcode>() {
|
||||
@Override
|
||||
public void call(Resultcode resultcode) {
|
||||
progressDialog.dismiss();
|
||||
if ((!(resultcode.status == 0))) {
|
||||
setToast(1, resultcode.msg);
|
||||
return;
|
||||
}
|
||||
setToast(0, resultcode.msg);
|
||||
Gson gs = new Gson();
|
||||
LinkedTreeMap adta = (LinkedTreeMap) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
try {
|
||||
JSONObject jsonArray = new JSONObject(s);
|
||||
String pwd = jsonArray.optString("code", "");
|
||||
|
||||
ShareCodeDialog shareCodeDialog = new ShareCodeDialog(ShareCodeActivity.this);
|
||||
shareCodeDialog.setCode(code);
|
||||
shareCodeDialog.setPwd(pwd);
|
||||
new XPopup.Builder(ShareCodeActivity.this).asCustom(shareCodeDialog).show();
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}, new Action1<Throwable>() {
|
||||
@Override
|
||||
public void call(Throwable throwable) {
|
||||
progressDialog.dismiss();
|
||||
setToast(2, getString(R.string.getdatafailure));
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
addSubscription(subscribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.sl.house_property.discovery;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.sl.house_property.R;
|
||||
|
||||
import utils.QRCodeUtil;
|
||||
|
||||
public class ShareCodeDialog extends CenterPopupView {
|
||||
private String pwd;
|
||||
private String code;
|
||||
private TextView tvPwd;
|
||||
private ImageView ivCode;
|
||||
private TextView tvShare;
|
||||
private TextView tvCancel;
|
||||
|
||||
public ShareCodeDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_share_cede;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
tvPwd = findViewById(R.id.title2);
|
||||
ivCode = findViewById(R.id.myImage);
|
||||
tvShare = findViewById(R.id.tv_share);
|
||||
tvCancel = findViewById(R.id.tv_cancel);
|
||||
tvCancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
tvShare.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
tvPwd.setText("密码:" + pwd);
|
||||
Bitmap qrCodeBitmap = QRCodeUtil.createQRCodeBitmap(code, QRCodeUtil.dip2px(getContext(),220), QRCodeUtil.dip2px(getContext(),220));
|
||||
ivCode.setImageBitmap(qrCodeBitmap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPwd(String pwd) {
|
||||
this.pwd = pwd;
|
||||
}
|
||||
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class OrderActivity extends BaseActivity<ActivityOrderBinding> {
|
||||
} else if (orderType == 3) {
|
||||
mDataBinding.tvTitle.setText("待收货");
|
||||
} else if (orderType == 4) {
|
||||
mDataBinding.tvTitle.setText("待评价");
|
||||
mDataBinding.tvTitle.setText("已完成");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -75,4 +75,7 @@ public class MyPhoneValue {
|
||||
|
||||
return sbar;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.support.annotation.ColorInt;
|
||||
@@ -28,7 +29,13 @@ public class QRCodeUtil {
|
||||
public static Bitmap createQRCodeBitmap(String content, int width, int height){
|
||||
return createQRCodeBitmap(content, width, height, "UTF-8", "H", "2", Color.BLACK, Color.WHITE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
|
||||
*/
|
||||
public static int dip2px(Context context, float dpValue) {
|
||||
final float scale = context.getResources().getDisplayMetrics().density;
|
||||
return (int) (dpValue * scale + 0.5f);
|
||||
}
|
||||
/**
|
||||
* 创建二维码位图 (支持自定义配置和自定义样式)
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:drawable="@mipmap/gwc2"/>
|
||||
<item android:state_checked="false" android:drawable="@mipmap/gwc1"/>
|
||||
<item android:state_checked="true" android:drawable="@mipmap/gouwuche"/>
|
||||
<item android:state_checked="false" android:drawable="@mipmap/gouwuche_no"/>
|
||||
</selector>
|
||||
5
app/src/main/res/drawable/main_bottom_like.xml
Normal file
5
app/src/main/res/drawable/main_bottom_like.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:drawable="@mipmap/zan_p"/>
|
||||
<item android:state_checked="false" android:drawable="@mipmap/zan"/>
|
||||
</selector>
|
||||
@@ -1,120 +1,180 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
||||
tools:context=".EntranceguardControl1Activity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f7f7f7"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_height="match_parent">
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f7f7f7"
|
||||
android:layout_height="match_parent">
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="#f7f7f7"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f7f7f7">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f7f7f7"
|
||||
|
||||
android:layout_height="match_parent">
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:background="@color/LightGraydddddd"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="16dp"
|
||||
android:src="@mipmap/returnme"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/retacal_background"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dip"
|
||||
android:background="@drawable/retacal_background"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15dip"
|
||||
android:paddingRight="15dip"
|
||||
android:layout_height="wrap_content">
|
||||
android:paddingRight="15dip">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:text="时间"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:layout_margin="20dip"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
android:gravity="center"
|
||||
android:text="时间" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/myradio2"
|
||||
android:layout_height="wrap_content">
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:text="7天"
|
||||
android:button="@null" android:background="@drawable/drawableforitemnormal"
|
||||
android:padding="20dip"
|
||||
android:id="@+id/myradio21"
|
||||
android:layout_margin="3dip"
|
||||
android:layout_height="wrap_content" />
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:text="1月"
|
||||
android:button="@null" android:background="@drawable/drawableforitemnormal"
|
||||
android:padding="20dip"
|
||||
android:id="@+id/myradio22"
|
||||
android:layout_margin="3dip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:layout_height="wrap_content" />
|
||||
<RadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:text="3月"
|
||||
android:id="@+id/myradio23"
|
||||
android:padding="20dip"
|
||||
android:button="@null" android:background="@drawable/drawableforitemnormal"
|
||||
android:layout_margin="3dip"
|
||||
<RadioButton
|
||||
android:id="@+id/myradio21"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="3dip"
|
||||
android:background="@drawable/drawableforitemnormal"
|
||||
android:button="@null"
|
||||
android:padding="20dip"
|
||||
android:checked="true"
|
||||
android:text="7天" />
|
||||
|
||||
android:layout_height="wrap_content" />
|
||||
<RadioButton
|
||||
android:id="@+id/myradio22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="3dip"
|
||||
android:background="@drawable/drawableforitemnormal"
|
||||
android:button="@null"
|
||||
android:padding="20dip"
|
||||
|
||||
android:text="1月" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/myradio23"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="3dip"
|
||||
android:background="@drawable/drawableforitemnormal"
|
||||
android:button="@null"
|
||||
android:padding="20dip"
|
||||
|
||||
android:text="3月" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/lightlittleGrey"
|
||||
android:layout_height="0.5dip"/>
|
||||
android:layout_height="0.5dip"
|
||||
android:background="@color/lightlittleGrey" />
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:layout_height="wrap_content">-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:text="地址"-->
|
||||
<!-- android:layout_marginLeft="20dip"-->
|
||||
<!-- android:layout_marginRight="20dp"-->
|
||||
<!-- android:layout_marginTop="20dp"-->
|
||||
<!-- android:layout_height="wrap_content" />-->
|
||||
<!-- <RadioGroup-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:id="@+id/myradio"-->
|
||||
<!-- android:layout_margin="18dip"-->
|
||||
<!-- android:layout_height="match_parent">-->
|
||||
|
||||
<!-- </RadioGroup>-->
|
||||
<!-- </LinearLayout>-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:text="地址"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_height="wrap_content" />
|
||||
<RadioGroup
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dip"
|
||||
android:text="访客手机号" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/telephone"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/myradio"
|
||||
android:layout_margin="18dip"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</RadioGroup>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dip"
|
||||
android:background="@null"
|
||||
android:hint="访客手机号"
|
||||
android:textSize="@dimen/textedit" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:background="@drawable/selector_common_btn"
|
||||
android:text="确认授权"
|
||||
<TextView
|
||||
android:id="@+id/confirm"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginTop="20dip"
|
||||
android:padding="15dip"
|
||||
android:gravity="center"
|
||||
android:layout_marginRight="15dip"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginBottom="50dip"
|
||||
android:layout_height="wrap_content" />
|
||||
android:background="@drawable/selector_common_btn"
|
||||
android:gravity="center"
|
||||
android:padding="15dip"
|
||||
android:text="确认授权"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/mycontent"
|
||||
@@ -30,11 +29,11 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_bottom"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -75,6 +74,17 @@
|
||||
android:text="发现"
|
||||
android:textColor="@color/radiobuttoncolor" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/like"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:drawableTop="@drawable/main_bottom_like"
|
||||
android:gravity="center"
|
||||
android:text="点赞"
|
||||
android:textColor="@color/radiobuttoncolor" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/button3"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
244
app/src/main/res/layout/dialog_bind_house.xml
Normal file
244
app/src/main/res/layout/dialog_bind_house.xml
Normal file
@@ -0,0 +1,244 @@
|
||||
<?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:background="@drawable/_xpopup_round3_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="绑定房屋"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_qu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="15dip"
|
||||
android:layout_marginEnd="15dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="小区"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择小区"
|
||||
android:text="@{myentity.string1}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:background="@mipmap/returnme" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dip"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="15dip"
|
||||
android:background="@color/lighteeeeee" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_lou"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="15dip"
|
||||
android:layout_marginEnd="15dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="楼号"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lou"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择楼号"
|
||||
android:text="@{myentity.string2}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:background="@mipmap/returnme" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dip"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="15dip"
|
||||
android:background="@color/lighteeeeee" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_dan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="15dip"
|
||||
android:layout_marginEnd="15dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="单元"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择单元"
|
||||
android:text="@{myentity.string3}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:background="@mipmap/returnme" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dip"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="15dip"
|
||||
android:background="@color/lighteeeeee" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_fang"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="15dip"
|
||||
android:layout_marginEnd="15dip"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="房号"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fang"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择房号"
|
||||
android:text="@{myentity.string4}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:background="@mipmap/returnme"
|
||||
android:paddingBottom="7dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="15dip"
|
||||
android:layout_marginEnd="15dip"
|
||||
android:digits="0123456789xX"
|
||||
android:hint="请输入户主姓名"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_cardNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="15dip"
|
||||
android:layout_marginEnd="15dip"
|
||||
android:hint="请输入身份证号"
|
||||
android:inputType="number"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
|
||||
android:background="@color/gray" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="提交"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
89
app/src/main/res/layout/dialog_share_cede.xml
Normal file
89
app/src/main/res/layout/dialog_share_cede.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/retacal_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="17dip"
|
||||
android:gravity="center"
|
||||
android:text="授权临时门禁"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dip"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="15dip"
|
||||
android:background="@color/lightlittleGrey" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_margin="17dip"
|
||||
android:gravity="center"
|
||||
android:text="密码"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/myImage"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="220dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/qrcode" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="50dip"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="50dip"
|
||||
android:gravity="center"
|
||||
android:text="注:分享临时门禁给访客,扫描二维码或输入密码开门"
|
||||
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
|
||||
android:background="@color/gray" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_share"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="微信分享"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
80
app/src/main/res/layout/fragment_history_record.xml
Normal file
80
app/src/main/res/layout/fragment_history_record.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/dw"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
app:srlDisableContentWhenLoading="true"
|
||||
app:srlEnableLoadMore="true"
|
||||
|
||||
>
|
||||
|
||||
<com.scwang.smartrefresh.layout.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/sv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/v"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="230dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/head"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_below="@id/v"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:layout_marginRight="16dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recy_view"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
48
app/src/main/res/layout/fragment_like.xml
Normal file
48
app/src/main/res/layout/fragment_like.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingRight="5dp"
|
||||
android:src="@mipmap/fanhui" />
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal" />
|
||||
|
||||
</RelativeLayout>
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/fl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -1,246 +1,255 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<FrameLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/myl1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
tools:context=".Main1Fragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/myl1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/mystatusbar"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/l1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dip"
|
||||
android:layout_height="50dip"
|
||||
android:orientation="horizontal"
|
||||
|
||||
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/background_color_white"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dip"
|
||||
android:src="@mipmap/shaomiao" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv1_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/f7">
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/taobao_refresh_layout"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/background_color_white"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/scan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="15dip"
|
||||
android:src="@mipmap/shaomiao"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/taobao_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
app:srlDisableContentWhenLoading="true"
|
||||
app:srlEnableLoadMore="true"
|
||||
|
||||
>
|
||||
|
||||
<com.scwang.smartrefresh.layout.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_view_extend"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:srlEnableLoadMore="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
>
|
||||
<com.scwang.smartrefresh.layout.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<my_view.tao_bao_refresh.ScrollViewExtend
|
||||
android:id="@+id/scroll_view_extend"
|
||||
<LinearLayout
|
||||
android:id="@+id/l3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
android:layout_height="150dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l2"
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
app:image_scale_type="center_crop"
|
||||
app:indicator_drawable_selected="@drawable/ic_banner_point"
|
||||
app:indicator_drawable_unselected="@drawable/ic_banner_point_grey"
|
||||
app:indicator_height="6dp"
|
||||
app:indicator_margin="6dp"
|
||||
app:indicator_width="6dp"
|
||||
app:is_auto_play="true"
|
||||
app:title_background="#00000000" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:orientation="vertical">
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:image_scale_type="center_crop"
|
||||
app:indicator_drawable_selected="@drawable/ic_banner_point"
|
||||
app:indicator_drawable_unselected="@drawable/ic_banner_point_grey"
|
||||
app:indicator_height="6dp"
|
||||
app:indicator_margin="6dp"
|
||||
app:indicator_width="6dp"
|
||||
app:is_auto_play="true"
|
||||
app:title_background="#00000000"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/cargara"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/garage">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:text="@string/carroom"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/entrancegurd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/door">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:text="@string/door"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/entrancegurd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/door">
|
||||
|
||||
<RelativeLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip">
|
||||
android:layout_margin="10dip"
|
||||
android:text="@string/door"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="5dip"
|
||||
android:layout_height="14dip"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_marginTop="2dip"
|
||||
android:background="@color/colorPrimary" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/service"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/garage">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/usershoptextid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/view"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="@string/usershop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moew1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dip"
|
||||
android:text="@string/more"
|
||||
android:textColor="@color/gray" />
|
||||
</RelativeLayout>
|
||||
|
||||
<my_view.tao_bao_refresh.RecyView
|
||||
android:id="@+id/fragmentRecyclerviewHorization"
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dip"
|
||||
android:layout_margin="10dip"
|
||||
android:text="物业服务"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
android:layout_marginRight="10dip">
|
||||
</RelativeLayout>
|
||||
|
||||
</my_view.tao_bao_refresh.RecyView>
|
||||
<RelativeLayout
|
||||
android:id="@+id/cargara"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/garage">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/myversion"
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:layout_margin="10dip"
|
||||
android:text="@string/carroom"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip">
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="5dip"
|
||||
android:layout_height="14dip"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_marginTop="2dip"
|
||||
android:background="@color/colorPrimary" />
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dip">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userommunitybutextid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/view2"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:text="@string/ommunitybulletin" />
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="5dip"
|
||||
android:layout_height="14dip"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="5dip"
|
||||
android:layout_marginTop="2dip"
|
||||
android:background="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moew2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dip"
|
||||
android:text="@string/more"
|
||||
android:textColor="@color/gray" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/usershoptextid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/view"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="发现精彩" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/moew1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dip"
|
||||
android:text="@string/more"
|
||||
android:textColor="@color/gray"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<my_view.tao_bao_refresh.RecyView
|
||||
android:id="@+id/recyView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="0dip"
|
||||
android:layout_marginRight="0dip"
|
||||
android:background="@color/white"
|
||||
android:focusable="true"></my_view.tao_bao_refresh.RecyView>
|
||||
</LinearLayout>
|
||||
</my_view.tao_bao_refresh.ScrollViewExtend>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="#f6f6f6"
|
||||
android:elevation="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="7dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_comment_bg"
|
||||
android:ellipsize="end"
|
||||
android:hint="说点什么"
|
||||
android:maxLength="300"
|
||||
android:paddingLeft="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColorHint="#a2a2a2"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_comment"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/shape_comment"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="发送"
|
||||
android:textColor="#fff"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -354,6 +354,17 @@
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="待收货" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@mipmap/qianbao"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="已完成" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -422,6 +433,16 @@
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="待收货" />
|
||||
<TextView
|
||||
android:id="@+id/tv_order8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@mipmap/qianbao"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="已完成" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
@@ -21,52 +21,29 @@
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingRight="5dp"
|
||||
android:src="@mipmap/fanhui" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/fl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:text="说说"
|
||||
android:textColor="@color/black"
|
||||
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorPrimary"
|
||||
android:gravity="center"
|
||||
android:text="商品"
|
||||
android:textColor="@color/white"
|
||||
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/dw"
|
||||
@@ -74,6 +51,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone"
|
||||
app:srlDisableContentWhenLoading="true"
|
||||
app:srlEnableLoadMore="true"
|
||||
|
||||
|
||||
BIN
app/src/main/res/mipmap-xhdpi/gouwuche.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/gouwuche.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/gouwuche_no.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/gouwuche_no.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/zan.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/zan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/zan_p.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/zan_p.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user