Commit a8a7b575 authored by jianglx's avatar jianglx

滴房车1.5.9版本

parent 7e3265a6
......@@ -34,6 +34,7 @@ import static android.support.v4.view.ViewPager.PageTransformer;
public class Banner extends FrameLayout implements OnPageChangeListener {
public String tag = "banner";
private int mIndicatorMargin = BannerConfig.PADDING_SIZE;
private float mScale;
private int mIndicatorWidth;
private int mIndicatorHeight;
private int indicatorSize;
......@@ -119,7 +120,7 @@ public class Banner extends FrameLayout implements OnPageChangeListener {
return;
}
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
int heightSize = (widthSize * 9 / 16);
int heightSize = (int) (widthSize * mScale);
int count = getChildCount();
for (int i = 0; i < count; i++) {
View child = getChildAt(i);
......@@ -135,6 +136,7 @@ public class Banner extends FrameLayout implements OnPageChangeListener {
}
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.Banner);
mIndicatorWidth = typedArray.getDimensionPixelSize(R.styleable.Banner_indicator_width, indicatorSize);
mScale = typedArray.getFloat(R.styleable.Banner_banner_image_width_height_scale, 0.5f);
mIndicatorHeight = typedArray.getDimensionPixelSize(R.styleable.Banner_indicator_height, indicatorSize);
mIndicatorMargin = typedArray.getDimensionPixelSize(R.styleable.Banner_indicator_margin, BannerConfig.PADDING_SIZE);
mIndicatorSelectedResId = typedArray.getResourceId(R.styleable.Banner_indicator_drawable_selected, R.drawable.gray_radius);
......
......@@ -13,8 +13,10 @@
<attr name="indicator_margin" format="dimension" />
<attr name="indicator_drawable_selected" format="reference" />
<attr name="indicator_drawable_unselected" format="reference" />
<attr name="banner_layout" format="reference"/>
<attr name="banner_default_image" format="reference"/>
<attr name="banner_layout" format="reference" />
<attr name="banner_default_image" format="reference" />
<attr name="banner_image_width_height_scale" format="float" />
<attr name="image_scale_type" format="enum">
<enum name="center" value="0" />
<enum name="center_crop" value="1" />
......
......@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default"
versionCode 158
versionName "1.5.8"
versionCode 159
versionName "1.5.9"
multiDexEnabled true
......
......@@ -64,14 +64,20 @@ public abstract class BaseFragment<P extends MvpPresenter> extends BaseWrapperFr
* @param empty
* @return
*/
protected View getEmptyView(RecyclerView mRecyclerView, final int imageId, final String empty) {
protected View getEmptyView(RecyclerView mRecyclerView, final int imageId, final String empty, final View.OnClickListener clickListener) {
return getHelperView(mRecyclerView, R.layout.common_empty, new OnViewHolder() {
@Override
public void helper(ViewHolder helper) {
if (imageId != -1) {
helper.setImageResource(R.id.iv_flag, imageId);
}
helper.setText(R.id.tv_tip, empty);
if (!TextUtils.isEmpty(empty)) {
helper.setVisible(R.id.tv_tip, true);
helper.setText(R.id.tv_tip, empty);
}
if (clickListener != null) {
helper.setOnClickListener(R.id.linear_empty, clickListener);
}
}
});
}
......
......@@ -96,14 +96,20 @@ public abstract class BaseStatusActivity<P extends MvpPresenter> extends SwipeBa
* @param empty
* @return
*/
protected View getEmptyView(RecyclerView mRecyclerView, final int imageId, final String empty) {
protected View getEmptyView(RecyclerView mRecyclerView, final int imageId, final String empty, final View.OnClickListener clickListener) {
return getHelperView(mRecyclerView, R.layout.common_empty, new OnViewHolder() {
@Override
public void helper(ViewHolder helper) {
if (imageId != -1) {
helper.setImageResource(R.id.iv_flag, imageId);
}
helper.setText(R.id.tv_tip, empty);
if (!TextUtils.isEmpty(empty)) {
helper.setVisible(R.id.tv_tip, true);
helper.setText(R.id.tv_tip, empty);
}
if (clickListener != null) {
helper.setOnClickListener(R.id.linear_empty, clickListener);
}
}
});
}
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="50dp" />
<solid android:color="@color/gray_FFB74B" />
</shape>
\ 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="match_parent"
android:gravity="center_horizontal"
android:id="@+id/linear_empty"
android:background="@color/colorWrite"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_flag"
android:layout_width="345px"
android:layout_height="345px"
android:layout_centerInParent="true"
android:src="@drawable/gift_bill_list_empty"
/>
<TextView
android:layout_below="@id/iv_flag"
android:id="@+id/tv_tip"
<LinearLayout
android:id="@+id/linear_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="@string/empty_no_data"
android:textColor="#ffcd00"
android:textSize="@dimen/sp_14" />
android:layout_centerInParent="true"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_flag"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:text="@string/empty_no_data"
android:textColor="@color/textMain"
android:textSize="@dimen/sp_14"
android:visibility="gone" />
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -6,4 +6,5 @@
<enum name="use_padding_top" value="1" />
</attr>
</declare-styleable>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp" />
<solid android:color="@color/gray_50000000" />
android:bottomLeftRadius="7dp"
android:bottomRightRadius="7dp" />
<gradient
android:angle="270"
android:endColor="#33000000"
android:startColor="#00000000" />
</shape>
\ No newline at end of file
......@@ -163,4 +163,8 @@
<string name="detailed_description">详细说明</string>
<string name="read_and_agree">已阅读并同意</string>
<string name="car_rental_contract_agreement">《租车合同协议》</string>
<string name="back_home">返回首页</string>
<string name="no_message">暂无记录</string>
</resources>
......@@ -3,7 +3,9 @@
package="com.rv.camp">
<application>
<activity android:name=".camp.CampSearchActivity"></activity>
<activity
android:name=".camp.CampSearchActivity"
android:windowSoftInputMode="adjustPan"></activity>
</application>
</manifest>
\ No newline at end of file
......@@ -98,7 +98,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
campAdapter = new CampListAdapter();
rvContent.setItemAnimator(null);
rvContent.setLayoutManager(new GridLayoutManager(_mActivity, 2));
rvContent.addItemDecoration(new AbSpacesItemDecoration(10));// 分割线。
rvContent.addItemDecoration(new AbSpacesItemDecoration(10, DisplayUtil.dip2px(_mActivity, 8)));// 分割线。
// rvContent.setNestedScrollingEnabled(false);
rvContent.setAdapter(campAdapter);
......@@ -255,7 +255,7 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
if (bean.getData().getTotalCount() == 0) {
campAdapter.getData().clear();
campAdapter.notifyDataSetChanged();
campAdapter.setEmptyView(getEmptyView(rvContent, -1, _mActivity.getString(R.string.not_camp_hint)));
campAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_publish, null, null));
return;
}
......@@ -373,9 +373,15 @@ public class CampFragment extends BaseFragment<CampPresenter> implements BaseQui
if (position % 2 == 1) {
outRect.left = hx;
} else {
outRect.right = vx;
outRect.right = hx;
}
if (position <= 1) {
outRect.bottom = vx;
} else {
outRect.bottom = vx;
outRect.top = vx;
}
outRect.top = 2 * hx;
}
}
......
......@@ -74,7 +74,7 @@ public class CampSearchActivity extends BaseStatusActivity<CampPresenter> implem
rvContent.addItemDecoration(new AbSpacesItemDecoration(20, 10));// 分割线。
// rvContent.setNestedScrollingEnabled(false);
rvContent.setAdapter(campAdapter);
campAdapter.setEmptyView(getEmptyView(rvContent, -1, mActivity.getString(R.string.not_camp_hint)));
campAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_search_no_result, null, null));
campAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
......@@ -134,7 +134,7 @@ public class CampSearchActivity extends BaseStatusActivity<CampPresenter> implem
if (bean.getData().getTotalCount() == 0) {
campAdapter.getData().clear();
campAdapter.notifyDataSetChanged();
campAdapter.setEmptyView(getEmptyView(rvContent, -1, mActivity.getString(R.string.not_camp_hint)));
campAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_search_no_result, null, null));
return;
}
......@@ -159,7 +159,7 @@ public class CampSearchActivity extends BaseStatusActivity<CampPresenter> implem
if (!TextUtils.isEmpty(content)) {
map.put("keyWord", content);
}
mPresenter.getData(RvFrameConfig.VEHICLE_CAMPLIST, 0, CampApi.TRAVEL_CAMPSITESHOP, CampListBean.class, map, page == 1 ? false : false);
mPresenter.getData(RvFrameConfig.VEHICLE_CAMPLIST, 0, CampApi.TRAVEL_CAMPSITESHOP, CampListBean.class, map, page == 1 ? true : false);
}
......
......@@ -22,7 +22,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_height="43dp"
android:background="@color/colorWrite"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -44,7 +44,7 @@
<LinearLayout
android:id="@+id/ll_item_search"
android:layout_width="0dp"
android:layout_height="@dimen/dp_40"
android:layout_height="33dp"
android:layout_marginLeft="@dimen/size_8"
android:layout_marginRight="@dimen/size_5"
android:layout_weight="1"
......@@ -63,7 +63,7 @@
<TextView
android:id="@+id/search_input"
android:layout_width="0dp"
android:layout_height="@dimen/size_40"
android:layout_height="33dp"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical"
......
......@@ -7,7 +7,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_height="43dp"
android:layout_marginTop="@dimen/size_10"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -24,7 +24,7 @@
<EditText
android:id="@+id/et_search"
android:layout_width="0dp"
android:layout_height="@dimen/size_40"
android:layout_height="33dp"
android:layout_weight="1"
android:background="@drawable/shape_rv_travel_search_line"
android:drawableLeft="@drawable/search"
......@@ -51,7 +51,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
......@@ -8,12 +8,12 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_150">
android:layout_height="wrap_content">
<ImageView
<com.ruiwenliu.wrapper.weight.Rv4_3ImageView
android:id="@+id/iv_icon"
android:layout_width="match_parent"
android:layout_height="@dimen/size_150"
android:layout_height="wrap_content"
android:scaleType="centerCrop" />
<TextView
......@@ -26,6 +26,7 @@
android:paddingTop="3dp"
android:paddingRight="5dp"
android:paddingBottom="3dp"
android:text="湖泊型"
android:textColor="@color/colorWrite"
android:textSize="@dimen/text_10" />
......@@ -39,6 +40,8 @@
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5"
android:text="休闲小镇房车露营168号营地"
android:lines="2"
android:maxLines="2"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
......
......@@ -7,6 +7,7 @@ import android.view.Display;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.base.utils.ui.image.round.RoundImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
......@@ -45,7 +46,6 @@ public class DiscoveryRecommendAdapter extends BaseQuickAdapter<DiscoveryDataBea
return;
}
DiscoveryDataBean.Body body = item.getBody();
if (body != null) {
if (body.getImages() != null && body.getImages().size() > 0) {
......@@ -70,7 +70,7 @@ public class DiscoveryRecommendAdapter extends BaseQuickAdapter<DiscoveryDataBea
.asBitmap()
.load(body.getImages().get(0).getOurl())
.apply(options)
.apply(RequestOptions.bitmapTransform(new RoundedCorners(DisplayUtil.dip2px(mContext,6))))
.apply(RequestOptions.bitmapTransform(new RoundedCorners(DisplayUtil.dip2px(mContext,7))))
.into(utils);
}
helper.setText(R.id.tv_title, body.getText());
......
......@@ -49,7 +49,7 @@ public class DiscoveryShortVideoAdapter extends BaseQuickAdapter<DiscoveryDataBe
.asBitmap()
.load(item.getFirstImageOriginal())
.apply(options)
.apply(RequestOptions.bitmapTransform(new RoundedCorners(DisplayUtil.dip2px(mContext,6))))
.apply(RequestOptions.bitmapTransform(new RoundedCorners(DisplayUtil.dip2px(mContext,7))))
.into(utils);
}
helper.setText(R.id.tv_title, body.getText());
......
......@@ -4,6 +4,7 @@ import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.alibaba.android.arouter.launcher.ARouter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.frame.base.bus.Observer;
......@@ -23,6 +24,7 @@ import com.xxfc.discovery.bean.DiscoveryAskBean;
import com.xxfc.discovery.event.DiscoveryAddEvent;
import com.xxfc.discovery.presenter.DiscoveryPresenter;
import com.yuyife.okgo.OkGoUtil;
import java.util.LinkedHashMap;
import java.util.Map;
......@@ -74,7 +76,7 @@ public class QuestionAndAnswerFragment extends BaseFragment<DiscoveryPresenter>
DiscoveryAskBean.DataBeanX.DataBean item = (DiscoveryAskBean.DataBeanX.DataBean) adapter.getItem(position);
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_DETAILQUESTIONANDANSWER)
.withString("id",item.getId())
.withString("id", item.getId())
.navigation();
}
});
......@@ -84,20 +86,20 @@ public class QuestionAndAnswerFragment extends BaseFragment<DiscoveryPresenter>
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
DiscoveryAskBean.DataBeanX.DataBean item = (DiscoveryAskBean.DataBeanX.DataBean) adapter.getItem(position);
int id = view.getId();
if (id == R.id.ll_item_like){
Map<String, Object> headMap = new LinkedHashMap<>();
if (OkGoUtil.getToken() != null) {
headMap.put("Authorization", OkGoUtil.getToken());
Map<String, Object> map = new LinkedHashMap<>();
map.put("questionId", item.getId());
if (item.isPraise()) {
mPresenter.postData(RvFrameConfig.HOST, 2, DiscoveryApi.DISCOVERY_IMPRAISE_DELETE, BaseBean.class, map, headMap, true);
}else {
map.put("time", DateUtils.getCurTimeMillis());
mPresenter.postData(RvFrameConfig.HOST, 1, DiscoveryApi.DISCOVERY_IMPRAISE_ADD, BaseBean.class, map, headMap, true);
}
}
if (id == R.id.ll_item_like) {
Map<String, Object> headMap = new LinkedHashMap<>();
if (OkGoUtil.getToken() != null) {
headMap.put("Authorization", OkGoUtil.getToken());
Map<String, Object> map = new LinkedHashMap<>();
map.put("questionId", item.getId());
if (item.isPraise()) {
mPresenter.postData(RvFrameConfig.HOST, 2, DiscoveryApi.DISCOVERY_IMPRAISE_DELETE, BaseBean.class, map, headMap, true);
} else {
map.put("time", DateUtils.getCurTimeMillis());
mPresenter.postData(RvFrameConfig.HOST, 1, DiscoveryApi.DISCOVERY_IMPRAISE_ADD, BaseBean.class, map, headMap, true);
}
}
}
}
});
......@@ -133,7 +135,7 @@ public class QuestionAndAnswerFragment extends BaseFragment<DiscoveryPresenter>
@Override
public void onShowResult(int requestType, BaseBean result) {
mSimpleRefreshLayout.onRefreshComplete();
switch (requestType){
switch (requestType) {
case 0:
processData((DiscoveryAskBean) result);
break;
......@@ -147,6 +149,7 @@ public class QuestionAndAnswerFragment extends BaseFragment<DiscoveryPresenter>
break;
}
}
@Override
public void onShowError(String errorMsg, int errorType) {
super.onShowError(errorMsg, errorType);
......@@ -175,7 +178,7 @@ public class QuestionAndAnswerFragment extends BaseFragment<DiscoveryPresenter>
headMap.put("Authorization", OkGoUtil.getToken());
}
map.put("page", page);
mPresenter.getData( DiscoveryApi.HOST,0, DiscoveryApi.DISCOVERY_IMQUESTION_LIST, DiscoveryAskBean.class, map,headMap, page == 1 ? false : false);
mPresenter.getData(DiscoveryApi.HOST, 0, DiscoveryApi.DISCOVERY_IMQUESTION_LIST, DiscoveryAskBean.class, map, headMap, page == 1 ? false : false);
}
private void processData(DiscoveryAskBean bean) {
......@@ -183,7 +186,7 @@ public class QuestionAndAnswerFragment extends BaseFragment<DiscoveryPresenter>
countPage = bean.getData().getTotalPage();
mAdapter.setNewData(bean.getData().getData());
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, _mActivity.getString(R.string.discovery_question_and_answer_null)));
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_publish, null, null));
mAdapter.notifyDataSetChanged();
}
} else {
......
......@@ -218,7 +218,7 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
countPage = bean.getData().getPageSize();
mRecommendAdapter.setNewData(bean.getData().getList());
if (bean.getData().getTotalCount() == 0) {
mRecommendAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无推荐数据"));
mRecommendAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_publish, null, null));
mRecommendAdapter.notifyDataSetChanged();
}
} else {
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -15,7 +16,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
<com.base.utils.ui.image.round.RoundImageView
app:borderRadius="7dp"
app:type="round"
android:id="@+id/iv_icon_pat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -30,7 +33,6 @@
</RelativeLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
......@@ -40,7 +42,7 @@
android:maxLines="2"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5"
android:text=""
android:text=" \n "
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -15,11 +16,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:scaleType="centerCrop"
<com.base.utils.ui.image.round.RoundImageView
android:id="@+id/iv_icon_video"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:scaleType="centerCrop"
app:borderRadius="7dp"
app:type="round" />
<ImageView
android:id="@+id/iv_isvideo"
......
......@@ -130,7 +130,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
privacyAgree();
showToast(InviteCodeUtil.getApplicationID());
// showToast(InviteCodeUtil.getApplicationID());
}
......@@ -406,9 +406,9 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
map.put("code", InviteCodeUtil.getInviteCode(etInviteCode));
}
if (!TextUtils.isEmpty(InviteCodeUtil.getApplicationID())) {
map.put("registerSource", InviteCodeUtil.getApplicationID());
}
// if (!TextUtils.isEmpty(InviteCodeUtil.getApplicationID())) {
// map.put("registerSource", InviteCodeUtil.getApplicationID());
// }
mPresenter.postData(RvFrameConfig.AUTH_POST, 1, ApiConfig.HTTP_URL_USER_REGISTER, RegisteredBean.class, map, headMap, true);
}
......
......@@ -598,7 +598,7 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
if (imageId != -1) {
helper.setImageResource(com.ruiwenliu.wrapper.R.id.iv_flag, imageId);
}
helper.setText(com.ruiwenliu.wrapper.R.id.tv_tip, empty);
helper.setText(R.id.tv_tip, empty);
}
......
......@@ -172,7 +172,7 @@ public class DrivingListActivity extends BaseStatusActivity<CommonPresenter> imp
private void processData(DrivingListBean bean) {
if (mPage == 1) {
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, mActivity.getString(R.string.rv_driving_data_null)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.client_icon_add_visitors, null, v -> startActivityForResult(DrivingUploadActivity.getIntent(mActivity, null), TYPE_REQUEST_ADD)));
mAdapter.getData().clear();
mAdapter.notifyDataSetChanged();
return;
......
......@@ -219,7 +219,7 @@ public class SelectShopActivity extends BaseStatusActivity<CommonPresenter> impl
if (imageId != -1) {
helper.setImageResource(com.ruiwenliu.wrapper.R.id.iv_flag, imageId);
}
helper.setText(com.ruiwenliu.wrapper.R.id.tv_tip, empty);
helper.setText(R.id.tv_tip, empty);
}
......
......@@ -32,7 +32,7 @@ public class RVEnthusiastAdapter extends BaseQuickAdapter<DiscoveryDataBean, Bas
ImageView image = helper.getView(R.id.iv_icon_pat);
GlideOptions options = GlideOptions.placeholderOf(com.ruiwenliu.wrapper.R.drawable.glide_icon_placeholder).
error(com.ruiwenliu.wrapper.R.drawable.glide_icon_error);
error(com.ruiwenliu.wrapper.R.drawable.glide_icon_error).centerCrop();
TransformationUtil3 utils = new TransformationUtil3(image);
Glide.with(mContext)
.asBitmap()
......
......@@ -61,7 +61,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
private int mPage;
private int countPage;
private IWXAPI api;
private int payType =1;//选择支付类型
private int payType = 1;//选择支付类型
private static final int SDK_ALI_PAY_FLAG = 11;
public static AllOrderFragment getInstance(int type) {
......@@ -96,7 +96,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
} else if (2 == dataBean.getType()) {
startActivityForResult(TravelOrderDetailsActivity.getIntent(_mActivity, dataBean.getNo()), 2);
} else if (3 == dataBean.getType()) {
startActivityForResult(MemberOrderDetailsActivity.getIntent(_mActivity, dataBean.getNo()),3);
startActivityForResult(MemberOrderDetailsActivity.getIntent(_mActivity, dataBean.getNo()), 3);
}
}
});
......@@ -120,7 +120,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
break;
case 4:
if (id == R.id.tv_process) {
startActivity(PickUpTheCarQRCodeActivity.getIntent(_mActivity,dataBean.getNo()));
startActivity(PickUpTheCarQRCodeActivity.getIntent(_mActivity, dataBean.getNo()));
} else if (id == R.id.tv_camp_process) {
startActivity(GetOnTheCarQRCodeActivity.getIntent(_mActivity, dataBean.getNo()));
}
......@@ -218,7 +218,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
mAdapter.addNewData(bean);
mSimpleRefreshLayout.onRefreshComplete();
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, _mActivity.getString(R.string.rv_select_not_data)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_order, null, null));
mAdapter.notifyDataSetChanged();
}
......@@ -278,7 +278,7 @@ public class AllOrderFragment extends BaseFragment<CommonPresenter> implements B
headMap.put("Authorization", OkGoUtil.getToken());
if (payType == 1) {
mPresenter.postBodyData(RvFrameConfig.VEHICLE_ORDER, 1, ApiConfig.HTTP_URL_PAY_THE_CALLBACK, OrderPayBean.class, new payBody(orderNo, payType, 1), headMap, true);
}else {
} else {
mPresenter.postBodyData(RvFrameConfig.VEHICLE_ORDER, 2, ApiConfig.HTTP_URL_PAY_THE_CALLBACK, OrderAliPayBean.class, new payBody(orderNo, payType, 1), headMap, true);
}
}
......
......@@ -171,7 +171,7 @@ public class CompletedFragment extends BaseFragment<CommonPresenter> implements
mAdapter.addNewData(bean);
mSimpleRefreshLayout.onRefreshComplete();
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, _mActivity.getString(R.string.rv_select_not_data)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_order, null, null));
mAdapter.notifyDataSetChanged();
}
......
......@@ -263,7 +263,7 @@ public class ForPaymentFragment extends BaseFragment<CommonPresenter> implements
mAdapter.addNewData(bean);
mSimpleRefreshLayout.onRefreshComplete();
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, _mActivity.getString(R.string.rv_select_not_data)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_order, null, null));
mAdapter.notifyDataSetChanged();
}
......
......@@ -168,7 +168,7 @@ public class HaveToTravelFragment extends BaseFragment<CommonPresenter> implemen
mAdapter.addNewData(bean);
mSimpleRefreshLayout.onRefreshComplete();
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, _mActivity.getString(R.string.rv_select_not_data)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_order, null, null));
mAdapter.notifyDataSetChanged();
}
......
......@@ -63,14 +63,14 @@ public class OrderListActivity extends BaseStatusActivity<PickerPresenter> {
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
menuPosition = intent.getIntExtra("position", 0);
titleView.setTitle(mActivity.getString(R.string.rv_my_order));
titleView.setText(R.id.tv_title_right, "开发票");
titleView.setChildClickListener(R.id.tv_title_right, new View.OnClickListener() {
@Override
public void onClick(View v) {
ARouter.getInstance().build(Constance.ACTIVITY_URL_INVOICINGACTIVITY)
.navigation();
}
});
// titleView.setText(R.id.tv_title_right, "开发票");
// titleView.setChildClickListener(R.id.tv_title_right, new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// ARouter.getInstance().build(Constance.ACTIVITY_URL_INVOICINGACTIVITY)
// .navigation();
// }
// });
initRecyclerView();
initViewpager();
......
......@@ -192,7 +192,7 @@ public class ToTravelFragment extends BaseFragment<CommonPresenter> implements B
mAdapter.addNewData(bean);
mSimpleRefreshLayout.onRefreshComplete();
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, _mActivity.getString(R.string.rv_select_not_data)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_order, null, null));
mAdapter.notifyDataSetChanged();
}
......
......@@ -20,7 +20,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_height="43dp"
android:gravity="center"
android:orientation="horizontal">
......@@ -52,7 +52,7 @@
<LinearLayout
android:id="@+id/ll_home_item_search"
android:layout_width="0dp"
android:layout_height="@dimen/dp_40"
android:layout_height="33dp"
android:layout_margin="@dimen/ui_dimen_common"
android:layout_weight="1"
android:background="@drawable/shape_rv_textview_home_translucent"
......@@ -136,7 +136,8 @@
<com.yuyife.banner.Banner
android:id="@+id/home_banner"
android:layout_width="match_parent"
android:layout_height="@dimen/size_170" />
android:layout_height="wrap_content"
app:banner_image_width_height_scale="0.5" />
<LinearLayout
android:id="@+id/ll_indicator"
......@@ -385,14 +386,14 @@
android:textSize="@dimen/sp_12" />
<TextView
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/dp_4"
android:text="全部"
android:textColor="@color/text_Gray"
android:textSize="@dimen/size_12" />
android:textSize="@dimen/size_12"
android:visibility="gone" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -15,11 +16,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
<com.base.utils.ui.image.round.RoundImageView
android:id="@+id/iv_icon_pat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"/>
android:scaleType="centerCrop"
app:borderRadius="7dp"
app:type="round" />
<ImageView
android:id="@+id/iv_isvideo"
......@@ -30,7 +33,6 @@
</RelativeLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
......@@ -46,15 +48,15 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_10">
android:layout_marginBottom="@dimen/size_10"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_centerVertical="true"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -67,11 +69,11 @@
android:id="@+id/tv_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_4"
android:ellipsize="end"
android:singleLine="true"
android:text=""
android:textColor="@color/textGray"
android:layout_marginLeft="@dimen/dp_4"
android:textSize="@dimen/text_10" />
</LinearLayout>
......
......@@ -19,7 +19,7 @@
android:paddingLeft="@dimen/size_15"
android:gravity="center_vertical"
android:layout_gravity="bottom|left"
android:background="@drawable/rv_bg_explain"
android:background="@drawable/rv_bg_explain_xml"
android:layout_width="match_parent"
android:layout_height="@dimen/size_30" />
......
......@@ -169,7 +169,7 @@ public class MyReleaseAskFragment extends BaseFragment<CommonPresenter> implemen
countPage = bean.getData().getPageSize();
mAdapter.setNewData(bean.getData().getData());
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无发布的数据"));
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_publish, null, null));
mAdapter.notifyDataSetChanged();
}
} else {
......
......@@ -205,7 +205,7 @@ public class MyReleasePatFragment extends BaseFragment<CommonPresenter> implemen
countPage = bean.getData().getPageSize();
mAdapter.setNewData(bean.getData().getData());
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无发布的数据"));
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_publish, null, null));
mAdapter.notifyDataSetChanged();
}
} else {
......@@ -240,7 +240,7 @@ public class MyReleasePatFragment extends BaseFragment<CommonPresenter> implemen
Map<String, Object> map = new LinkedHashMap<>();
map.put("page", page);
map.put("type", "2");
if (mPresenter !=null) {
if (mPresenter != null) {
mPresenter.getData(RvFrameConfig.HOST, 0, ApiConfig.RVENTHUSIAST_GETBYUSERID_LIST, MyReleaseBean.class, map, headMap, page == 1 ? true : false);
}
}
......
......@@ -211,7 +211,7 @@ public class MyReleaseVideoFragment extends BaseFragment<CommonPresenter> implem
countPage = bean.getData().getPageSize();
mAdapter.setNewData(bean.getData().getData());
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无发布的数据"));
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_publish, null, null));
mAdapter.notifyDataSetChanged();
}
} else {
......
......@@ -295,7 +295,12 @@ public class ChooseAVisitorActivity extends BaseStatusActivity<CommonPresenter>
private void processData(TravelerListBean bean) {
if (bean.getData() == null || bean.getData().size() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, "您还没有出游人信息哦"));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.client_icon_add_visitors, null, new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivityForResult(AddAVisitorActivity.getIntent(mActivity, null), TYPE_REQUEST_ADD);
}
}));
return;
}
visitors.clear();
......@@ -325,7 +330,12 @@ public class ChooseAVisitorActivity extends BaseStatusActivity<CommonPresenter>
});
if (visitors.isEmpty()) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, "您还没有出游人信息哦"));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.client_icon_add_visitors, null, new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivityForResult(AddAVisitorActivity.getIntent(mActivity, null), TYPE_REQUEST_ADD);
}
}));
} else {
mAdapter.setNewData(visitors);
}
......
......@@ -142,7 +142,7 @@ public class CollectionActivity extends BaseStatusActivity<CommonPresenter> impl
private void processData(CollectionListBean bean) {
if (mPage == 1) {
if (bean.getData().getTotalCount() == 0) {
collectionAdapter.setEmptyView(getEmptyView(recyclerView, -1, mActivity.getString(R.string.rv_collection_data_null)));
collectionAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_collect, null, null));
return;
}
......
......@@ -147,7 +147,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
//全部热门旅游
mAllPopularAdapter = new AllPopularAdapter();
rvPopularMore.setLayoutManager(new GridLayoutManager(_mActivity, 3));
rvPopularMore.addItemDecoration(new AbSpacesItemDecoration2(10, 20));// 分割线。
rvPopularMore.addItemDecoration(new AbSpacesItemDecoration2(7, 20));// 分割线。
// rvPopularMore.setNestedScrollingEnabled(false);
rvPopularMore.setAdapter(mAllPopularAdapter);
......@@ -583,9 +583,9 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements S
outRect.left = h;
outRect.right = h;
} else if (position % 3 == 2) {
outRect.left = h;
outRect.left = 2 * h;
} else if (position % 3 == 0) {
outRect.right = h;
outRect.right = 2 * h;
}
if (position / 3 != 0) {
......
......@@ -18,7 +18,7 @@ public class AllPopularAdapter extends BaseQuickAdapter<BeanPopularBrigadeAll.Da
@Override
protected void convert(BaseViewHolder helper, BeanPopularBrigadeAll.DataBeanX.DataBean item) {
GlideManager.getInstance(mContext).loadRoundImage(item.getImg(), (ImageView)helper.getView(R.id.iv_icon),8);
GlideManager.getInstance(mContext).loadRoundImage(item.getImg(), (ImageView)helper.getView(R.id.iv_icon),7);
helper.setText(R.id.tv_hot,item.getName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -27,10 +28,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:ellipsize="end"
android:gravity="center"
android:drawableRight="@drawable/camp_open_member"
android:drawablePadding="@dimen/size_5"
android:ellipsize="end"
android:gravity="center"
android:maxWidth="320dp"
android:maxLines="1"
android:textColor="@color/textMain"
......@@ -42,7 +43,8 @@
<com.yuyife.banner.Banner
android:id="@+id/travel_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
app:banner_image_width_height_scale="0.56" />
<TextView
android:layout_width="match_parent"
......
......@@ -21,7 +21,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_height="43dp"
android:gravity="center"
android:orientation="horizontal">
......@@ -53,7 +53,7 @@
<LinearLayout
android:id="@+id/ll_item_search"
android:layout_width="0dp"
android:layout_height="@dimen/dp_40"
android:layout_height="33dp"
android:layout_margin="@dimen/ui_dimen_common"
android:layout_weight="1"
android:background="@drawable/shape_rv_textview_home_search"
......@@ -120,14 +120,15 @@
<com.yuyife.banner.Banner
android:id="@+id/travel_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
app:banner_image_width_height_scale="0.56" />
<LinearLayout
android:id="@+id/ll_indicator"
android:layout_width="match_parent"
android:layout_height="@dimen/size_30"
android:layout_alignParentBottom="true"
android:background="@drawable/rv_bg_explain"
android:background="@drawable/rv_bg_explain_rn"
android:gravity="center"
android:orientation="horizontal" />
......@@ -194,7 +195,8 @@
android:layout_marginBottom="@dimen/size_12"
android:text="周边游"
android:textColor="@color/colorMain"
android:textSize="@dimen/size_18" />
android:textSize="@dimen/size_18"
android:textStyle="bold" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_tour_around"
......
......@@ -15,7 +15,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/size_20"
android:layout_alignParentBottom="true"
android:background="@drawable/rv_bg_explain"
android:background="@drawable/rv_bg_explain_xml"
android:gravity="center"
android:text=""
android:textColor="@color/colorWrite"
......
......@@ -14,8 +14,9 @@
android:layout_width="match_parent"
android:layout_height="@dimen/size_30"
android:layout_alignParentBottom="true"
android:background="@drawable/rv_bg_explain"
android:gravity="center"
android:background="@drawable/rv_bg_explain_xml"
android:gravity="center|bottom"
android:paddingBottom="5dp"
android:text=""
android:textColor="@color/colorWrite"
android:textSize="@dimen/sp_14" />
......
......@@ -124,7 +124,7 @@ public class CarPurchaseListActivity extends BaseStatusActivity<CarPurchasePrese
countPage = bean.getData().getTotalPage();
mAdapter.setNewData(bean.getData().getData());
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, "暂无车辆数据!"));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_publish, null, null));
mAdapter.notifyDataSetChanged();
}
} else {
......
......@@ -81,6 +81,7 @@ public class ExpiredCouponFragment extends BaseFragment<CouponAllPresenter> impl
mSimpleRefreshLayout.onRefreshComplete();
processData((CouponBean) result);
}
@Override
public void onShowError(String errorMsg, int errorType) {
super.onShowError(errorMsg, errorType);
......@@ -88,12 +89,12 @@ public class ExpiredCouponFragment extends BaseFragment<CouponAllPresenter> impl
}
private void processData(CouponBean bean) {
if (bean !=null && bean.getData()!=null && bean.getData().size() >0) {
if (bean != null && bean.getData() != null && bean.getData().size() > 0) {
mAdapter.getData().clear();
mAdapter.addData(bean.getData());
mAdapter.notifyDataSetChanged();
}else {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无优惠券"));
} else {
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_coupon, null, null));
mAdapter.notifyDataSetChanged();
}
}
......
......@@ -36,7 +36,7 @@ public class UsedCouponFragment extends BaseFragment<CouponAllPresenter> impleme
SimpleRefreshLayout mSimpleRefreshLayout;
UsedCouponAdapter mAdapter;
public static UsedCouponFragment getInstance(int type) {
Bundle bundl = new Bundle();
bundl.putInt("type", type);
......@@ -69,7 +69,6 @@ public class UsedCouponFragment extends BaseFragment<CouponAllPresenter> impleme
/**
* 请求数据
*
*/
private void geDataList() {
Map<String, Object> headMap = new LinkedHashMap<>();
......@@ -77,7 +76,7 @@ public class UsedCouponFragment extends BaseFragment<CouponAllPresenter> impleme
headMap.put("Authorization", OkGoUtil.getToken());
Map<String, Object> map = new LinkedHashMap<>();
map.put("type", "1");
mPresenter.getData(RvFrameConfig.HOST,0, CouponApi.HTTP_URL_COUPON_LIST, CouponBean.class, map,headMap,false);
mPresenter.getData(RvFrameConfig.HOST, 0, CouponApi.HTTP_URL_COUPON_LIST, CouponBean.class, map, headMap, false);
}
@Override
......@@ -93,12 +92,12 @@ public class UsedCouponFragment extends BaseFragment<CouponAllPresenter> impleme
}
private void processData(CouponBean bean) {
if (bean !=null && bean.getData()!=null && bean.getData().size() >0) {
if (bean != null && bean.getData() != null && bean.getData().size() > 0) {
mAdapter.getData().clear();
mAdapter.addData(bean.getData());
mAdapter.notifyDataSetChanged();
}else {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无优惠券"));
} else {
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_coupon, null, null));
mAdapter.notifyDataSetChanged();
}
}
......
......@@ -77,7 +77,7 @@ public class WaitCouponFragment extends BaseFragment<CouponAllPresenter> impleme
intent.setComponent(new ComponentName(getContext(), "com.xxfc.rv.MainActivity"));
intent.putExtra("to", "travel");
startActivity(intent);
} else if ("4".equals(bean.getChannel())){
} else if ("4".equals(bean.getChannel())) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(getContext(), "com.rv.member.MemberCenterActivity"));
startActivity(intent);
......@@ -123,7 +123,7 @@ public class WaitCouponFragment extends BaseFragment<CouponAllPresenter> impleme
mAdapter.addData(bean.getData());
mAdapter.notifyDataSetChanged();
} else {
mAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无优惠券"));
mAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_no_coupon, null, null));
mAdapter.notifyDataSetChanged();
}
}
......
......@@ -53,7 +53,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
// lists.addAll(bean.getData().getData());
// }
adapter = new ConsumeRecordListAdapter(lists, mClickListener);
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.tv_no_consume_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, "暂无记录", null));
adapter.setOnLoadMoreListener(this, recyclerView);
recyclerView.setAdapter(adapter);
simpleRefreshLayout.setHeaderView(new SimpleRefreshView(this));
......@@ -74,7 +74,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
if (mPage == 1) {
if (listBean.getData().getTotalCount() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.tv_no_consume_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, "暂无记录", null));
adapter.notifyDataSetChanged();
return;
}
......
......@@ -119,7 +119,7 @@ public class PurchaseRecordActivity extends BaseStatusActivity<CommonPresenter>
mAdapter.addNewData(bean);
mSimpleRefreshLayout.onRefreshComplete();
if (bean.getData().getTotalCount() == 0) {
mAdapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
mAdapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, "暂无会员购买记录", null));
mAdapter.notifyDataSetChanged();
}
......
......@@ -26,7 +26,7 @@ import java.util.Map;
import butterknife.BindView;
public class UserDetailFragment extends BaseFragment<CommonPresenter> implements SimpleRefreshLayout.OnSimpleRefreshListener, BaseQuickAdapter.RequestLoadMoreListener{
public class UserDetailFragment extends BaseFragment<CommonPresenter> implements SimpleRefreshLayout.OnSimpleRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
@BindView(R2.id.refresh)
......@@ -53,7 +53,7 @@ public class UserDetailFragment extends BaseFragment<CommonPresenter> implements
protected void initView(Bundle savedInstanceState) {
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
adapter = new ConsumeRecordListAdapter(lists, mClickListener);
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.tv_no_consume_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_order, null, null));
adapter.setOnLoadMoreListener(this, recyclerView);
recyclerView.setAdapter(adapter);
simpleRefreshLayout.setHeaderView(new SimpleRefreshView(getContext()));
......
......@@ -129,7 +129,7 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> im
countPage = data.getData().getTotalPage();
mTravelSearchAdapter.setNewData(data.getData().getData());
if (data.getData().getTotalCount() == 0) {
mTravelSearchAdapter.setEmptyView(getEmptyView(rvContent, -1, "暂无数据!"));
mTravelSearchAdapter.setEmptyView(getEmptyView(rvContent, R.drawable.icon_search_no_result, null,null));
mTravelSearchAdapter.notifyDataSetChanged();
}
} else {
......
......@@ -7,7 +7,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_height="43dp"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -23,7 +23,7 @@
<EditText
android:id="@+id/et_search"
android:layout_width="0dp"
android:layout_height="@dimen/size_40"
android:layout_height="33dp"
android:layout_weight="1"
android:maxLines="1"
android:singleLine="true"
......@@ -50,7 +50,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
......
......@@ -91,7 +91,7 @@ public class PopularizeActivity extends BaseStatusActivity<CommonPresenter> impl
pageTotal = bean.getData().getTotalPage();
refresh.onRefreshComplete();
if (bean.getData().getUserTeamMemberBos().size() == 0) {
listAdapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
listAdapter.setEmptyView(getEmptyView(recyclerView,R.drawable.icon_no_common , getString(R.string.no_message),null));
listAdapter.notifyDataSetChanged();
} else {
listAdapter.setNewData(bean.getData().getUserTeamMemberBos());
......
......@@ -50,7 +50,7 @@ public class ConsumeDetailActivity extends BaseStatusActivity<CommonPresenter> i
pageTotal = bean.getData().getTotalPage();
refreshLayout.onRefreshComplete();
if (bean.getData().getData() == null || bean.getData().getData().size() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, getString(R.string.no_message), null));
adapter.notifyDataSetChanged();
} else {
adapter.setNewData(bean.getData().getData());
......
......@@ -57,7 +57,7 @@ public class EnchashmentRecordActivity extends BaseStatusActivity<CommonPresente
adapter.setNewData(bean.getData().getWalletCaths());
simpleRefreshLayout.onRefreshComplete();
if (bean.getData().getWalletCaths().size() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_withdraw, null,null));
adapter.notifyDataSetChanged();
}
} else {
......
......@@ -78,7 +78,7 @@ public class CommisionAllFragment extends BaseFragment<CommonPresenter> implemen
adapter.setNewData(bean.getData().getSellingWaters());
refreshLayout.onRefreshComplete();
if (bean.getData().getSellingWaters().size() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, getString(R.string.no_message), null));
adapter.notifyDataSetChanged();
}
} else {
......
......@@ -75,7 +75,7 @@ public class CommisionFinishFragment extends BaseFragment<CommonPresenter> imple
adapter.setNewData(bean.getData().getSellingWaters());
refreshLayout.onRefreshComplete();
if (bean.getData().getSellingWaters().size() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, getString(R.string.no_message), null));
adapter.notifyDataSetChanged();
}
} else {
......
......@@ -75,7 +75,7 @@ public class CommisionUnFinishFragment extends BaseFragment<CommonPresenter> imp
adapter.setNewData(bean.getData().getSellingWaters());
refreshLayout.onRefreshComplete();
if (bean.getData().getSellingWaters().size() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
adapter.setEmptyView(getEmptyView(recyclerView, R.drawable.icon_no_common, getString(R.string.no_message), null));
adapter.notifyDataSetChanged();
}
} else {
......
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 to comment