Commit 0e24fa71 authored by linfeng's avatar linfeng

发现

parent 1632103a
...@@ -141,7 +141,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> { ...@@ -141,7 +141,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
} }
} }
@OnClick({R2.id.rl_home, R2.id.rl_travel, R2.id.rl_camp, R2.id.rl_found, R2.id.rl_mine}) @OnClick({R2.id.rl_home, R2.id.rl_travel, R2.id.rl_camp, R2.id.rl_found, R2.id.rl_mine})
public void onViewClicked(View view) { public void onViewClicked(View view) {
int id = view.getId(); int id = view.getId();
......
...@@ -202,6 +202,7 @@ public class DiscoveryFragment extends BaseFragment<DiscoveryPresenter> { ...@@ -202,6 +202,7 @@ public class DiscoveryFragment extends BaseFragment<DiscoveryPresenter> {
} }
isShow = !isShow; isShow = !isShow;
mPop.setOnDismissListener(new PopupWindow.OnDismissListener() { mPop.setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override @Override
public void onDismiss() { public void onDismiss() {
......
package com.xxfc.discovery.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xxfc.discovery.R;
/**
* 问答
*/
public class DiscoveryAskAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public DiscoveryAskAdapter() {
super(R.layout.rv_item_discovery_ask);
}
private int selectPosition;
@Override
protected void convert(BaseViewHolder helper, String item) {
}
}
package com.xxfc.discovery.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xxfc.discovery.R;
/**
* 拍拍
*/
public class DiscoveryPatAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public DiscoveryPatAdapter() {
super(R.layout.rv_item_discovery_pat);
}
private int selectPosition;
@Override
protected void convert(BaseViewHolder helper, String item) {
}
}
package com.xxfc.discovery.adapter;
import android.widget.ImageView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.xxfc.discovery.R;
/**
* 推荐
*/
public class DiscoveryRecommendAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public DiscoveryRecommendAdapter() {
super(R.layout.rv_item_discovery_recommend);
}
private int selectPosition;
@Override
protected void convert(BaseViewHolder helper, String item) {
GlideManager.getInstance(mContext).loadImage(item, (ImageView)helper.getView(R.id.iv_icon));
}
@Override
public int getItemCount() {
return 6;
}
}
package com.xxfc.discovery.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xxfc.discovery.R;
/**
* 拍拍
*/
public class DiscoveryShortVideoAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public DiscoveryShortVideoAdapter() {
super(R.layout.rv_item_discovery_short_video);
}
private int selectPosition;
@Override
protected void convert(BaseViewHolder helper, String item) {
}
}
package com.xxfc.discovery.fragment; package com.xxfc.discovery.fragment;
import android.graphics.Rect;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.ruiwenliu.wrapper.base.BaseBean; import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment; import com.ruiwenliu.wrapper.base.BaseFragment;
import com.xxfc.discovery.R; import com.xxfc.discovery.R;
import com.xxfc.discovery.R2;
import com.xxfc.discovery.adapter.DiscoveryRecommendAdapter;
import com.xxfc.discovery.presenter.DiscoveryPresenter; import com.xxfc.discovery.presenter.DiscoveryPresenter;
import java.util.ArrayList;
import butterknife.BindView;
/** /**
* 推荐 * 推荐
*/ */
public class RecommendFragment extends BaseFragment<DiscoveryPresenter> { public class RecommendFragment extends BaseFragment<DiscoveryPresenter> {
@BindView(R2.id.rv_content)
RecyclerView rvContent;
private DiscoveryRecommendAdapter mRecommendAdapter;
public static RecommendFragment getInstance(int type) { public static RecommendFragment getInstance(int type) {
Bundle bundl = new Bundle(); Bundle bundl = new Bundle();
bundl.putInt("type", type); bundl.putInt("type", type);
...@@ -27,6 +46,21 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> { ...@@ -27,6 +46,21 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> {
@Override @Override
protected void initView(Bundle savedInstanceState) { protected void initView(Bundle savedInstanceState) {
mRecommendAdapter = new DiscoveryRecommendAdapter();
rvContent.setLayoutManager(new GridLayoutManager(_mActivity, 2));
rvContent.addItemDecoration(new AbSpacesItemDecoration(15));// 分割线。
rvContent.setNestedScrollingEnabled(false);
rvContent.setAdapter(mRecommendAdapter);
initData();
}
private void initData() {
ArrayList<String> strings = new ArrayList<>();
for (int i = 0; i < 6; i++) {
strings.add("https://xxmp.upyuns.com/attachment/images/6/2019/05/mZBh1FV7MveKv5EejtbHMKrKrHm2mJ.png");
}
mRecommendAdapter.addData(strings);
} }
@Override @Override
...@@ -38,4 +72,23 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> { ...@@ -38,4 +72,23 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> {
public void onShowResult(int requestType, BaseBean result) { public void onShowResult(int requestType, BaseBean result) {
} }
public class AbSpacesItemDecoration extends RecyclerView.ItemDecoration {
private int space;
public AbSpacesItemDecoration(int space) {
this.space = space;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
outRect.left = space;
outRect.right = space;
outRect.bottom = space;
outRect.top = space;
}
}
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/gray_f5f5f5"
android:orientation="vertical"
tools:context=".fragment.PatFragment"> tools:context=".fragment.PatFragment">
</android.support.constraint.ConstraintLayout> <ImageView
\ No newline at end of file android:layout_width="match_parent"
android:layout_height="@dimen/size_80"
android:scaleType="centerCrop"
android:src="@drawable/icon_fragment_discovery_hint" />
<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>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/gray_f5f5f5"
android:orientation="vertical"
tools:context=".fragment.QuestionAndAnswerFragment"> tools:context=".fragment.QuestionAndAnswerFragment">
</android.support.constraint.ConstraintLayout> <android.support.v7.widget.RecyclerView
\ No newline at end of file android:id="@+id/rv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/gray_f5f5f5"
tools:context=".fragment.RecommendFragment"> tools:context=".fragment.RecommendFragment">
</android.support.constraint.ConstraintLayout> <ImageView
\ No newline at end of file android:layout_width="match_parent"
android:layout_height="@dimen/size_80"
android:scaleType="centerCrop"
android:src="@drawable/icon_fragment_discovery_hint" />
<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>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/gray_f5f5f5"
tools:context=".fragment.ShortVideoFragment"> tools:context=".fragment.ShortVideoFragment">
</android.support.constraint.ConstraintLayout> <ImageView
\ No newline at end of file android:layout_width="match_parent"
android:layout_height="@dimen/size_80"
android:scaleType="centerCrop"
android:src="@drawable/icon_fragment_discovery_hint" />
<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>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_activity"
android:layout_width="match_parent"
android:layout_height="@dimen/size_180"
android:scaleType="centerCrop" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5"
android:text="行摄川西邂逅生命中未知的精彩"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_10"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:src="@drawable/aa_dis11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="房车旅行家Rose"
android:textSize="@dimen/text_8" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1"
android:src="@drawable/common_icon_like_selected" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="10589"
android:textColor="#FFB74B"
android:textSize="@dimen/text_8" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_activity"
android:layout_width="match_parent"
android:layout_height="@dimen/size_180"
android:scaleType="centerCrop" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5"
android:text="行摄川西邂逅生命中未知的精彩"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_10"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:src="@drawable/aa_dis11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="房车旅行家Rose"
android:textSize="@dimen/text_8" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1"
android:src="@drawable/common_icon_like_selected" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="10589"
android:textColor="#FFB74B"
android:textSize="@dimen/text_8" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_180">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="match_parent"
android:layout_height="@dimen/size_180"
android:scaleType="centerCrop" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/icon_fragment_video_hint"/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5"
android:text="行摄川西邂逅生命中未知的精彩"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_10"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:src="@drawable/aa_dis11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="房车旅行家Rose"
android:textSize="@dimen/text_8" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1"
android:src="@drawable/common_icon_like_selected" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="10589"
android:textColor="#FFB74B"
android:textSize="@dimen/text_8" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_item_rv_enthusiast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_activity"
android:layout_width="match_parent"
android:layout_height="@dimen/size_180"
android:scaleType="centerCrop" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5"
android:text="行摄川西邂逅生命中未知的精彩"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="@dimen/size_10"
android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:src="@drawable/aa_dis11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="房车旅行家Rose"
android:textSize="@dimen/text_8" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1"
android:src="@drawable/common_icon_like_selected" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="10589"
android:textColor="#FFB74B"
android:textSize="@dimen/text_8" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -55,6 +55,7 @@ import com.rv.home.R2; ...@@ -55,6 +55,7 @@ import com.rv.home.R2;
import com.rv.home.rv.module.ApiConfig; import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter; import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.home.adapter.HotCarTypeAdapter; import com.rv.home.rv.module.ui.main.home.adapter.HotCarTypeAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.RVEnthusiastAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.RVTourListAdapter; import com.rv.home.rv.module.ui.main.home.adapter.RVTourListAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.RVTourListLabelAdapter; import com.rv.home.rv.module.ui.main.home.adapter.RVTourListLabelAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.SelectedEventsAdapter; import com.rv.home.rv.module.ui.main.home.adapter.SelectedEventsAdapter;
...@@ -227,7 +228,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser ...@@ -227,7 +228,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
private HotCarTypeAdapter mAdapter; private HotCarTypeAdapter mAdapter;
private SelectedEventsAdapter mActivityAdapter; private SelectedEventsAdapter mActivityAdapter;
// private RVEnthusiastAdapter mRvEnthusiast; // private RVEnthusiastAdapter mRvEnthusiast;
private RVTourListAdapter mRvTourAdapter; private RVTourListAdapter mRvTourAdapter;
private RVTourListLabelAdapter mRvTourLabelAdapter; private RVTourListLabelAdapter mRvTourLabelAdapter;
...@@ -534,8 +535,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser ...@@ -534,8 +535,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
//搜索 //搜索
ARouter.getInstance() ARouter.getInstance()
.build(Constance.ACTIVITY_URL_TRAVELSEARCH) .build(Constance.ACTIVITY_URL_TRAVELSEARCH)
.withDouble("latLatitude", latLatitude) .withDouble("latLatitude", 0)
.withDouble("lonLongitude", lonLongitude) .withDouble("lonLongitude", 0)
.navigation(); .navigation();
} else if (id == R.id.tv_item_rv_tour) { } else if (id == R.id.tv_item_rv_tour) {
......
...@@ -129,7 +129,7 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol ...@@ -129,7 +129,7 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
} }
}); });
viewHolder.img_agree.setImageResource(hasAgree ? R.drawable.common_icon_selected : R.drawable.common_icon_radio_unche); viewHolder.img_agree.setImageResource(hasAgree ? R.drawable.common_icon_like_selected : R.drawable.common_icon_radio_unche);
viewHolder.btn_buy.setBackgroundResource(hasAgree ? R.drawable.shape_rv_bg_dark_yellow : R.drawable.shape_rv_bg_btn_grap_yellow); viewHolder.btn_buy.setBackgroundResource(hasAgree ? R.drawable.shape_rv_bg_dark_yellow : R.drawable.shape_rv_bg_btn_grap_yellow);
viewHolder.img_agree.setOnClickListener(new View.OnClickListener() { viewHolder.img_agree.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -141,7 +141,7 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol ...@@ -141,7 +141,7 @@ public class MemberListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
viewHolder.btn_buy.setBackgroundResource(R.drawable.shape_rv_bg_btn_grap_yellow); viewHolder.btn_buy.setBackgroundResource(R.drawable.shape_rv_bg_btn_grap_yellow);
} else { } else {
hasAgree = true; hasAgree = true;
viewHolder.img_agree.setImageResource(R.drawable.common_icon_selected); viewHolder.img_agree.setImageResource(R.drawable.common_icon_like_selected);
viewHolder.btn_buy.setBackgroundResource(R.drawable.shape_rv_bg_dark_yellow); viewHolder.btn_buy.setBackgroundResource(R.drawable.shape_rv_bg_dark_yellow);
} }
} }
......
...@@ -4,6 +4,7 @@ import android.content.Intent; ...@@ -4,6 +4,7 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
...@@ -102,6 +103,10 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> { ...@@ -102,6 +103,10 @@ public class TravelSearchActivity extends BaseStatusActivity<SearchPresenter> {
finish(); finish();
}else if (id == R.id.tv_search){ }else if (id == R.id.tv_search){
String content = etSearch.getText().toString().trim(); String content = etSearch.getText().toString().trim();
if (TextUtils.isEmpty(content)){
showToast("请输入搜索内容!");
return;
}
loadTourAroundData(content); loadTourAroundData(content);
} }
} }
......
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