Commit 575c7865 by 罗翻

自定义lrecyclerview和coreAdapter

parent 25a593b2
Showing with 847 additions and 258 deletions
......@@ -24,7 +24,6 @@ public class Constants {
public static final String BASE_URL = "http://47.94.101.239:3112";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String WEB_SOP = "http://192.168.1.117:8080/#/sop";
/**************************正式环境*******************************/
// public static final int DEBUGLEVEL = LogUtils.LEVEL_OFF;
......@@ -85,7 +84,7 @@ public class Constants {
/***********************其他配置**********************************/
public final static int PAGESIZE = 5;
public final static int PAGESIZE = 10;
//相册选择照片删除时传递的key
public final static String BUNDLE_KEY_ID = "BUNDLE_KEY_ID";
//通用的工程师id
......@@ -115,6 +114,7 @@ public class Constants {
public final static String SECOND_INDEX = "dump_second_index";
//环信message
public final static String HX_MESSAGE = "hx_message";
public static final int FLAG_MULTI_VH = 0x000001;
//订单状态
public final static int WATING_ORDER = 1;
public final static int APPOIMENT_ORDER = 2;
......
......@@ -142,7 +142,7 @@ public class Api {
.header("token", token)
.build();
}
Log.d("request_header", request.headers().toString());
// Log.d("request_header", request.headers().toString());
return chain.proceed(request);
}
......
......@@ -6,10 +6,10 @@ import android.util.Log;
import com.dayu.bigfish.R;
import com.dayu.bigfish.api.APIException;
import com.dayu.bigfish.ui.LoginActivity;
import com.dayu.bigfish.ui.views.CustomDialog;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.managers.UserManager;
import com.dayu.bigfish.ui.LoginActivity;
import com.dayu.bigfish.ui.views.CustomDialog;
import com.hyphenate.chat.EMClient;
import io.reactivex.Observer;
......
package com.dayu.bigfish.base.adapter;
package com.dayu.bigfish.base;
import android.databinding.ViewDataBinding;
import android.support.v7.widget.RecyclerView;
......@@ -6,10 +6,10 @@ import android.support.v7.widget.RecyclerView;
/**
* Created by luofan on 2017/12/9.
*/
public class BaseViewHolder<T extends ViewDataBinding> extends RecyclerView.ViewHolder {
public final T mBind;
public class BaseViewHolder<B extends ViewDataBinding> extends RecyclerView.ViewHolder {
public final B mBind;
public BaseViewHolder(T t) {
public BaseViewHolder(B t) {
super(t.getRoot());
mBind = t;
}
......
package com.dayu.bigfish.base.adapter;
package com.dayu.bigfish.base;
import android.content.Context;
import android.databinding.DataBindingUtil;
......@@ -10,7 +10,7 @@ import android.view.ViewGroup;
import com.dayu.bigfish.BR;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.ui.listener.OnItemClickListener;
import java.util.ArrayList;
import java.util.List;
......@@ -19,7 +19,7 @@ import java.util.List;
* Created by luofan on 2017/12/9.
*/
@SuppressWarnings("unchecked")
public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
private boolean needHint = false;
private TypeSelector<M> mTypeSelector;
private List<M> mItemList = new ArrayList<>();
......@@ -27,11 +27,13 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
private List<Item> mHeadTypeDatas = new ArrayList<>();
private List<Item> mFootTypeDatas = new ArrayList<>();
private int viewType;
private int mFooterViewType = R.layout.recycler_foot;
private int mFooterViewType = R.layout.lrecycler_foot;
protected Context mContext;
private int mTotalPage;
private int mPage = 1;
public boolean isLoadFial = false;
private OnItemClickListener mOnItemClickListener;
private BasePresenter mPresenter;
@Override
public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
......@@ -39,8 +41,10 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
return new BaseViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), viewType, parent, false));
}
public CoreAdapter() {
mFootTypeDatas.add(new Item(mFooterViewType, true));
public CoreAdapter(boolean needFoot) {
if (needFoot) {
mFootTypeDatas.add(new Item(mFooterViewType, true));
}
}
@Override
......@@ -59,10 +63,18 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
if (needHint) {
holder.itemView.setTag(item);
}
if (mPresenter != null) {
holder.mBind.setVariable(BR.presenter, mPresenter);
}
holder.mBind.setVariable(BR.item, item);
holder.mBind.executePendingBindings();
if (item != null && !(item instanceof Boolean)) {
onBind(holder, position, (M) item);
holder.mBind.getRoot().setOnClickListener(v -> {
if (mOnItemClickListener != null) {
mOnItemClickListener.OnItemClick(item, holder.mBind, position);
}
});
}
}
}
......@@ -120,7 +132,7 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
}
}
public void addData(BasePageBean<M> data) {
public void addPageData(BasePageBean<M> data) {
if (data == null) {
isHasMore = false;
notifyDataSetChanged();
......@@ -137,7 +149,7 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
notifyDataSetChanged();
}
public void setNewData(BasePageBean<M> data) {
public void setPageData(BasePageBean<M> data) {
mPage = 1;
mTotalPage = data.getTotalPages();
if (mPage >= mTotalPage) {
......@@ -149,11 +161,20 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
notifyDataSetChanged();
}
public void setData(List<M> data) {
this.mItemList = data;
notifyDataSetChanged();
}
@Override
public int getItemCount() {
return mItemList.size() + mHeadTypeDatas.size() + mFootTypeDatas.size();
}
public void setPresenter(BasePresenter presenter) {
mPresenter = presenter;
}
public class Item {
int type;
Object data;
......@@ -166,4 +187,13 @@ public class CoreAdapter<M> extends RecyclerView.Adapter<BaseViewHolder> {
protected void onBind(BaseViewHolder holder, int position, M item) {
}
public void setOnItemClickListener(OnItemClickListener<M, B> listener) {
mOnItemClickListener = listener;
}
public Context getContext() {
return mContext;
}
}
\ No newline at end of file
package com.dayu.bigfish.base.adapter;
package com.dayu.bigfish.base;
/**
* Created by luofan on 2017/12/9.
......
......@@ -99,13 +99,13 @@ public class OrderDetail {
private String appointmentTime;
private String comment;
private String confirmDoorTime;
private Object confirmDoorComment;
private String confirmDoorComment;
private Object serviceRecordComment;
private Object customerCheckComment;
private Integer isPay;
private Object payType;
private Integer doorPrice;
private Object doorPriceComment;
private String doorPriceComment;
private Integer servicePrice;
private Object servicePriceComment;
private Integer materialCost;
......@@ -399,11 +399,11 @@ public class OrderDetail {
this.confirmDoorTime = confirmDoorTime;
}
public Object getConfirmDoorComment() {
public String getConfirmDoorComment() {
return confirmDoorComment;
}
public void setConfirmDoorComment(Object confirmDoorComment) {
public void setConfirmDoorComment(String confirmDoorComment) {
this.confirmDoorComment = confirmDoorComment;
}
......@@ -447,11 +447,11 @@ public class OrderDetail {
this.doorPrice = doorPrice;
}
public Object getDoorPriceComment() {
public String getDoorPriceComment() {
return doorPriceComment;
}
public void setDoorPriceComment(Object doorPriceComment) {
public void setDoorPriceComment(String doorPriceComment) {
this.doorPriceComment = doorPriceComment;
}
......
......@@ -24,12 +24,7 @@ public class AccountBalancePresenter extends AccountBalanceContract.Presenter {
public void accept(BasePageBean<AccountBalance> accountBalanceBasePageBean) throws Exception {
mView.getBalanceSuccess(accountBalanceBasePageBean);
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
mView.getBalanceError();
}
}));
}, throwable -> mView.getBalanceError()));
}
@Override
......
......@@ -9,8 +9,6 @@ import com.app.annotation.apt.InstanceFactory;
@InstanceFactory
public class HomeMessagePresenter extends HomeMessageContract.Presenter {
@Override
public void onAttached() {
......
......@@ -20,8 +20,40 @@ public interface messageContract {
}
abstract class Presenter extends BasePresenter<View> {
/**
* 获取换新消息.
*
* @param hxUserId
* @param category 1:系统消息,2:大鱼通知.
* @param page
* @param pageSize
*/
public abstract void getHxMessage(String hxUserId, int category, int page, int pageSize);
public abstract void readMessage(int id,int read);
/**
* 阅读信息
*
* @param id messageId.
* @param read 默认1.
*/
public abstract void readMessage(int id, int read);
/**
* 格式化时间.
*
* @param time
* @param srcPattern
* @param pattern
* @return
*/
public abstract String FomartTime(String time, String srcPattern, String pattern);
/**
* 阅读信息并跳转.
*
* @param message
* @param view
*/
public abstract void readAndDump(NewMessage message, android.view.View view);
}
}
package com.dayu.bigfish.presenter.message;
import android.content.Intent;
import android.view.View;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.NewMessage;
import com.dayu.bigfish.ui.SystemMesDetailActivity;
import com.dayu.bigfish.utils.UtilsDate;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.ParseException;
import io.reactivex.functions.Consumer;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import static com.dayu.bigfish.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
/**
* Created by luofan on 2017/11/8.
*/
......@@ -30,12 +41,7 @@ public class messagePresenter extends messageContract.Presenter {
public void accept(BasePageBean<NewMessage> messageBasePageBean) throws Exception {
mView.getHxMessageSuccess(messageBasePageBean);
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
mView.getHxMessageFail();
}
}));
}, throwable -> mView.getHxMessageFail()));
}
@Override
......@@ -56,4 +62,34 @@ public class messagePresenter extends messageContract.Presenter {
}));
}
@Override
public String FomartTime(String time, String srcPattern, String pattern) {
try {
if (pattern.equals(LONG_TIME_FORMAT_TWO)) {
return UtilsDate.changeFormat(time, srcPattern, pattern);
}
if (UtilsDate.IsToday(time)) {
return mActivity.getString(R.string.today);
} else if (UtilsDate.IsNextday(time)) {
return mActivity.getString(R.string.tomorrow);
} else {
return UtilsDate.changeFormat(time, srcPattern, pattern);
}
} catch (ParseException e) {
e.printStackTrace();
return "";
}
}
@Override
public void readAndDump(NewMessage message, View view) {
if (message.getRead() == 0) {
readMessage(message.getId(), 1);
view.setVisibility(View.GONE);
}
Intent intent = new Intent(mActivity, SystemMesDetailActivity.class);
intent.putExtra(Constants.HX_MESSAGE, message);
intent.putExtra("category", message.getCategory());
mActivity.startActivity(intent);
}
}
......@@ -17,6 +17,7 @@ public interface OrderDetailContract {
* 备注过长,显示查看更多.
*/
void lookMore();
}
abstract class Presenter extends BasePresenter<View> {
......@@ -26,5 +27,10 @@ public interface OrderDetailContract {
* 备注过长,显示查看更多.
*/
public abstract void lookMore();
/**
* 获取订单状态.
*/
public abstract String getStaus(int staus);
}
}
......@@ -2,6 +2,7 @@ package com.dayu.bigfish.presenter.orderdetail;
import com.app.annotation.apt.InstanceFactory;
import com.apt.ApiFactory;
import com.dayu.bigfish.R;
import com.dayu.bigfish.bean.OrderDetail;
import io.reactivex.functions.Consumer;
......@@ -32,5 +33,24 @@ public class OrderDetailPresenter extends OrderDetailContract.Presenter {
mView.lookMore();
}
@Override
public String getStaus(int staus) {
if (staus == 1) {
return mActivity.getString(R.string.not_receive_order);
} else if (staus == 2) {
return mActivity.getString(R.string.not_appointment_already);
} else if (staus == 3) {
return mActivity.getString(R.string.appointment_already);
} else if (staus == 4) {
return mActivity.getString(R.string.order_doing);
} else if (staus == 5) {
return mActivity.getString(R.string.finish_order);
} else if (staus == 6) {
return mActivity.getString(R.string.cancle_order);
} else if (staus == 7) {
return mActivity.getString(R.string.order_close);
} else {
return null;
}
}
}
......@@ -28,6 +28,7 @@ public class WorksRecordPresenter extends WroksRecordContract.Presenter {
}, throwable -> mView.getWorkRecordFail()));
}
@Override
public void hideSearch() {
mView.hideSearch();
......@@ -37,4 +38,5 @@ public class WorksRecordPresenter extends WroksRecordContract.Presenter {
public void showSearch() {
mView.showSearch();
}
}
......@@ -59,6 +59,7 @@ public class AccountBalanceActivity extends BaseBingdActivity<AccountBalancePres
mBind.swipeRefersh.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mBind.rlBalance);
mAdapter.setEnableLoadMore(false);
}
@Override
......
......@@ -102,7 +102,6 @@ public class ReceivingActivity extends BaseBingdActivity<ReceivingPresenter, Act
mAdapter.loadMoreEnd();
} else {
mAdapter.loadMoreComplete();
mPage += 1;
}
mPage += 1;
if (orders.getData().size() == 0) {
......
......@@ -27,7 +27,7 @@ import static com.dayu.bigfish.utils.UtilsDate.SHORT_DATE_FORMAT;
public class SystemMesDetailActivity extends DataBindingActivity<ActivityMessageDetailBinding> {
private NewMessage message;
private int mState;
private int mCategory;
@Override
public int getLayoutId() {
......@@ -38,7 +38,7 @@ public class SystemMesDetailActivity extends DataBindingActivity<ActivityMessage
public void initView() {
mBind.tvTitle.setText(getString(R.string.message_dayu_detail));
message = (NewMessage) getIntent().getSerializableExtra(Constants.HX_MESSAGE);
mState = getIntent().getIntExtra("state", 0);
mCategory = getIntent().getIntExtra("category", 1);
String time = null;
try {
String dateMD = UtilsDate.changeFormat(message.getCreateTime(), FORMAT_ONE, SHORT_DATE_FORMAT);
......@@ -54,7 +54,7 @@ public class SystemMesDetailActivity extends DataBindingActivity<ActivityMessage
mBind.tvMessageTitle.setText(message.getTitle());
mBind.tvMessageTime.setText(time);
mBind.tvMessageContent.setText("\u3000" + "\u3000" + message.getContent());
if (mState == 1) {
if (mCategory == 2) {
mBind.tvMessageCheck.setVisibility(View.GONE);
} else {
mBind.tvMessageCheck.setVisibility(View.VISIBLE);
......
......@@ -6,10 +6,9 @@ import android.support.v4.app.Fragment;
import android.view.View;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseBingFragment;
import com.dayu.bigfish.base.DataBindingFragment;
import com.dayu.bigfish.databinding.FragmentMessageBinding;
import com.dayu.bigfish.presenter.homemessage.HomeMessageContract;
import com.dayu.bigfish.presenter.homemessage.HomeMessagePresenter;
import com.dayu.bigfish.ui.adapter.FragmentOrderAdapter;
import com.dayu.bigfish.utils.TabLayoutUtils;
......@@ -20,7 +19,7 @@ import java.util.List;
* Created by luofan on 2017/11/20.
*/
public class HomeMessageTabFragment extends BaseBingFragment<HomeMessagePresenter, FragmentMessageBinding>
public class HomeMessageTabFragment extends DataBindingFragment<FragmentMessageBinding>
implements HomeMessageContract.View {
private List<Fragment> list;
private FragmentOrderAdapter fragmentAdapter;
......@@ -51,11 +50,19 @@ public class HomeMessageTabFragment extends BaseBingFragment<HomeMessagePresente
public void initData() {
list = new ArrayList<>();
list.add(new SystemMessageFragment());
list.add(new BigFishMessageFragment());
Bundle bundle = new Bundle();
bundle.putInt("category", 1);
Bundle secondBundle = new Bundle();
secondBundle.putInt("category", 2);
MessageFragment systemMessageFragment = MessageFragment.newInstance();
MessageFragment dayuMessageFragment = MessageFragment.newInstance();
systemMessageFragment.setArguments(bundle);
dayuMessageFragment.setArguments(secondBundle);
list.add(systemMessageFragment);
list.add(dayuMessageFragment);
fragmentAdapter = new FragmentOrderAdapter(getActivity().getSupportFragmentManager(), list);
mBind.vpMessage.setAdapter(fragmentAdapter);
mBind.tbMessage.setupWithViewPager( mBind.vpMessage);
mBind.tbMessage.setupWithViewPager(mBind.vpMessage);
mBind.tbMessage.removeAllTabs();
mBind.tbMessage.addTab(mBind.tbMessage.newTab().setText(mActivity.getString(R.string.message_system)));
mBind.tbMessage.addTab(mBind.tbMessage.newTab().setText(mActivity.getString(R.string.message_dayu)));
......
......@@ -12,9 +12,6 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.MyApplication;
import com.dayu.bigfish.R;
......@@ -44,7 +41,7 @@ public class HomePersonFragment extends BaseBingFragment<HomeFourPresenter, Frag
implements HomeFourContract.View {
private int userId;
private int siteId;
private String mHeaderUrl;
private static String mHeaderUrl;
private String mUserName;
private String mUserPhone;
private String mScore;
......@@ -69,15 +66,8 @@ public class HomePersonFragment extends BaseBingFragment<HomeFourPresenter, Frag
mBind.tvAllAchivement.setTypeface(tf);
mBind.tvOrderRecord.setTypeface(tf);
mHeaderUrl = GetUserInfo.getUserHead(mActivity);
if (TextUtils.isEmpty(mHeaderUrl)) {
mBind.ivHeader.setImageResource(R.mipmap.user_head);
} else {
RequestOptions options = new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.ALL);
Glide.with(this)
.load(mHeaderUrl)
.apply(options)
.into(mBind.ivHeader);
if (!TextUtils.isEmpty(mHeaderUrl)){
mBind.setImgurl(mHeaderUrl);
}
return view;
}
......@@ -115,14 +105,14 @@ public class HomePersonFragment extends BaseBingFragment<HomeFourPresenter, Frag
private void showAlertDialog() {
CustomDialog dialog = new CustomDialog(mActivity, R.style.custom_dialog2, mActivity.getString(R.string.not_set_account)
, (dialog1, confirm) -> {
if (confirm) {
Intent intent = new Intent(mActivity, WithdrawalsActivity.class);
startActivity(intent);
dialog1.dismiss();
} else {
}
dialog1.dismiss();
});
if (confirm) {
Intent intent = new Intent(mActivity, WithdrawalsActivity.class);
startActivity(intent);
dialog1.dismiss();
} else {
}
dialog1.dismiss();
});
dialog.setTitle(mActivity.getString(R.string.notice))
.setNegativeButton(mActivity.getString(R.string.not_set_account))
.setPositiveButton(mActivity.getString(R.string.go_set_up));
......
package com.dayu.bigfish.ui.fragment;
import android.os.Bundle;
import android.view.View;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseBingFragment;
import com.dayu.bigfish.base.BasePageBean;
import com.dayu.bigfish.bean.NewMessage;
import com.dayu.bigfish.databinding.LrecyclerViewBinding;
import com.dayu.bigfish.presenter.message.messageContract;
import com.dayu.bigfish.presenter.message.messagePresenter;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ProgressUtil;
/**
* 系统工单状态通知
* on 2017/10/11.
*/
public class MessageFragment extends BaseBingFragment<messagePresenter, LrecyclerViewBinding>
implements messageContract.View {
private String hxUserId;
private int mPage = 1;
private int mPageSize = Constants.PAGESIZE;
private int mCategory = 1;
public static MessageFragment newInstance() {
Bundle args = new Bundle();
MessageFragment fragment = new MessageFragment();
fragment.setArguments(args);
return fragment;
}
@Override
public View initView(View view) {
mCategory = getArguments().getInt("category", 1);
if (mCategory == 1) {
initData();
}
return view;
}
@Override
public int getLayoutId() {
return R.layout.lrecycler_view;
}
@Override
protected void lazyLoad() {
if (mCategory == 2) {
initData();
}
}
public void initData() {
hxUserId = GetUserInfo.getHxUserId(mActivity);
ProgressUtil.startLoad(mActivity);
mPresenter.getHxMessage(hxUserId, mCategory, mPage, mPageSize);
initListener();
}
private void initListener() {
mBind.lRecycle.setPresenter(mPresenter);
mBind.lRecycle.setRefreshListener(() -> {
mPage = 1;
mPresenter.getHxMessage(hxUserId, mCategory, mPage, mPageSize);
});
mBind.lRecycle.setOnLoadMoreListener(
() -> mPresenter.getHxMessage(hxUserId, mCategory, mPage, mPageSize));
}
@Override
public void getHxMessageSuccess(BasePageBean<NewMessage> message) {
mPage++;
mBind.lRecycle.setPageData(message);
}
@Override
public void getHxMessageFail() {
mBind.lRecycle.setDataFail();
}
@Override
public void readMessageSuccess() {
}
}
......@@ -5,13 +5,13 @@ import android.view.View;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseBingFragment;
import com.dayu.bigfish.base.CoreAdapter;
import com.dayu.bigfish.bean.OrderDetail;
import com.dayu.bigfish.databinding.FragmentOrderDatailsBinding;
import com.dayu.bigfish.presenter.orderdetail.OrderDetailContract;
import com.dayu.bigfish.presenter.orderdetail.OrderDetailPresenter;
import com.dayu.bigfish.ui.adapter.AccessoriesAdapter;
import com.dayu.bigfish.utils.ProgressUtil;
import com.dayu.bigfish.utils.UIUtils;
/**
* 工单记录的Fragment
......@@ -22,9 +22,8 @@ public class OrderDatailsFragment extends BaseBingFragment<OrderDetailPresenter,
implements OrderDetailContract.View {
private int orderId;
private int mOrderStaus;
private boolean mFlag = true;
private AccessoriesAdapter mAdapter;
private CoreAdapter mAdapter;
@Override
public View initView(View view) {
......@@ -53,32 +52,12 @@ public class OrderDatailsFragment extends BaseBingFragment<OrderDetailPresenter,
}
public void initDataView(OrderDetail dataBean) {
mOrderStaus = dataBean.getStatus();
if (mOrderStaus == 1) {
mBind.tvOrderState.setText(mActivity.getString(R.string.not_receive_order));
} else if (mOrderStaus == 2) {
mBind.tvOrderState.setText(mActivity.getString(R.string.not_appointment_already));
} else if (mOrderStaus == 3) {
mBind.tvOrderState.setText(mActivity.getString(R.string.appointment_already));
} else if (mOrderStaus == 4) {
mBind.tvOrderState.setText(mActivity.getString(R.string.order_doing));
} else if (mOrderStaus == 5) {
mBind.tvOrderState.setText(mActivity.getString(R.string.finish_order));
} else if (mOrderStaus == 6) {
mBind.tvOrderState.setText(mActivity.getString(R.string.cancle_order));
} else if (mOrderStaus == 7) {
mBind.tvOrderState.setText(mActivity.getString(R.string.order_close));
}
if (UIUtils.isOverFlowed(mBind.tvOrderRmark)) {
mBind.tvLookMore.setVisibility(View.VISIBLE);
} else {
mBind.tvLookMore.setVisibility(View.GONE);
}
if (dataBean.getAccessories() != null && dataBean.getAccessories().size() != 0) {
mAdapter = new AccessoriesAdapter(R.layout.item_accessories_layout);
mAdapter = new CoreAdapter<String, FragmentOrderDatailsBinding>(false);
mBind.rlAccessories.setLayoutManager(new LinearLayoutManager(mActivity));
mAdapter.setViewType(R.layout.item_accessories_layout);
mBind.rlAccessories.setAdapter(mAdapter);
mAdapter.setNewData(dataBean.getAccessories());
mAdapter.setData(dataBean.getAccessories());
}
}
......
......@@ -26,7 +26,7 @@ import com.dayu.bigfish.utils.ProgressUtil;
* on 2017/10/11.
*/
public class SystemMessageFragment extends BaseBingFragment<messagePresenter,FragmentMessageSystemBinding>
public class SystemMessageFragment extends BaseBingFragment<messagePresenter, FragmentMessageSystemBinding>
implements messageContract.View, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
private SystemMessageAdapter mAdapter;
private String hxUserId;
......@@ -76,7 +76,6 @@ public class SystemMessageFragment extends BaseBingFragment<messagePresenter,Fra
mBind.spRefersh.setOnRefreshListener(this);
mAdapter.setOnLoadMoreListener(this, mBind.rlMessage);
mAdapter.setEnableLoadMore(false);
mAdapter.disableLoadMoreIfNotFullPage(mBind.rlMessage);
initListener();
}
......
package com.dayu.bigfish.ui.listener;
/**
* Created by luofan on 2017/12/10.
*/
public interface OnItemClickListener<M,B> {
void OnItemClick(M item,B bind, int position);
}
package com.dayu.bigfish.ui.listener;
/**
* Created by luofan on 2017/12/8.
*/
public interface OnRefreshListener {
void refresh();
}
package com.dayu.bigfish.ui.listener;
/**
* Created by luofan on 2017/12/8.
*/
public interface onLoadMoreListener {
void onLoadMore();
}
package com.dayu.bigfish.utils;
import android.content.Context;
import android.databinding.BindingAdapter;
import android.support.annotation.DrawableRes;
import android.widget.ImageView;
......@@ -34,6 +35,23 @@ public class GlideImageLoader {
.apply(options)
.into(view);
}
/**
* databing加载图片.
* @param view
* @param url
*/
@BindingAdapter({"imageUrl"})
public static void loadImage(ImageView view, String url) {
RequestOptions options = new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.ALL);
Glide.with(view.getContext())
.load(url)
.apply(options)
.into(view);
}
/* *//**
* 下载图片转换圆角
* @param mContext
......
......@@ -2,14 +2,11 @@ package com.dayu.bigfish.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.v4.content.SharedPreferencesCompat;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;
import static android.R.attr.key;
/**
* SharedPreferences的工具类
*/
......
......@@ -5,8 +5,6 @@ import android.os.Looper;
import android.support.annotation.StringRes;
import android.widget.Toast;
import org.w3c.dom.Text;
/**
* 吐司工具类
* on 2017/8/22.
......
......@@ -2,7 +2,9 @@ package com.dayu.bigfish.utils;
import android.content.Context;
import android.content.res.Resources;
import android.databinding.BindingConversion;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.widget.TextView;
import com.dayu.bigfish.MyApplication;
......@@ -90,5 +92,14 @@ public class UIUtils {
}
}
@BindingConversion
public static Typeface convertStringToFace(String s) {
try {
return Typeface.createFromAsset(MyApplication.getContext().getAssets(), s);
} catch (Exception e) {
throw e;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="360">
<shape
android:innerRadiusRatio="2.5"
android:shape="ring"
android:thicknessRatio="10"
android:useLevel="false">
<gradient
android:centerColor="?attr/colorPrimary"
android:centerY="0.50"
android:endColor="?attr/colorWhite"
android:startColor="?attr/colorPrimaryDark"
android:type="sweep"
android:useLevel="false" />
</shape>
</rotate>
\ No newline at end of file
......@@ -3,19 +3,19 @@
<data>
<import type="com.dayu.bigfish.presenter.orderdetail.OrderDetailPresenter"/>
<import type="android.view.View"/>
<import type="com.dayu.bigfish.bean.OrderDetail"/>
<import type="android.text.TextUtils"/>
<import type="android.view.View"/>
<import type="com.dayu.bigfish.utils.UIUtils"/>
<variable
name="presenter"
type="OrderDetailPresenter"/>
type="com.dayu.bigfish.presenter.orderdetail.OrderDetailPresenter"/>
<variable
name="item"
type="OrderDetail"/>
type="com.dayu.bigfish.bean.OrderDetail"/>
</data>
<ScrollView
......@@ -62,7 +62,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_one"
android:text='@{(item.orderNum == null || item.orderNum == "")?(@string/no_data):item.orderNum}'
android:text='@{!TextUtils.isEmpty(item.orderNum)?item.orderNum:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -85,7 +85,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_two"
android:text="未预约"
android:text='@{presenter.getStaus(item.status)}'
android:textColor="@color/cl_tab_read"
android:textSize="@dimen/sp_13.3"/>
......@@ -108,7 +108,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/tv_serve"
android:text='@{(item.spuName == null || item.spuName == "")?(@string/no_data):item.spuName}'
android:text='@{!TextUtils.isEmpty(item.spuName)?item.spuName:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -131,7 +131,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_three"
android:text='@{(item.categoryName == null || item.categoryName == "")?(@string/no_data):item.categoryName}'
android:text='@{!TextUtils.isEmpty(item.categoryName)?item.categoryName:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -154,7 +154,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_foure"
android:text='@{(item.providerName == null || item.providerName == "")?(@string/no_data):item.providerName}'
android:text='@{!TextUtils.isEmpty(item.providerName)?item.providerName:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -176,7 +176,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_foure"
android:text='@{(item.confirmDoorTime == null || item.confirmDoorTime == "")?(@string/no_data):item.confirmDoorTime}'
android:text='@{!TextUtils.isEmpty(item.confirmDoorTime)?item.confirmDoorTime:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -210,7 +210,7 @@
android:gravity="center_vertical"
android:maxEms="500"
android:maxLines="2"
android:text='@{(item.comment == null || item.comment == "")?(@string/no_data):item.comment}'
android:text='@{!TextUtils.isEmpty(item.comment)?item.comment:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="13.3sp"/>
......@@ -224,7 +224,7 @@
android:text="查看更多"
android:textColor="@color/cl_receiving_order_item_data"
android:textSize="13.3sp"
android:visibility="gone"/>
android:visibility="@{UIUtils.isOverFlowed(tvOrderRmark)?View.VISIBLE:View.GONE}"/>
</RelativeLayout>
......@@ -319,7 +319,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_three"
android:text='@{(item.customerName == null || item.customerName == "")?(@string/no_data):item.customerName}'
android:text='@{!TextUtils.isEmpty(item.customerName)?item.customerName:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -342,7 +342,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_four"
android:text='@{(item.customerMobile == null || item.customerMobile == "")?(@string/no_data):item.customerMobile}'
android:text='@{!TextUtils.isEmpty(item.customerMobile)?item.customerMobile:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -388,7 +388,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/text_foure"
android:text='@{(item.appointmentTime == null || item.appointmentTime == "")?(@string/no_data):item.appointmentTime}'
android:text='@{!TextUtils.isEmpty(item.appointmentTime)?item.appointmentTime:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -432,7 +432,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_text_two"
android:text='@{(item.brandName == null || item.brandName == "")?(@string/no_data):item.brandName}'
android:text='@{!TextUtils.isEmpty(item.brandName)?item.brandName:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -455,7 +455,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_two_two"
android:text='@{(item.productModel == null || item.productModel == "")?(@string/no_data):item.productModel}'
android:text='@{!TextUtils.isEmpty(item.productModel)?item.productModel:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -501,7 +501,7 @@
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_four_four"
android:text='@{(item.sn == null || item.sn == "")?(@string/no_data):item.sn}'
android:text='@{!TextUtils.isEmpty(item.sn)?item.sn:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
......@@ -669,7 +669,7 @@
android:layout_toRightOf="@id/four_text_ten"
android:ellipsize="end"
android:maxLines="2"
android:text='@{(item.doorPriceComment == null || item.doorPriceComment == "")?(@string/no_data):item.doorPriceComment}'
android:text='@{!TextUtils.isEmpty(item.doorPriceComment)?item.doorPriceComment:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"/>
</RelativeLayout>
......
......@@ -8,6 +8,10 @@
<variable
name="presenter"
type="HomeFourPresenter"/>
<variable
name="imgurl"
type="String"/>
</data>
<RelativeLayout
......@@ -32,8 +36,8 @@
<ImageView
android:id="@+id/iv_setting"
style="@style/title_right_image"
android:src="@mipmap/person_setting"
android:onClick="@{()->presenter.dumpToSetting()}"
android:src="@mipmap/person_setting"
/>
</RelativeLayout>
......@@ -56,6 +60,7 @@
<com.dayu.bigfish.ui.views.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/iv_header"
imageUrl="@{imgurl}"
android:layout_width="@dimen/size_login_mlcircleimageview_width"
android:layout_height="@dimen/size_login_mlcircleimageview_height"
android:layout_centerHorizontal="true"
......@@ -200,8 +205,8 @@
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginLeft="@dimen/dp_13.3"
android:onClick="@{()->presenter.dumpToAccount()}"
android:background="@drawable/personal_center_selector"
android:onClick="@{()->presenter.dumpToAccount()}"
>
<TextView
......@@ -302,8 +307,8 @@
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginLeft="@dimen/dp_13.3"
android:onClick="@{()->presenter.dumpToOrderRecord()}"
android:background="@drawable/personal_center_selector">
android:background="@drawable/personal_center_selector"
android:onClick="@{()->presenter.dumpToOrderRecord()}">
<TextView
android:id="@+id/text_gongdan"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<layout>
<TextView
android:id="@+id/tv_accessories_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="122233ed"
android:textColor="@color/cl_receiving_order_item_data"
android:textSize="@dimen/sp_13.3"
/>
</LinearLayout>
\ No newline at end of file
<data>
<variable
name="item"
type="com.dayu.bigfish.bean.OrderDetail.accessories"/>
</data>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_accessories_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="@{item.name}"
android:textColor="@color/cl_receiving_order_item_data"
android:textSize="@dimen/sp_13.3"
/>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<import type="android.view.View"/>
<import type="com.dayu.bigfish.utils.UtilsDate"/>
<variable
name="item"
type="com.dayu.bigfish.bean.NewMessage"/>
<variable
name="presenter"
type="com.dayu.bigfish.presenter.message.messagePresenter"/>
</data>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/item"
android:layout_width="@dimen/dp_333"
android:layout_height="@dimen/dp_80"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/item_shape"
android:onClick="@{()->presenter.readAndDump(item,readState)}">
<TextView
android:id="@+id/line_textView"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="89dp"
android:background="@color/line_color"
/>
<TextView
android:id="@+id/message_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/line_textView"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_18"
android:text="@{presenter.FomartTime(item.createTime,UtilsDate.FORMAT_ONE, UtilsDate.SHORT_DATE_FORMAT)}"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_12"
android:typeface="@{@string/tv_fonts}"
/>
<TextView
android:id="@+id/message_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/line_textView"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_34"
android:text="@{presenter.FomartTime(item.createTime,UtilsDate.FORMAT_ONE, UtilsDate.LONG_TIME_FORMAT_TWO)}"
android:textColor="@color/cl_home_title_text_color"
android:textSize="24sp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignLeft="@id/line_textView"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16"
android:gravity="center_vertical"
android:orientation="horizontal"
>
<TextView
android:id="@+id/message_text_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:text="@{item.title}"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/read_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_21.3"
android:layout_toRightOf="@id/message_text_content"
android:text="未读"
android:textColor="@color/cl_tab_read"
android:textSize="@dimen/sp_10"
android:visibility='@{item.read ==1?View.GONE:View.VISIBLE}'
/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="@null"
android:scrollbars="none"/>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/ll_emptyview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f3f3f3"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@mipmap/yu"
/>
<TextView
android:id="@+id/tv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/iv_empty"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_13"
android:text="暂无数据"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_13.3"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<import type="android.view.View"/>
<variable
name="item"
type="Boolean"/>
</data>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:orientation="horizontal">
<ProgressBar
android:id="@+id/progressbar"
style="@android:style/Widget.ProgressBar.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateDrawable="@anim/progress_round"
android:visibility="@{item == null?View.GONE:(item?View.VISIBLE:View.GONE)}"/>
<TextView
android:id="@+id/tv_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:clickable="@{item == null?true:false}"
android:text='@{item !=null? (item?"正在加载" :"没有更多数据"):"加载失败(再次上拉试试~)"}'
/>
</LinearLayout>
</layout>
\ No newline at end of file
<?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">
<com.dayu.bigfish.ui.views.LRecyclerView
android:id="@+id/l_recycle"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:itemType="@layout/item_message_layout"
android:background="#f5f5f5"
app:needCoreAdapter="true"
/>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:orientation="vertical">
<layout>
<RelativeLayout
android:id="@+id/item"
android:layout_width="@dimen/dp_333"
android:layout_height="@dimen/dp_80"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/item_shape">
<data>
<TextView
android:id="@+id/line_textView"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="89dp"
android:background="@color/line_color"
/>
<variable
name="item"
type="com.dayu.bigfish.bean.NewMessage"/>
</data>
<TextView
android:id="@+id/message_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/line_textView"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_18"
android:text="08-10"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_12"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:orientation="vertical">
<TextView
android:id="@+id/message_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/line_textView"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_34"
android:text="18:72"
android:textColor="@color/cl_home_title_text_color"
android:textSize="24sp"
/>
<RelativeLayout
android:id="@+id/item"
android:layout_width="@dimen/dp_333"
android:layout_height="@dimen/dp_80"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="@drawable/item_shape">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignLeft="@id/line_textView"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16"
android:gravity="center_vertical"
android:orientation="horizontal"
>
<TextView
android:id="@+id/line_textView"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="89dp"
android:background="@color/line_color"
/>
<TextView
android:id="@+id/message_text_content"
android:layout_width="0dp"
android:id="@+id/message_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:layout_alignRight="@id/line_textView"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_18"
android:text="08-10"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
android:textSize="@dimen/sp_12"
/>
<TextView
android:id="@+id/read_state"
android:id="@+id/message_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_21.3"
android:layout_toRightOf="@id/message_text_content"
android:text="@string/not_read"
android:textColor="@color/cl_tab_read"
android:textSize="@dimen/sp_10"
android:layout_alignRight="@id/line_textView"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_34"
android:text="18:72"
android:textColor="@color/cl_home_title_text_color"
android:textSize="24sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignLeft="@id/line_textView"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16"
android:gravity="center_vertical"
android:orientation="horizontal"
>
<TextView
android:id="@+id/message_text_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/read_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_21.3"
android:layout_toRightOf="@id/message_text_content"
android:text="@string/not_read"
android:textColor="@color/cl_tab_read"
android:textSize="@dimen/sp_10"
/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="LRecyclerView">
<attr name="isReverse" format="boolean"/>
<attr name="isRefreshable" format="boolean"/>
<attr name="needCoreAdapter" format="boolean"/>
<attr name="needFoot" format="boolean"/>
<attr name="needHint" format="boolean"/>
<attr name="itemType" format="reference"/>
<attr name="headType" format="reference"/>
<attr name="footType" format="reference"/>
</declare-styleable>
<attr name="backgroundCard" format="color"/>
<attr name="textColor" format="color"/>
<attr name="textColorBg" format="color"/>
<attr name="themeType" format="string"/>
<attr name="themeIcon" format="reference"/>
<attr name="colorWhite" format="color"/>
</resources>
\ No newline at end of file
......@@ -2,6 +2,7 @@
<string name="tv_dayu">大鱼师傅</string>
<string name="tv_start_page_text">©&#160;2017&#160;大鱼智能&#160;版权所有</string>
<string name="tv_login_title">大鱼工程师</string>
<string name="tv_fonts">fonts/DIN Alternate Bold.ttf</string>
<string name="tv_login_register_text">暂不接受个人用户注册</string>
<string name="tv_login_button_text">&#160;</string>
<string name="tv_login_register_button_text">获取验证码</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment