Commit 4bdb393f by 刘鹏

Merge branch 'fix/fq/fq_fix_4.3.99' into 'd/v4.3.99'

Fix/fq/fq fix 4.3.99

See merge request app_android_lib/YDL-Component!205
parents 7110d8fc 3dd1ce7c
...@@ -37,7 +37,11 @@ import kotlin.math.roundToInt ...@@ -37,7 +37,11 @@ import kotlin.math.roundToInt
* 筛选弹窗 * 筛选弹窗
* Created by zqk on 17-9-15. * Created by zqk on 17-9-15.
*/ */
class FilterPopupWindow(private val context: Context, private val filterData: Filters, private val tempFilter: AllFilter) : PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) { class FilterPopupWindow(
private val context: Context,
private val filterData: Filters,
private val tempFilter: AllFilter
) : PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) {
private val mDisposableList = CompositeDisposable() private val mDisposableList = CompositeDisposable()
...@@ -139,7 +143,6 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -139,7 +143,6 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
tempFilter.showType = filterData.showType[0] tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear() tempFilter.ages.clear()
tempFilter.doctorEdu.clear() tempFilter.doctorEdu.clear()
tempFilter.enquiries.clear()
// 擅长人群 // 擅长人群
tempFilter.specialityCrowd.clear() tempFilter.specialityCrowd.clear()
tempFilter.others.clear() tempFilter.others.clear()
...@@ -158,17 +161,26 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -158,17 +161,26 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
showTypeViews[1].isSelected = true showTypeViews[1].isSelected = true
for (v in enquiryViews) { for (v in enquiryViews) {
v.isSelected = false v.isSelected = false
if (v is TextView) { val textView: TextView = v.findViewById(R.id.tvFilterName)
v.paint.isFakeBoldText = false val ivIcon: ImageView = v.findViewById(R.id.iv_consultant_method)
textView.paint.isFakeBoldText = false
tempFilter.enquiries.forEach {
if (textView.text.toString() == it.value) {
Glide.with(context)
.load(it.unCheckUrl)
.into(ivIcon)
}
} }
} }
tempFilter.enquiries.clear()
for (v in ageViews) { for (v in ageViews) {
v.isSelected = false v.isSelected = false
if (v is TextView) { if (v is TextView) {
v.paint.isFakeBoldText = false v.paint.isFakeBoldText = false
} }
} }
for (v in goodAtViews){ for (v in goodAtViews) {
v.isSelected = false v.isSelected = false
v.paint.isFakeBoldText = false v.paint.isFakeBoldText = false
} }
...@@ -325,6 +337,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -325,6 +337,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
fun addSubscription(disposable: Disposable) { fun addSubscription(disposable: Disposable) {
mDisposableList.add(disposable) mDisposableList.add(disposable)
} }
/** /**
* 其他选择 * 其他选择
* */ * */
...@@ -413,13 +426,13 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -413,13 +426,13 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
if (text == "展开") { if (text == "展开") {
view.tv_crowd_open.text = "收起" view.tv_crowd_open.text = "收起"
view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_close) view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_close)
for (i in 20 until goodAtViews.size){ for (i in 20 until goodAtViews.size) {
goodAtViews[i].visibility = View.VISIBLE goodAtViews[i].visibility = View.VISIBLE
} }
} else { } else {
view.tv_crowd_open.text = "展开" view.tv_crowd_open.text = "展开"
view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_open) view.iv_crowd_open.setImageResource(R.drawable.ic_crowd_open)
for (i in 20 until goodAtViews.size){ for (i in 20 until goodAtViews.size) {
goodAtViews[i].visibility = View.GONE goodAtViews[i].visibility = View.GONE
} }
} }
...@@ -452,7 +465,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -452,7 +465,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
} }
} }
if (index>19){ if (index > 19) {
textView.visibility = View.GONE textView.visibility = View.GONE
} }
goodAtViews.add(textView) goodAtViews.add(textView)
...@@ -460,6 +473,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -460,6 +473,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
} }
} }
/** /**
* 年龄 * 年龄
* */ * */
...@@ -500,6 +514,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -500,6 +514,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
view.flAge.addView(textView) view.flAge.addView(textView)
} }
} }
/** /**
* 学历 * 学历
* */ * */
...@@ -545,8 +560,8 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -545,8 +560,8 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
for ((index, enquiry) in filterData.enquiry.withIndex()) { for ((index, enquiry) in filterData.enquiry.withIndex()) {
val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null) val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null)
val textView:TextView = llLayout.findViewById(R.id.tvFilterName) val textView: TextView = llLayout.findViewById(R.id.tvFilterName)
val ivIcon:ImageView = llLayout.findViewById(R.id.iv_consultant_method) val ivIcon: ImageView = llLayout.findViewById(R.id.iv_consultant_method)
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f)) val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
val marginNum = RxImageTool.dp2px(5f) val marginNum = RxImageTool.dp2px(5f)
params.setMargins( params.setMargins(
...@@ -561,7 +576,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi ...@@ -561,7 +576,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
.load(enquiry.unCheckUrl) .load(enquiry.unCheckUrl)
.into(ivIcon) .into(ivIcon)
enquiryViews.add(view) enquiryViews.add(llLayout)
if (tempFilter.enquiries.contains(enquiry)) { if (tempFilter.enquiries.contains(enquiry)) {
llLayout.isSelected = true llLayout.isSelected = true
textView.paint.isFakeBoldText = true textView.paint.isFakeBoldText = true
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvRegion" android:id="@+id/rvRegion"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/platform_white" android:background="@color/platform_white"
android:layout_weight="1" android:layout_weight="1"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvSub" android:id="@+id/rvSub"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/platform_color_F7F7F7" android:background="@color/platform_color_F7F7F7"
android:layout_weight="2" android:layout_weight="2"
......
...@@ -137,7 +137,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -137,7 +137,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
initListeners(); initListeners();
// initDatas(); // initDatas();
setTabSelection(0); setTabSelection(0);
StatusBarUtils.Companion.setCustomStatusView(this,members_title_rel,true); StatusBarUtils.Companion.setCustomStatusViewForMembers(this,members_title_rel,true);
} }
private void initEvent() { private void initEvent() {
......
...@@ -37,6 +37,7 @@ import com.yidianling.dynamic.trendList.adapter.RecommendTopicListAdapter ...@@ -37,6 +37,7 @@ import com.yidianling.dynamic.trendList.adapter.RecommendTopicListAdapter
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTER_STATE_NO_DATA import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTER_STATE_NO_DATA
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_LOAD_MORE import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_LOAD_MORE
import com.yidianling.dynamic.trendList.adapter.TrendsListAdapter.FOOTRE_STATE_INIT
import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity import com.yidianling.dynamic.trendsDetail.TrendsDetailActivity
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
...@@ -428,17 +429,13 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView, ...@@ -428,17 +429,13 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
if (trend_list_no_datas_rel!!.visibility != View.GONE) { if (trend_list_no_datas_rel!!.visibility != View.GONE) {
trend_list_no_datas_rel!!.visibility = View.GONE trend_list_no_datas_rel!!.visibility = View.GONE
} }
if (cdl!!.visibility != View.VISIBLE) {
cdl!!.visibility = View.VISIBLE
}
} }
private fun showErrorView() { private fun showErrorView() {
if (page == 1) { if (page == 1) {
cdl!!.visibility = View.GONE
trend_list_no_datas_rel!!.visibility = View.VISIBLE trend_list_no_datas_rel!!.visibility = View.VISIBLE
} else { } else {
cdl!!.visibility = View.VISIBLE
trend_list_no_datas_rel!!.visibility = View.GONE trend_list_no_datas_rel!!.visibility = View.GONE
} }
} }
...@@ -590,8 +587,11 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView, ...@@ -590,8 +587,11 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
} else { } else {
LogUtil.i("get datas no more data$data") LogUtil.i("get datas no more data$data")
trendsDatas!!.addAll(data) trendsDatas!!.addAll(data)
if (trendsDatas == null || trendsDatas!!.size <= 0) { if (trendsDatas == null || trendsDatas!!.size == 0) {
cdl!!.visibility = View.GONE mRcvAdapter!!.setDatas(trendsDatas, FOOTRE_STATE_INIT)
if (page == 1) {
mRcvAdapter!!.notifyDataSetChanged()
}
trend_list_no_datas_rel!!.visibility = View.VISIBLE trend_list_no_datas_rel!!.visibility = View.VISIBLE
return return
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout <com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/trends_lastr_swl" android:id="@+id/trends_lastr_swl"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:background="@color/dynamic_white"> android:background="@color/dynamic_white">
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.recyclerview.widget.RecyclerView
android:id="@+id/cdl" android:id="@+id/trends_rcv"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="@color/dynamic_f5f5f5"
<androidx.recyclerview.widget.RecyclerView android:descendantFocusability="blocksDescendants"
android:id="@+id/trends_rcv" app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dynamic_f5f5f5"
android:descendantFocusability="blocksDescendants"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/image_scroll_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="85dp"
android:layout_marginRight="28dp"
android:padding="0dp"
android:background="@color/dynamic_white"
android:src="@drawable/dynamic_newsfeed_top"
android:visibility="visible"
app:backgroundTint="@color/dynamic_white"
app:borderWidth="0dp"
app:fabSize="mini"
android:scaleType="center"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"
app:layout_behavior="com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/recommend_trend_add_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginRight="20dp"
android:background="@color/platform_main_theme"
android:elevation="3dp"
android:padding="0dp"
android:src="@drawable/dynamic_newsfeed_new2"
app:backgroundTint="@color/platform_main_theme"
app:borderWidth="0dp"
app:fabSize="normal"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/trend_list_no_datas_rel" android:id="@+id/trend_list_no_datas_rel"
...@@ -77,7 +31,7 @@ ...@@ -77,7 +31,7 @@
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="100dp" android:layout_height="100dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:src="@drawable/dynamic_blank"/> android:src="@drawable/dynamic_blank" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -86,11 +40,44 @@ ...@@ -86,11 +40,44 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:text="暂无相关记录~" android:text="暂无相关记录~"
android:textColor="@color/dynamic_text_gray"/> android:textColor="@color/dynamic_text_gray" />
</RelativeLayout> </RelativeLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/image_scroll_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="28dp"
android:layout_marginBottom="85dp"
android:background="@color/dynamic_white"
android:padding="0dp"
android:scaleType="center"
android:src="@drawable/dynamic_newsfeed_top"
android:visibility="visible"
app:backgroundTint="@color/dynamic_white"
app:borderWidth="0dp"
app:fabSize="mini"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"
app:layout_behavior="com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/recommend_trend_add_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:background="@color/platform_main_theme"
android:elevation="3dp"
android:padding="0dp"
android:src="@drawable/dynamic_newsfeed_new2"
app:backgroundTint="@color/platform_main_theme"
app:borderWidth="0dp"
app:fabSize="normal"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end" />
</LinearLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
\ No newline at end of file
...@@ -176,7 +176,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm ...@@ -176,7 +176,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (!TextUtils.isEmpty(doctorName)) { if (!TextUtils.isEmpty(doctorName)) {
searchText = doctorName searchText = doctorName
} }
home_tv.setOnClickListener { homeEvent?.searchTvClick(searchText) } home_tv.setOnClickListener {
homeEvent?.searchTvClick(searchText)
}
iv_search_icon.setOnClickListener {
homeEvent?.searchTvClick(searchText)
}
home_tv.text = searchText home_tv.text = searchText
} }
......
...@@ -154,10 +154,10 @@ ...@@ -154,10 +154,10 @@
<ImageView <ImageView
android:id="@+id/iv_search_icon" android:id="@+id/iv_search_icon"
android:layout_width="12dp" android:layout_width="@dimen/platform_dp_26"
android:layout_height="12dp" android:layout_height="@dimen/platform_dp_14"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp" android:paddingLeft="12dp"
android:src="@drawable/home_icon_search"/> android:src="@drawable/home_icon_search"/>
<TextView <TextView
......
...@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.lifecycle.ILifecycleable; ...@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.lifecycle.ILifecycleable;
import com.ydl.ydlcommon.data.http.RxUtils; import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.data.http.ThrowableConsumer; import com.ydl.ydlcommon.data.http.ThrowableConsumer;
import com.ydl.ydlcommon.utils.StringUtils; import com.ydl.ydlcommon.utils.StringUtils;
import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.remind.ToastHelper; import com.ydl.ydlcommon.utils.remind.ToastHelper;
import com.yidianling.im.bean.MsgData; import com.yidianling.im.bean.MsgData;
import com.yidianling.im.config.constants.ImConstants; import com.yidianling.im.config.constants.ImConstants;
...@@ -64,6 +65,9 @@ public class MsgListAdapter extends CommonAdapter<MsgData> { ...@@ -64,6 +65,9 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
} }
((MsgListItemView) convertView).setData(mDataList.get(position)); ((MsgListItemView) convertView).setData(mDataList.get(position));
convertView.setOnClickListener(v -> { convertView.setOnClickListener(v -> {
if (Utils.isFastClick()) {
return;
}
//动态消息暂时不需要访问以下接口 //动态消息暂时不需要访问以下接口
boolean fla = false; boolean fla = false;
//判断是否是跳转专家主页 //判断是否是跳转专家主页
......
...@@ -67,9 +67,21 @@ public class DatePickerDialogFragment extends BaseDialogFragment implements Date ...@@ -67,9 +67,21 @@ public class DatePickerDialogFragment extends BaseDialogFragment implements Date
@Override @Override
public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) { public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
this.year = year; if (isDataAfter(view)) {
this.month = monthOfYear; Calendar mCalendar = Calendar.getInstance();
this.day = dayOfMonth; view.init(mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), this);
}
}
private boolean isDataAfter(DatePicker datePicker) {
Calendar mCalendar = Calendar.getInstance();
Calendar tempCalendar = Calendar.getInstance();
tempCalendar.set(datePicker.getYear(), datePicker.getMonth(), datePicker.getDayOfMonth(), 0, 0, 0);
if (tempCalendar.after(mCalendar)) {
return true;
} else {
return false;
}
} }
......
...@@ -1097,6 +1097,20 @@ class StatusBarUtils { ...@@ -1097,6 +1097,20 @@ class StatusBarUtils {
statusBarLightMode(context) statusBarLightMode(context)
} }
} }
/**
* 适配 One Plus手机顶部返回按钮被截取问题
*/
fun setCustomStatusViewForMembers(context: Activity,statusView:View,isDarkMode:Boolean = false) {
val params = statusView.layoutParams
setTransparentForImageView(context, null)
val statusBarHeight = StatusBarUtils.getStatusBarHeight(context)
params.height = RxImageTool.dp2px(48f) + statusBarHeight
statusView.setPadding(0, statusBarHeight - 25, 0, 0)
if (isDarkMode) {
statusBarLightMode(context)
}
}
} }
//====================设置Activity状态栏View END==================== //====================设置Activity状态栏View END====================
......
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