Commit db858acd by konghaorui

Merge branch 'feature/v3' of…

Merge branch 'feature/v3' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into feature/v3
parents d3cfb990 3e96965f
......@@ -21,7 +21,7 @@ public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
// public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD;
public static String appEnv = YDLConstants.ENV_TEST;
@Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
......@@ -44,7 +44,7 @@ ext {
//第三步 若干
"m-confide" : "0.0.41.2",
"m-consultant" : "0.0.51.6",
"m-consultant" : "0.0.51.11",
"m-fm" : "0.0.23.4",
"m-user" : "0.0.41.1",
"m-home" : "0.0.6.25",
......
......@@ -1341,6 +1341,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
override fun onRefresh() {
refresh(false)
recommendListView.requestData()
}
//刷新列表
......
......@@ -1278,6 +1278,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun onRefresh() {
refresh(false)
recommendListView.requestData()
}
//刷新列表
......
......@@ -19,18 +19,18 @@ public class ExpertSearchBigShotBean {
* topicImages : [{"id":88,"parentId":62,"iamgeType":2,"isShow":1,"createTime":"Dec 13, 2019 9:35:45 PM","updateTime":"Dec 16, 2019 4:31:42 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":133,"parentId":62,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:23:00 PM","updateTime":"Dec 16, 2019 4:34:48 PM","createrId":0,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":134,"parentId":62,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:28:03 PM","updateTime":"Dec 16, 2019 4:29:58 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":146,"parentId":62,"iamgeType":3,"isShow":1,"createTime":"Dec 16, 2019 4:32:15 PM","updateTime":"Dec 16, 2019 4:34:01 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"}]
*/
private int id;
private String specialTopicName;
private int specialTopicType;
private String specialTopicTitle;
private String specialTopicSubhead;
private int status;
private int weight;
private int jumpWay;
private String createTime;
private String updateTime;
private int createrId;
private String specialTopicUrl;
private int id = 0;
private String specialTopicName = "";
private int specialTopicType = 0;
private String specialTopicTitle = "";
private String specialTopicSubhead = "";
private int status = 0;
private int weight = 0;
private int jumpWay = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String specialTopicUrl = "";
private List<TopicImagesBean> topicImages;
public int getId() {
......@@ -149,14 +149,14 @@ public class ExpertSearchBigShotBean {
* imageUrl : https://pic.ydlcdn.com/6n5AcChhYa.png
*/
private int id;
private int parentId;
private int imageType;
private int isShow;
private String createTime;
private String updateTime;
private int createrId;
private String imageUrl;
private int id = 0;
private int parentId = 0;
private int imageType = 0;
private int isShow = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String imageUrl = "";
public int getId() {
return id;
......
......@@ -20,18 +20,18 @@ public class ExpertSearchRecommandBean {
* topicImages : [{"id":103,"parentId":68,"iamgeType":2,"isShow":1,"createTime":"Dec 13, 2019 9:35:47 PM","updateTime":"Dec 16, 2019 4:31:55 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":140,"parentId":68,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:28:05 PM","updateTime":"Dec 16, 2019 4:30:13 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":152,"parentId":68,"iamgeType":3,"isShow":1,"createTime":"Dec 16, 2019 4:32:18 PM","updateTime":"Dec 16, 2019 4:34:15 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"}]
*/
private int id;
private String specialTopicName;
private int specialTopicType;
private String specialTopicTitle;
private String specialTopicSubhead;
private int status;
private int weight;
private int jumpWay;
private String createTime;
private String updateTime;
private int createrId;
private String specialTopicUrl;
private int id = 0;
private String specialTopicName = "";
private int specialTopicType = 0;
private String specialTopicTitle = "";
private String specialTopicSubhead = "";
private int status = 0;
private int weight = 0;
private int jumpWay = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String specialTopicUrl = "";
private List<TopicImagesBean> topicImages;
public int getId() {
......@@ -150,14 +150,14 @@ public class ExpertSearchRecommandBean {
* imageUrl : https://pic.ydlcdn.com/6n5AcChhYa.png
*/
private int id;
private int parentId;
private int imageType;
private int isShow;
private String createTime;
private String updateTime;
private int createrId;
private String imageUrl;
private int id = 0;
private int parentId = 0;
private int imageType = 0;
private int isShow = 0;
private String createTime = "";
private String updateTime = "";
private int createrId = 0;
private String imageUrl = "";
public int getId() {
return id;
......
......@@ -54,7 +54,6 @@ class RecommendItemView : LinearLayout {
layoutParams = params
orientation = HORIZONTAL
setPadding(RxImageTool.dp2px(15f), RxImageTool.dp2px(9f), 0, RxImageTool.dp2px(11f))
View.inflate(mContext, R.layout.consultant_expert_search_top_item_view, this)
}
......
......@@ -85,6 +85,9 @@ class RecommendListView : LinearLayout {
.filter { true }
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
mSceneSpecialTopicList.clear()
mDoctorSpecialTopicsList.clear()
itemListView.removeAllViews()
if (null != mContext) {
if (it.sceneSpecialTopics == null || it.sceneSpecialTopics.size == 0) {
recommendViewPager.visibility = View.GONE
......@@ -130,6 +133,7 @@ class RecommendListView : LinearLayout {
private fun initViewPager() {
mContext?.let {
mViewPagerList.clear()
/**
* 渲染第一页数据
*/
......@@ -143,11 +147,17 @@ class RecommendListView : LinearLayout {
val ll = getLinearLayout(mContext!!, RxImageTool.dp2px(60f), HORIZONTAL)
val item = RecommendItemView(mContext!!)
item.setPadding(RxImageTool.dp2px(15f), RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item.setData(mSceneSpecialTopicList[index])
ll.addView(item)
if (index + 1 < mSceneSpecialTopicList.size) {
val item1 = RecommendItemView(mContext!!)
item1.setData(mSceneSpecialTopicList[index])
item1.setPadding(0, RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item1.setData(mSceneSpecialTopicList[index + 1])
ll.addView(item1)
}
firstPager.addView(ll)
......@@ -169,11 +179,17 @@ class RecommendListView : LinearLayout {
val ll = getLinearLayout(mContext!!, RxImageTool.dp2px(60f), HORIZONTAL)
val item = RecommendItemView(mContext!!)
item.setPadding(RxImageTool.dp2px(15f), RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item.setData(mSceneSpecialTopicList[index])
ll.addView(item)
if (index + 1 < mSceneSpecialTopicList.size) {
val item1 = RecommendItemView(mContext!!)
item1.setData(mSceneSpecialTopicList[index])
item1.setPadding(0, RxImageTool.dp2px(9f), RxImageTool.dp2px(15f), RxImageTool.dp2px(11f))
item1.setData(mSceneSpecialTopicList[index + 1])
ll.addView(item1)
}
secondPager.addView(ll)
......@@ -185,7 +201,7 @@ class RecommendListView : LinearLayout {
recommendViewPager.currentItem = 0
if (mSceneSpecialTopicList.size < 4) {
setOnlyOnePage()
recommendViewPagerIndicator.visibility = View.GONE
} else {
setSelectedIndex(0) // 默认为左边选中
}
......@@ -237,13 +253,6 @@ class RecommendListView : LinearLayout {
}
}
private fun setOnlyOnePage() {
leftIndicator.layoutParams = LayoutParams(dp_15, dp_5)
leftIndicator.setBackgroundResource(R.drawable.consultant_indicator_selected)
rightIndicator.visibility = View.GONE
}
private fun getMinData(a: Int, b: Int): Int {
return if (a < b) a else b
}
......
......@@ -32,6 +32,7 @@
android:gravity="left|top"
android:text="标题"
android:textSize="14dp"
android:maxLines="1"
android:textColor="#242424"
android:textStyle="bold"/>
......@@ -41,6 +42,7 @@
android:layout_height="wrap_content"
android:gravity="left|top"
android:text="我是描述"
android:maxLines="1"
android:textSize="11dp"
android:textColor="#999999"/>
</LinearLayout>
......
......@@ -113,6 +113,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
private Fragment[] mFragments;
private TrendsHomeVpAdapter vpAdapter;
private long lastTabClick = 0;
private int currentPostion = -1;
String tab;
public TrendsHomeFragment setTab(String tab) {
......@@ -229,6 +230,10 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
@Override
public void onPageSelected(int position) {
if (position == currentPostion) {
return;
}
currentPostion = position;
if (position >= 1) {
vpContent.setOffscreenPageLimit(2);
}
......
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