铭牌
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.yizhuan.erban.decoration.adapter;
|
||||
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@@ -10,7 +9,6 @@ import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.bindadapter.BaseAdapter;
|
||||
import com.yizhuan.erban.bindadapter.BindingViewHolder;
|
||||
import com.yizhuan.erban.databinding.ItemCarGarageNormalBinding;
|
||||
import com.yizhuan.xchat_android_core.decoration.bean.BaseDecoration;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
|
||||
@@ -45,27 +43,10 @@ public class MyCarAdapter extends BaseAdapter<CarInfo> {
|
||||
int status = item.getStatus();
|
||||
boolean canUse;
|
||||
|
||||
binding.tvCarPrice.setText(item.getPriceStr());
|
||||
if (remainingDay >= 0 && status == CarInfo.STATUS_USER_CAN_USE) {
|
||||
// 一定是续费按钮
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvBuy.setText("续费");
|
||||
binding.tvBuy.setBackgroundResource(R.drawable.bg_my_head_renew);
|
||||
|
||||
canUse = true;
|
||||
} else {
|
||||
canUse = false;
|
||||
// 根据状态显示倒计时
|
||||
// 根据状态判断是购买按钮还是隐藏按钮
|
||||
if (status == CarInfo.STATUS_OFF_SHELF) {
|
||||
// 隐藏购买按钮
|
||||
binding.tvBuy.setVisibility(View.GONE);
|
||||
} else if (status == CarInfo.STATUS_OUT_OF_DATE) {
|
||||
// 续费或购买按钮
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvBuy.setText("购买");
|
||||
binding.tvBuy.setBackgroundResource(R.drawable.bg_my_head_buy);
|
||||
}
|
||||
}
|
||||
|
||||
// 时间
|
||||
@@ -81,16 +62,8 @@ public class MyCarAdapter extends BaseAdapter<CarInfo> {
|
||||
|
||||
|
||||
setUseButton(binding.tvUsed, canUse, item.isUsing());
|
||||
updateTag(item, binding.ivTag, binding.tvBuy);
|
||||
updateTag(item, binding.ivTag);
|
||||
|
||||
if (status == CarInfo.STATUS_OFF_SHELF) {
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setText("已下架");
|
||||
} else if (CarInfo.TAG_TYPE_LIMIT == item.getLabelType() || CarInfo.TAG_TYPE_EXCLUSIVE == item.getLabelType()) {
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setText("暂不出售");
|
||||
} else
|
||||
binding.tvNoSeal.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void setUseButton(TextView tvUsed, boolean canUse, boolean isUsing) {
|
||||
@@ -114,27 +87,21 @@ public class MyCarAdapter extends BaseAdapter<CarInfo> {
|
||||
|
||||
}
|
||||
|
||||
private void updateTag(CarInfo carInfo, ImageView ivTag, TextView tvBuy) {
|
||||
private void updateTag(CarInfo carInfo, ImageView ivTag) {
|
||||
if (CarInfo.TAG_TYPE_NORMAL == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.GONE);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_NEW == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_new);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_DISCOUNT == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_discount);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_LIMIT == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_limit);
|
||||
tvBuy.setVisibility(View.GONE);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_EXCLUSIVE == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_exclusive);
|
||||
tvBuy.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,6 @@ public class MyHeadWearAdapter extends BaseAdapter<HeadWearInfo> {
|
||||
super.convert(helper, item);
|
||||
ItemMyHeadWearBinding binding = (ItemMyHeadWearBinding) helper.getBinding();
|
||||
NobleUtil.loadHeadWear(item.getPic(), binding.ivCarCover);
|
||||
helper.addOnClickListener(R.id.tv_buy);
|
||||
helper.addOnClickListener(R.id.tv_used);
|
||||
|
||||
if (item.getLabelType() == HeadWearInfo.LABEL_TYPE_NORMAL) {
|
||||
@@ -56,34 +55,7 @@ public class MyHeadWearAdapter extends BaseAdapter<HeadWearInfo> {
|
||||
} else {
|
||||
binding.tvUsed.setVisibility(View.VISIBLE);
|
||||
binding.tvUsed.setEnabled(true);
|
||||
}
|
||||
|
||||
if (!item.isEnableStatus()) {
|
||||
binding.tvBuy.setVisibility(View.GONE);
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setText("已下架");
|
||||
|
||||
} else if (item.getLabelType() == HeadWearInfo.LABEL_TYPE_NORMAL) {
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setVisibility(View.GONE);
|
||||
|
||||
} else if (HeadWearInfo.LABEL_TYPE_NEW == item.getLabelType()) {
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setVisibility(View.GONE);
|
||||
|
||||
} else if (HeadWearInfo.LABEL_TYPE_DISCOUNT == item.getLabelType()) {
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setVisibility(View.GONE);
|
||||
|
||||
} else if (HeadWearInfo.LABEL_TYPE_LIMIT == item.getLabelType()) {
|
||||
binding.tvBuy.setVisibility(View.GONE);
|
||||
binding.tvNoSeal.setText("暂不出售");
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
|
||||
} else if (HeadWearInfo.LABEL_TYPE_EXCLUSIVE == item.getLabelType()) {
|
||||
binding.tvBuy.setVisibility(View.GONE);
|
||||
binding.tvNoSeal.setText("暂不出售");
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// 日期展示
|
||||
@@ -93,7 +65,6 @@ public class MyHeadWearAdapter extends BaseAdapter<HeadWearInfo> {
|
||||
binding.tvCounters.setText(mContext.getString(R.string.decoration_remainder) + item.getExpireDays() + mContext.getString(R.string.day));
|
||||
}
|
||||
|
||||
binding.tvCarPrice.setText(item.getPriceStr());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,163 +4,51 @@ import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.netease.nim.uikit.support.glide.GlideApp;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.bindadapter.BaseAdapter;
|
||||
import com.yizhuan.erban.bindadapter.BindingViewHolder;
|
||||
import com.yizhuan.erban.databinding.ItemCarGarageNormalBinding;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_core.decoration.nameplate.bean.NamePlateInfo;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleUtil;
|
||||
|
||||
/**
|
||||
* Created by yudi
|
||||
* on 2018/3/2.
|
||||
*/
|
||||
public class MyNamePlateAdapter extends BaseAdapter<CarInfo> {
|
||||
public class MyNamePlateAdapter extends BaseQuickAdapter<NamePlateInfo.NameplateListBean, BaseViewHolder> {
|
||||
|
||||
public MyNamePlateAdapter() {
|
||||
super(R.layout.item_nameplate_normal);
|
||||
|
||||
public MyNamePlateAdapter(int layoutResId, int brid) {
|
||||
super(layoutResId, brid);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void convert(BindingViewHolder helper, CarInfo item) {
|
||||
super.convert(helper, item);
|
||||
|
||||
ItemCarGarageNormalBinding binding = (ItemCarGarageNormalBinding) helper.getBinding();
|
||||
|
||||
GlideApp.with(binding.ivCarCover)
|
||||
.load(item.getPic())
|
||||
.dontAnimate()
|
||||
.dontTransform()
|
||||
.fitCenter()
|
||||
.into(binding.ivCarCover);
|
||||
|
||||
helper.addOnClickListener(R.id.tv_buy);
|
||||
protected void convert(BaseViewHolder helper, NamePlateInfo.NameplateListBean item) {
|
||||
helper.addOnClickListener(R.id.tv_used);
|
||||
|
||||
// 倒计时
|
||||
int remainingDay = item.getRemainingDay();
|
||||
int status = item.getStatus();
|
||||
boolean canUse;
|
||||
|
||||
binding.tvCarPrice.setText(item.getPriceStr());
|
||||
if (remainingDay >= 0 && status == CarInfo.STATUS_USER_CAN_USE) {
|
||||
// 一定是续费按钮
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvBuy.setText("续费");
|
||||
binding.tvBuy.setBackgroundResource(R.drawable.bg_my_head_renew);
|
||||
|
||||
canUse = true;
|
||||
} else {
|
||||
canUse = false;
|
||||
// 根据状态显示倒计时
|
||||
// 根据状态判断是购买按钮还是隐藏按钮
|
||||
if (status == CarInfo.STATUS_OFF_SHELF) {
|
||||
// 隐藏购买按钮
|
||||
binding.tvBuy.setVisibility(View.GONE);
|
||||
} else if (status == CarInfo.STATUS_OUT_OF_DATE) {
|
||||
// 续费或购买按钮
|
||||
binding.tvBuy.setVisibility(View.VISIBLE);
|
||||
binding.tvBuy.setText("购买");
|
||||
binding.tvBuy.setBackgroundResource(R.drawable.bg_my_head_buy);
|
||||
}
|
||||
}
|
||||
|
||||
// 时间
|
||||
if (remainingDay >= 0 && status == CarInfo.STATUS_USER_CAN_USE) {
|
||||
binding.tvCounters.setText(String.format(binding.tvCounters.getResources().getString(R.string.decoration_status_wrapper),
|
||||
binding.tvCounters.getResources().getString(R.string.decoration_remainder) + remainingDay + "天"));
|
||||
} else {
|
||||
if (status == CarInfo.STATUS_OFF_SHELF || status == CarInfo.STATUS_OUT_OF_DATE) {
|
||||
binding.tvCounters.setText(String.format(binding.tvCounters.getResources().getString(R.string.decoration_status_wrapper),
|
||||
binding.tvCounters.getResources().getString(R.string.past_due)));
|
||||
}
|
||||
}
|
||||
//铭牌名称
|
||||
helper.setText(R.id.tv_nameplate_name,item.getNameplateName());
|
||||
//铭牌图标
|
||||
ImageView ivCover = helper.getView(R.id.iv_nameplate_cover);
|
||||
NobleUtil.loadHeadWear(item.getNameplateImage(),ivCover);
|
||||
|
||||
|
||||
setUseButton(binding.tvUsed, canUse, item.isUsing());
|
||||
updateTag(item, binding.ivTag, binding.tvBuy);
|
||||
|
||||
if (status == CarInfo.STATUS_OFF_SHELF) {
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setText("已下架");
|
||||
} else if (CarInfo.TAG_TYPE_LIMIT == item.getLabelType() || CarInfo.TAG_TYPE_EXCLUSIVE == item.getLabelType()) {
|
||||
binding.tvNoSeal.setVisibility(View.VISIBLE);
|
||||
binding.tvNoSeal.setText("暂不出售");
|
||||
} else
|
||||
binding.tvNoSeal.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void setUseButton(TextView tvUsed, boolean canUse, boolean isUsing) {
|
||||
|
||||
if (!canUse) {
|
||||
//使用按钮
|
||||
TextView tvUsed = helper.getView(R.id.tv_used);
|
||||
tvUsed.setBackgroundResource(item.isUsing()?R.drawable.bg_my_head_invalid:R.drawable.bg_my_head_buy);
|
||||
tvUsed.setTextColor(item.isUsing()?mContext.getResources().getColor(R.color.color_333333):mContext.getResources().getColor(R.color.white));
|
||||
tvUsed.setText(item.isUsing()?R.string.label_used:R.string.label_can_use);
|
||||
if (item.isIsExpired()) { // 过期
|
||||
// 日期展示
|
||||
helper.setText(R.id.tv_counters,mContext.getString(R.string.past_due));
|
||||
tvUsed.setVisibility(View.GONE);
|
||||
tvUsed.setText("使用");
|
||||
tvUsed.setBackgroundResource(R.drawable.bg_my_head_invalid);
|
||||
tvUsed.setEnabled(false);
|
||||
} else if (isUsing) {
|
||||
tvUsed.setVisibility(View.VISIBLE);
|
||||
tvUsed.setText("取消使用");
|
||||
tvUsed.setBackgroundResource(R.drawable.bg_my_head_invalid);
|
||||
tvUsed.setEnabled(true);
|
||||
} else {
|
||||
tvUsed.setVisibility(View.VISIBLE);
|
||||
tvUsed.setText("使用");
|
||||
tvUsed.setBackgroundResource(R.drawable.bg_my_head_buy);
|
||||
} else {
|
||||
helper.setText(R.id.tv_counters,mContext.getString(R.string.past_due));
|
||||
helper.setText(R.id.tv_counters,mContext.getString(R.string.decoration_remainder) + item.getExpireDays() + mContext.getString(R.string.day));
|
||||
tvUsed.setVisibility(View.VISIBLE);
|
||||
tvUsed.setEnabled(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void updateTag(CarInfo carInfo, ImageView ivTag, TextView tvBuy) {
|
||||
if (CarInfo.TAG_TYPE_NORMAL == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.GONE);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_NEW == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_new);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_DISCOUNT == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_discount);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_LIMIT == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_limit);
|
||||
tvBuy.setVisibility(View.GONE);
|
||||
|
||||
} else if (CarInfo.TAG_TYPE_EXCLUSIVE == carInfo.getLabelType()) {
|
||||
ivTag.setVisibility(View.VISIBLE);
|
||||
ivTag.setImageResource(R.drawable.ic_mark_exclusive);
|
||||
tvBuy.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void check(CarInfo selectedCarInfo) {
|
||||
if (ListUtils.isListEmpty(mData)) return;
|
||||
// 数据上改变那个using字段
|
||||
for (int i = 0; i < mData.size(); i++) {
|
||||
CarInfo carInfo = mData.get(i);
|
||||
if (selectedCarInfo.getCarId() == carInfo.getCarId()) {
|
||||
carInfo.setUsing(1);
|
||||
} else {
|
||||
carInfo.setUsing(0);
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setCarInfoHasBeenRenew(CarInfo carInfo) {
|
||||
if (carInfo.getCarId() <= 0 || ListUtils.isListEmpty(mData)) return;
|
||||
int index = mData.indexOf(carInfo);
|
||||
if (index == -1) return;
|
||||
if (mData.get(index).getRemainingDay() > 0) {
|
||||
mData.get(index).setRemainingDay(mData.get(index).getRemainingDay() + carInfo.getDays());
|
||||
} else {
|
||||
mData.get(index).setRemainingDay(carInfo.getDays());
|
||||
}
|
||||
mData.get(index).setStatus(CarInfo.STATUS_USER_CAN_USE);
|
||||
notifyItemChanged(index);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ public class MyDecorationActivity extends BaseBindingActivity<ActivityMyDecorati
|
||||
private boolean carGarageNeedUpdate = true;
|
||||
private MyHeadWearFragment myHeadWearFragment;
|
||||
private MyCarFragment mMyCarFragment;
|
||||
private MyCarFragment mMyNamePlateFragment;
|
||||
private MyNamePlateFragment mMyNamePlateFragment;
|
||||
private MagicIndicator mMagicIndicator;
|
||||
|
||||
public static void start(Context context, int position) {
|
||||
@@ -91,7 +91,7 @@ public class MyDecorationActivity extends BaseBindingActivity<ActivityMyDecorati
|
||||
mBinding.ivBack.setOnClickListener(this);
|
||||
myHeadWearFragment = new MyHeadWearFragment();
|
||||
mMyCarFragment = MyCarFragment.instance(this);
|
||||
mMyNamePlateFragment = MyCarFragment.instance(this);
|
||||
mMyNamePlateFragment = new MyNamePlateFragment();
|
||||
viewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public int getCount() {
|
||||
|
@@ -136,7 +136,6 @@ public class MyHeadWearFragment extends BaseBindingFragment<FrgMyDecorationCommo
|
||||
//更新用户信息
|
||||
UserModel.get().updateCurrentUserInfo().subscribe();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void showSureDialog(int position) {
|
||||
|
@@ -1,26 +1,22 @@
|
||||
package com.yizhuan.erban.decoration.view;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
|
||||
import com.yizhuan.erban.BR;
|
||||
import com.trello.rxlifecycle2.android.FragmentEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseBindingFragment;
|
||||
import com.yizhuan.erban.base.BaseFragment;
|
||||
import com.yizhuan.erban.common.NoDataFragment;
|
||||
import com.yizhuan.erban.databinding.FrgMyDecorationCommonBinding;
|
||||
import com.yizhuan.erban.decoration.adapter.MyCarAdapter;
|
||||
import com.yizhuan.erban.decoration.adapter.MyNamePlateAdapter;
|
||||
import com.yizhuan.erban.decoration.viewmodel.MyCarVm;
|
||||
import com.yizhuan.erban.ui.widget.LoadingDialog;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.CarModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.nameplate.NamePlateModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.nameplate.bean.NamePlateInfo;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,31 +25,31 @@ import java.util.List;
|
||||
* on 2018/3/2.
|
||||
*/
|
||||
|
||||
@ActLayoutRes(R.layout.frg_my_nameplate_common)
|
||||
public class MyNamePlateFragment extends BaseBindingFragment<FrgMyDecorationCommonBinding> {
|
||||
|
||||
private ICarView mCarView;
|
||||
public class MyNamePlateFragment extends BaseFragment {
|
||||
|
||||
private MyNamePlateAdapter mNamePlateAdapter;
|
||||
private boolean first = true;
|
||||
private RecyclerView recyclerView;
|
||||
private SwipeRefreshLayout swipeRefresh;
|
||||
|
||||
private MyCarVm myCarVm;
|
||||
|
||||
public static MyNamePlateFragment instance(ICarView carView) {
|
||||
MyNamePlateFragment fragment = new MyNamePlateFragment();
|
||||
fragment.mCarView = carView;
|
||||
return fragment;
|
||||
@Override
|
||||
public int getRootLayoutId() {
|
||||
return R.layout.frg_my_nameplate_common;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onFindViews() {
|
||||
recyclerView = mView.findViewById(R.id.recycler_view);
|
||||
swipeRefresh = mView.findViewById(R.id.swipe_refresh);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
if (first && getUserVisibleHint()) {
|
||||
first = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,30 +58,13 @@ public class MyNamePlateFragment extends BaseBindingFragment<FrgMyDecorationComm
|
||||
|
||||
@Override
|
||||
public void initiate() {
|
||||
myCarVm = new MyCarVm();
|
||||
mBinding.setViewmodel(myCarVm);
|
||||
initRecyclerView();
|
||||
initSwipRefresh();
|
||||
loadData();
|
||||
}
|
||||
|
||||
mNamePlateAdapter = new MyNamePlateAdapter(R.layout.item_car_garage_normal, BR.carInfo);
|
||||
mNamePlateAdapter.setOnItemChildClickListener((adapter, view, position) -> {
|
||||
|
||||
switch (view.getId()) {
|
||||
case R.id.tv_buy:
|
||||
mCarView.showDetail(mNamePlateAdapter.getItem(position));
|
||||
break;
|
||||
|
||||
case R.id.tv_used:
|
||||
startDriving(mNamePlateAdapter.getItem(position));
|
||||
break;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.swipeRefresh.setOnRefreshListener(() -> getData());
|
||||
|
||||
mBinding.recyclerView.setAdapter(mNamePlateAdapter);
|
||||
mBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
||||
getData();
|
||||
private void initSwipRefresh() {
|
||||
swipeRefresh.setOnRefreshListener(() -> loadData());
|
||||
}
|
||||
|
||||
public MyNamePlateAdapter getAdapter() {
|
||||
@@ -95,35 +74,66 @@ public class MyNamePlateFragment extends BaseBindingFragment<FrgMyDecorationComm
|
||||
@Override
|
||||
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||
super.setUserVisibleHint(isVisibleToUser);
|
||||
if (isVisibleToUser && mCarView != null && mCarView.getCarGarageNeedUpdate()) {
|
||||
getData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void getData() {
|
||||
private void loadData() {
|
||||
NamePlateModel.get().getNamePlateList(AuthModel.get().getCurrentUid())
|
||||
.subscribe((serviceResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
|
||||
if (myCarVm == null)
|
||||
return;
|
||||
} else {
|
||||
List<NamePlateInfo.NameplateListBean> info = serviceResult.getNameplateList();
|
||||
if (ListUtils.isListEmpty(info)) {
|
||||
showNoData(R.drawable.icon_common_failure, "亲爱的用户,你还没有铭牌哦!");
|
||||
return;
|
||||
}
|
||||
|
||||
myCarVm.loadData(false).compose(bindToLifecycle())
|
||||
.doAfterTerminate(() -> {
|
||||
if (ListUtils.isListEmpty(mNamePlateAdapter.getData())) {
|
||||
showNoData(R.drawable.icon_common_failure, "亲爱的用户,你还没有座驾哦!");
|
||||
}
|
||||
mNamePlateAdapter.setNewData(info);
|
||||
mNamePlateAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
List<CarInfo> list = mNamePlateAdapter.getData();
|
||||
private void initRecyclerView() {
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
||||
layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
mNamePlateAdapter = new MyNamePlateAdapter();
|
||||
mNamePlateAdapter.setOnItemChildClickListener((adapter, view, position) -> {
|
||||
|
||||
for (CarInfo item : list) {
|
||||
if (item.getCarId() == 0) {
|
||||
list.remove(item);
|
||||
break;
|
||||
switch (view.getId()) {
|
||||
case R.id.tv_used:
|
||||
setUsedStatus(position);
|
||||
break;
|
||||
}
|
||||
});
|
||||
recyclerView.setAdapter(mNamePlateAdapter);
|
||||
}
|
||||
|
||||
private void setUsedStatus(int position) {
|
||||
NamePlateInfo.NameplateListBean nameplateInfo = mNamePlateAdapter.getData().get(position);
|
||||
// id == 0标识不使用头饰
|
||||
final int id = nameplateInfo.isUsing() ? 0 : nameplateInfo.getId();
|
||||
final String word = nameplateInfo.getWord();
|
||||
|
||||
NamePlateModel.get().useMyNamePlate(String.valueOf(id),word)
|
||||
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
||||
.doOnError(throwable -> {
|
||||
toast(throwable.getMessage());
|
||||
})
|
||||
.subscribe(s -> {
|
||||
for (int i = 0; i < mNamePlateAdapter.getData().size(); i++) {
|
||||
if (id == mNamePlateAdapter.getData().get(i).getId()) {
|
||||
mNamePlateAdapter.getData().get(i).setUsing(true);
|
||||
} else {
|
||||
mNamePlateAdapter.getData().get(i).setUsing(false);
|
||||
}
|
||||
}
|
||||
|
||||
mNamePlateAdapter.notifyDataSetChanged();
|
||||
})
|
||||
.subscribe();
|
||||
//更新用户信息
|
||||
UserModel.get().updateCurrentUserInfo().subscribe();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -143,38 +153,4 @@ public class MyNamePlateFragment extends BaseBindingFragment<FrgMyDecorationComm
|
||||
getChildFragmentManager().beginTransaction().replace(status.getId(), fragment, STATUS_TAG).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void startDriving(CarInfo carInfo) {
|
||||
final int id = carInfo.isUsing() ? 0 : carInfo.getCarId();
|
||||
LoadingDialog loadingDialog = new LoadingDialog(mContext);
|
||||
loadingDialog.show();
|
||||
|
||||
CarModel.get().driveThisCar(id)
|
||||
.subscribe((voidServiceResult, throwable) -> {
|
||||
loadingDialog.dismiss();
|
||||
if (voidServiceResult != null && voidServiceResult.isSuccess()) {
|
||||
//更换座驾状态,需要更新缓存
|
||||
UserModel.get().onlyUpdateLoginUserInfoCache();
|
||||
List<CarInfo> list = mNamePlateAdapter.getData();
|
||||
for (CarInfo item : list) {
|
||||
if (id == item.getCarId()) {
|
||||
item.setUsing(1);
|
||||
} else {
|
||||
item.setUsing(0);
|
||||
}
|
||||
}
|
||||
mNamePlateAdapter.notifyDataSetChanged();
|
||||
|
||||
} else if (voidServiceResult != null && !voidServiceResult.isSuccess()) {
|
||||
// Toast.makeText(mContext, "驾驶失败: 网络异常!", Toast.LENGTH_SHORT).show();
|
||||
SingleToastUtil.showToastShort("驾驶失败: 网络异常!");
|
||||
} else if (throwable != null) {
|
||||
// Toast.makeText(mContext, "驾驶失败: 网络异常!", Toast.LENGTH_SHORT).show();
|
||||
SingleToastUtil.showToastShort("驾驶失败: 网络异常!");
|
||||
} else {
|
||||
// Toast.makeText(mContext, "驾驶失败: 网络异常!", Toast.LENGTH_SHORT).show();
|
||||
SingleToastUtil.showToastShort("驾驶失败: 网络异常!");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ import com.yizhuan.erban.MainActivity;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.base.BaseFragment;
|
||||
import com.yizhuan.erban.base.BaseMvpFragment;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.databinding.FragmentMeBinding;
|
||||
@@ -37,7 +36,6 @@ import com.yizhuan.xchat_android_core.certification.CertificationModel;
|
||||
import com.yizhuan.xchat_android_core.customer_server.CustomerServerModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.headwear.bean.HeadWearInfo;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeBannerInfo;
|
||||
import com.yizhuan.xchat_android_core.family.bean.HomeTitleInfo;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TagListInfo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
@@ -58,14 +56,12 @@ import com.yizhuan.xchat_android_core.utils.StarUtils;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.callback.CallBack;
|
||||
import com.yizhuan.xchat_android_library.rxbus.RxBusHelper;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -331,7 +327,6 @@ public class MeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmentP
|
||||
break;
|
||||
|
||||
case R.id.ll_my_room:
|
||||
toast("我的房间");
|
||||
openRoom();
|
||||
break;
|
||||
case R.id.ll_collect_room:
|
||||
|
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/color_shadow"/>
|
||||
<corners android:radius="@dimen/dp_12"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="6dp"
|
||||
android:left="2dp"
|
||||
android:right="3dp"
|
||||
android:top="2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white"/>
|
||||
<corners android:radius="@dimen/dp_12"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@@ -6,8 +6,4 @@
|
||||
|
||||
<corners android:radius="@dimen/dp_17" />
|
||||
|
||||
<stroke
|
||||
android:width="@dimen/dp_2"
|
||||
android:color="@color/color_333333" />
|
||||
|
||||
</shape>
|
@@ -255,16 +255,6 @@
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<!--四个Tab的遮罩-->
|
||||
<!-- <View-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:background="@drawable/bg_my_top_bottom_white"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent" />-->
|
||||
|
||||
<!--关注 粉丝 用户等级 魅力等级-->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_user_info_tab"
|
||||
android:layout_width="match_parent"
|
||||
@@ -272,198 +262,138 @@
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="5"
|
||||
android:weightSum="2"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_avatar_head_wear"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tv_user_attentions"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:text="@{String.valueOf(userInfo.followNum)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="999" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_attention_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attention"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tv_user_fans"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@{String.valueOf(userInfo.fansNum)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="999999" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_fan_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/fan"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:textSize="@dimen/sp_11"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:background="#30FFFFFF" />
|
||||
<LinearLayout
|
||||
android:id="@+id/tv_user_attentions"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:text="@{String.valueOf(userInfo.followNum)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="999" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_attention_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attention"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tv_user_fans"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@{String.valueOf(userInfo.fansNum)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="999999" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_fan_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/fan"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:textSize="@dimen/sp_11"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:background="#30FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_my_room"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/my_room"
|
||||
android:drawableTop="@mipmap/icon_my_room"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:textSize="@dimen/sp_11"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_collect_room"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:drawableTop="@mipmap/icon_collect_room"
|
||||
android:text="@string/collect_room"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:textSize="@dimen/sp_11"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_my_room"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/my_room"
|
||||
android:drawableTop="@mipmap/icon_my_room"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:textSize="@dimen/sp_11"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_collect_room"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:drawableTop="@mipmap/icon_collect_room"
|
||||
android:text="@string/collect_room"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:textColor="@color/color_CEC0FF"
|
||||
android:textSize="@dimen/sp_11"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/fl_me_level"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:onClick="@{click}"-->
|
||||
<!-- android:orientation="vertical">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/iv_user_item_level"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:text="@{@string/lv + String.valueOf(userInfo.userLevelVo.experLevelSeq)}"-->
|
||||
<!-- android:textColor="#333333"-->
|
||||
<!-- android:textSize="18sp"-->
|
||||
<!-- tools:text="Lv.1123" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:text="@string/user_level"-->
|
||||
<!-- android:textColor="@color/color_CEC0FF"-->
|
||||
<!-- android:textSize="@dimen/sp_11" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/fl_me_charm"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:onClick="@{click}"-->
|
||||
<!-- android:orientation="vertical">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/iv_user_item_charm"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:text="@{String.valueOf(userInfo.userLevelVo.charmLevelSeq)}"-->
|
||||
<!-- android:textColor="#333333"-->
|
||||
<!-- android:textSize="18sp"-->
|
||||
<!-- tools:text="9999" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:text="@string/charm_level"-->
|
||||
<!-- android:textColor="@color/color_CEC0FF"-->
|
||||
<!-- android:textSize="@dimen/sp_11" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
<!-- </android.support.constraint.ConstraintLayout>-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -36,64 +36,24 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_name_container"
|
||||
android:layout_toEndOf="@+id/ll_car_cover"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_car_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:layout_toEndOf="@+id/ll_car_cover"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:singleLine="true"
|
||||
android:drawableLeft="@{carInfo.isGive ? @drawable/ic_send_tag : null}"
|
||||
android:drawableStart="@{carInfo.isGive ? @drawable/ic_send_tag : null}"
|
||||
android:drawablePadding="5dp"
|
||||
android:textSize="15sp"
|
||||
android:text="@{carInfo.name}"
|
||||
tools:text="神豪座驾" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_car_price"
|
||||
android:layout_toEndOf="@+id/ll_car_cover"
|
||||
android:layout_below="@+id/ll_name_container"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingTop="-4dp"
|
||||
android:layout_height="15dp"
|
||||
android:textColor="@color/appColor"
|
||||
android:textSize="13sp"
|
||||
tools:text="3000" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:divider="@drawable/divider_linear"
|
||||
android:showDividers="middle"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="购买"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_used"
|
||||
@@ -103,27 +63,20 @@
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_333333"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_alignTop="@id/tv_car_name"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="@string/label_can_use"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_seal"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
tools:text="暂不出售"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_counters"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_car_price"
|
||||
android:layout_alignBottom="@id/ll_car_cover"
|
||||
android:layout_toEndOf="@id/ll_car_cover"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="24dp"
|
||||
|
@@ -54,81 +54,35 @@
|
||||
android:drawablePadding="@dimen/dp_5"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_car_price"
|
||||
android:layout_toEndOf="@+id/ll_head_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_car_name"
|
||||
android:layout_marginStart="15dp"
|
||||
android:id="@+id/tv_used"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:background="@{headWearInfo.used ? @drawable/bg_my_head_invalid : @drawable/bg_my_head_buy}"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/appColor"
|
||||
android:textSize="12sp"
|
||||
tools:text="3000" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_my_head_wear_option"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:text="@{headWearInfo.used ? @string/label_used : @string/label_can_use}"
|
||||
android:textColor="@{headWearInfo.used ? @color/color_333333 : @color/white}"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_alignTop="@id/tv_car_name"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:divider="@drawable/divider_linear"
|
||||
android:showDividers="middle"
|
||||
android:layout_centerVertical="true">
|
||||
tools:visibility="visible"
|
||||
tools:text="@string/label_can_use"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:background="@{headWearInfo.status==1? @drawable/bg_my_head_renew:@drawable/bg_my_head_buy}"
|
||||
android:gravity="center"
|
||||
android:text="@{headWearInfo.status==1?@string/renew:@string/buy}"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="购买"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_used"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:background="@{headWearInfo.used ? @drawable/bg_my_head_invalid : @drawable/bg_my_head_buy}"
|
||||
android:gravity="center"
|
||||
android:text="@{headWearInfo.used ? @string/label_used : @string/label_can_use}"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="@string/label_can_use"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_seal"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
tools:text="暂不出售"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_toEndOf="@+id/ll_head_img"
|
||||
android:id="@+id/tv_counters"
|
||||
android:layout_toEndOf="@+id/ll_head_img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_car_price"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:gravity="center"
|
||||
android:drawableStart="@drawable/ic_time_left"
|
||||
android:drawablePadding="1dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_999999"
|
||||
android:layout_alignBottom="@id/ll_head_img"
|
||||
android:textSize="12sp"/>
|
||||
|
||||
<View
|
||||
|
@@ -1,35 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<data>
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="com.yizhuan.erban.base.BaseListViewModel"/>
|
||||
</data>
|
||||
<com.yizhuan.erban.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/status_layout"
|
||||
>
|
||||
|
||||
<com.yizhuan.erban.common.widget.StatusLayout
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:refreshing="@{viewmodel.loading}"
|
||||
android:background="@color/white">
|
||||
>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
date="@{viewmodel.data}"
|
||||
isLode="@{viewmodel.isLode}"
|
||||
newData="@{viewmodel.loadData}"
|
||||
error="@{viewmodel.throwable}"
|
||||
pageSize="@{viewmodel.pageSize}">
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
||||
|
||||
</layout>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
@@ -1,145 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bg_car_item_shop">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="carInfo"
|
||||
type="com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo" />
|
||||
</data>
|
||||
<FrameLayout
|
||||
android:id="@+id/ll_nameplate_cover"
|
||||
android:layout_width="112dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:padding="5dp"
|
||||
android:background="@drawable/bg_my_decoration_img"
|
||||
android:layout_height="80dp" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bg_car_item_shop">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ll_car_cover"
|
||||
android:layout_width="112dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:padding="5dp"
|
||||
android:background="@drawable/bg_my_decoration_img"
|
||||
android:layout_height="80dp" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_car_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tag"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
tools:src="@drawable/ic_mark_limit"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_name_container"
|
||||
android:layout_toEndOf="@+id/ll_car_cover"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_car_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:textColor="@color/color_333333"
|
||||
android:singleLine="true"
|
||||
android:drawableLeft="@{carInfo.isGive ? @drawable/ic_send_tag : null}"
|
||||
android:drawablePadding="5dp"
|
||||
android:textSize="15sp"
|
||||
android:text="@{carInfo.name}"
|
||||
tools:text="神豪座驾" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_car_price"
|
||||
android:layout_toEndOf="@+id/ll_car_cover"
|
||||
android:layout_below="@+id/ll_name_container"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingTop="-4dp"
|
||||
android:layout_height="15dp"
|
||||
android:textColor="@color/appColor"
|
||||
android:textSize="13sp"
|
||||
tools:text="3000" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:divider="@drawable/divider_linear"
|
||||
android:showDividers="middle"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:text="购买"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_used"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_333333"
|
||||
tools:text="@string/label_can_use"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_seal"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
tools:text="暂不出售"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_counters"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_car_price"
|
||||
android:layout_toEndOf="@id/ll_car_cover"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:drawableStart="@drawable/ic_time_left"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp"
|
||||
tools:text="- 1567天 -" />
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/iv_nameplate_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="@color/color_f0f0f0"/>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tag"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
tools:src="@drawable/ic_mark_limit"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nameplate_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:textColor="@color/color_333333"
|
||||
android:singleLine="true"
|
||||
android:layout_toEndOf="@+id/ll_nameplate_cover"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:drawablePadding="5dp"
|
||||
android:textSize="15sp"
|
||||
tools:text="神豪座驾" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_used"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignTop="@+id/tv_nameplate_name"
|
||||
android:textColor="@color/color_333333"
|
||||
tools:text="@string/label_can_use"
|
||||
tools:background="@drawable/bg_my_head_buy"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_counters"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/ll_nameplate_cover"
|
||||
android:layout_alignBottom="@+id/ll_nameplate_cover"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:drawableStart="@drawable/ic_time_left"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp"
|
||||
tools:text="- 1567天 -" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="@color/color_f0f0f0"/>
|
||||
</RelativeLayout>
|
@@ -303,9 +303,7 @@ public class PublishActivity extends BaseMvpActivity<IPublishView, PublishPresen
|
||||
case R.id.ll_group_choose:
|
||||
showChooseDialog(Constants.TYPE_ALL);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void showChooseDialog(byte type) {
|
||||
|
@@ -1,214 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_publish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:maxLength="500"
|
||||
android:text="@string/dy_publish"
|
||||
android:textColor="@color/color_7154EE"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title_bar" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="top"
|
||||
android:hint="@string/dy_say_something"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:maxLength="500"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColorHint="@color/color_BDBDBF"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_input_limit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:text="0/500"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textFontWeight="300"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/color_F4F4F4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_input_limit"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:text="@string/dy_publish_user_tips"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/nsv_publish"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_tips"
|
||||
app:layout_constraintTop_toBottomOf="@id/view" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rv_images"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="17.5dp"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:overScrollMode="never"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_choose_group"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_25" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_miniworld"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:background="@drawable/bg_dynamic_topic"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mini_world_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:paddingStart="@dimen/dp_11"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_7154EE"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="小世界名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_12"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:textColor="@color/color_7154EE"
|
||||
android:text="X"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_choose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
tools:visibility="gone"
|
||||
android:background="@drawable/bg_dynamic_topic_f4f4f4"
|
||||
android:text="添加话题"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_group_choose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_label_re_choose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_999999"
|
||||
android:layout_marginEnd="7.5dp"
|
||||
android:visibility="gone"
|
||||
android:text="重新选择"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/fl_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:flexDirection="row"
|
||||
app:flexWrap="wrap"
|
||||
app:justifyContent="flex_start"
|
||||
app:showDivider="end|middle"
|
||||
app:alignItems="flex_start"
|
||||
app:dividerDrawable="@drawable/divider_flexlayout"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@@ -9,8 +9,8 @@
|
||||
</item>
|
||||
<item
|
||||
android:bottom="5dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="1dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/white"/>
|
||||
|
@@ -1,20 +1,13 @@
|
||||
package com.yizhuan.erban.miniworld.adapter;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.xchat_android_core.miniworld.bean.MiniWorldInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* 小世界列表界面
|
||||
|
@@ -68,7 +68,7 @@ public class QuickLoginUiConfig {
|
||||
.setLoginBtnText("本机号码一键登录")
|
||||
.setLoginBtnTextColor(R.color.color_7154EE)
|
||||
.setLoginBtnBackgroundRes("bg_quick_pass")
|
||||
.setLoginBtnWidth(225)
|
||||
.setLoginBtnWidth(280)
|
||||
.setLoginBtnHeight(loginBtnHeight)
|
||||
.setLoginBtnTextSize(15)
|
||||
.setLoginBtnXOffset(X_OFFSET)
|
||||
|
Reference in New Issue
Block a user