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
......@@ -38,10 +38,11 @@ import kotlinx.android.synthetic.main.consultant_activity_hot_search.*
import kotlinx.android.synthetic.main.consultant_item_expert_hot_search.view.*
@Route(path = "/consult/hot_search")
class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchContract.Presenter>(), IHotSearchContract.View {
private lateinit var searchWordsAdapter:SearchWordsAdapter
class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchContract.Presenter>(),
IHotSearchContract.View {
private lateinit var searchWordsAdapter: SearchWordsAdapter
private val searchSuggestList: ArrayList<SearchSuggestListBean> = ArrayList()
private var mSearchContent:String = ""
private var mSearchContent: String = ""
private val CACHE_CONSULT_SEARCH_HISTORY_DATA = "cache_consult_search_history_data"
private val HOT_SEARCH_DOCTOR_NAME = "hot_search_doctor_name"
private var historyList: FixSizeLinkedList<String> = FixSizeLinkedList(15)
......@@ -88,7 +89,8 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
private fun initViews() {
StatusBarUtils.statusBarLightMode(this)
maxWidth = (2 * RxDeviceTool.getScreenWidth(this@HotSearchActivity)) - RxImageTool.dip2px(60f)
maxWidth =
(2 * RxDeviceTool.getScreenWidth(this@HotSearchActivity)) - RxImageTool.dip2px(60f)
dp42 = RxImageTool.dip2px(60f)
iv_delete_icon.setOnClickListener {
......@@ -99,21 +101,21 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
// 搜索的关联词
var relatedWords = ""
var isRecommendWords = false
if (searchSuggestList.isNotEmpty()&&searchSuggestList.size>0){
if (searchSuggestList[0].suggest_relations.size>0){
if (searchSuggestList.isNotEmpty() && searchSuggestList.size > 0) {
if (searchSuggestList[0].suggest_relations.size > 0) {
relatedWords = searchSuggestList[0].suggest_relations[0]
isRecommendWords = true
}
if (TextUtils.isEmpty(relatedWords)&&!TextUtils.isEmpty(searchSuggestList[0].suggest_content)){
if (TextUtils.isEmpty(relatedWords) && !TextUtils.isEmpty(searchSuggestList[0].suggest_content)) {
relatedWords = searchSuggestList[0].suggest_content
}
doSearch(etSearch.text.toString(),relatedWords,isRecommendWords)
}else{
doSearch(etSearch.text.toString(), relatedWords, isRecommendWords)
} else {
val searchWords = etSearch.text.toString()
if (TextUtils.isEmpty(searchWords)){
doSearch(searchWords,"",isRecommendWords)
}else{
getSearchWords(etSearch.text.toString(),true)
if (TextUtils.isEmpty(searchWords)) {
doSearch(searchWords, "", isRecommendWords)
} else {
getSearchWords(etSearch.text.toString(), true)
}
}
}
......@@ -129,8 +131,8 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
val data = ModularServiceManager.provide(IConsultantService::class.java).getGuideImage(5)
if (data?.size ?: 0 > 0) {
val imageUrl= data?.get(0)?.pic
iv_daoyi_image.visibility=View.VISIBLE
val imageUrl = data?.get(0)?.pic
iv_daoyi_image.visibility = View.VISIBLE
GlideApp.with(mContext)
.load(imageUrl)
......@@ -138,7 +140,11 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
iv_daoyi_image.setOnClickListener {
LogUtil.e("跳转导医:location=${data?.get(0)!!.location},title=${data[0].title}")
ConsultAssistantEntryUtils.jumpConsultAssistant(this, data[0].location.toInt(),"learning")
ConsultAssistantEntryUtils.jumpConsultAssistant(
this,
data[0].location.toInt(),
"learning"
)
}
}
......@@ -149,29 +155,35 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
// 搜索的关联词
var relatedWords = ""
var isRecommendWords = false
if (searchSuggestList.isNotEmpty()&&searchSuggestList.size>0){
if (searchSuggestList[position].suggest_relations.size>0){
if (searchSuggestList.isNotEmpty() && searchSuggestList.size > 0) {
if (searchSuggestList[position].suggest_relations.size > 0) {
relatedWords = searchSuggestList[position].suggest_relations[0]
isRecommendWords = true
}
if (TextUtils.isEmpty(relatedWords)&&!TextUtils.isEmpty(searchSuggestList[position].suggest_content)){
if (TextUtils.isEmpty(relatedWords) && !TextUtils.isEmpty(searchSuggestList[position].suggest_content)) {
relatedWords = searchSuggestList[position].suggest_content
}
}
doSearch(searchSuggestList[position].suggest_content,relatedWords,isRecommendWords)
doSearch(searchSuggestList[position].suggest_content, relatedWords, isRecommendWords)
// 埋点
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,ConsultBIConstants.POSITION_YDL_USER_ASSOCIATE_WORD_CLICK,etSearch.text.toString(),searchSuggestList[position].suggest_content,"app")
ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
ConsultBIConstants.POSITION_YDL_USER_ASSOCIATE_WORD_CLICK,
etSearch.text.toString(),
searchSuggestList[position].suggest_content,
"app"
)
}
etSearch.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(s: Editable?) {
if (TextUtils.isEmpty(s)) {
iv_delete_icon.visibility = View.INVISIBLE
rv_search_words.visibility = View.GONE
getSearchWords("",false)
getSearchWords("", false)
} else {
iv_delete_icon.visibility = View.VISIBLE
getSearchWords(s.toString(),false)
getSearchWords(s.toString(), false)
}
}
......@@ -190,43 +202,53 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
* 获取搜索联想词
* @param isClickWords 是否是点击历史搜索、热门搜索等进行搜索
*/
private fun getSearchWords(searchContent:String,isClickWords:Boolean){
if (!TextUtils.isEmpty(searchContent)){
private fun getSearchWords(searchContent: String, isClickWords: Boolean) {
if (!TextUtils.isEmpty(searchContent)) {
mSearchContent = searchContent
val map = HashMap<String, Any>()
map["content"] = searchContent
mPresenter.getSearchWords(map,searchContent,isClickWords)
}else{
mPresenter.getSearchWords(map, searchContent, isClickWords)
} else {
rv_search_words.visibility = View.GONE
}
}
override fun getSearchWordsSuccess(searchWordsBean: SearchWordsBean,searchContent:String,isClickWords:Boolean) {
if (isClickWords){
override fun getSearchWordsSuccess(
searchWordsBean: SearchWordsBean,
searchContent: String,
isClickWords: Boolean
) {
if (isClickWords) {
// 搜索的关联词
var relatedWords = ""
var isRecommendWords = false
if (!searchWordsBean.search_suggests.isNullOrEmpty()&&searchWordsBean.search_suggests.size>0){
if (searchWordsBean.search_suggests[0].suggest_relations.size>0){
if (!searchWordsBean.search_suggests.isNullOrEmpty() && searchWordsBean.search_suggests.size > 0) {
if (searchWordsBean.search_suggests[0].suggest_relations.size > 0) {
relatedWords = searchWordsBean.search_suggests[0].suggest_relations[0]
isRecommendWords = true
}
if (TextUtils.isEmpty(relatedWords)&&!TextUtils.isEmpty(searchWordsBean.search_suggests[0].suggest_content)){
if (TextUtils.isEmpty(relatedWords) && !TextUtils.isEmpty(searchWordsBean.search_suggests[0].suggest_content)) {
relatedWords = searchWordsBean.search_suggests[0].suggest_content
}
}
doSearch(searchContent,relatedWords,isRecommendWords)
}else{
doSearch(searchContent, relatedWords, isRecommendWords)
} else {
searchSuggestList.clear()
if (!searchWordsBean.search_suggests.isNullOrEmpty()){
if (!searchWordsBean.search_suggests.isNullOrEmpty()) {
rv_search_words.visibility = View.VISIBLE
searchSuggestList.addAll(searchWordsBean.search_suggests)
searchWordsAdapter.notifyDataAndSetSearchWord(mSearchContent)
// 埋点
val sign2 = searchSuggestList.joinToString(","){it.suggest_content}
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,ConsultBIConstants.POSITION_YDL_USER_ASSOCIATE_WORD_VISIT,searchContent,sign2,"app")
}else{
val sign2 = searchSuggestList.joinToString(",") { it.suggest_content }
ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
ConsultBIConstants.POSITION_YDL_USER_ASSOCIATE_WORD_VISIT,
searchContent,
sign2,
"app"
)
} else {
rv_search_words.visibility = View.GONE
}
}
......@@ -272,7 +294,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
.inflate(R.layout.consultant_item_expert_hot_search, flHotSearch, false)
view.tvHotSearch.text = keywordData[index].keyword
view.setOnClickListener {
getSearchWords(keywordData[index].keyword!!,true)
getSearchWords(keywordData[index].keyword!!, true)
}
flHotSearch.addView(view)
}
......@@ -304,7 +326,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
}
}
view.setOnClickListener {
getSearchWords(etSearch.text.toString(),true)
getSearchWords(hotSearchExpert[index].name!!, true)
}
flHotExpert.addView(view)
}
......@@ -366,7 +388,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
break
}
view.setOnClickListener {
getSearchWords(historyStr,true)
getSearchWords(historyStr, true)
}
fl_search_history.addView(view)
}
......@@ -386,14 +408,14 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
* 搜索
* @param isRecommendWords 是否是推荐词
*/
private fun doSearch(searchWords:String,relatedWords:String,isRecommendWords:Boolean) {
private fun doSearch(searchWords: String, relatedWords: String, isRecommendWords: Boolean) {
val view = this.currentFocus
if (view != null) {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(view.windowToken, 0)
}
ActionCountUtils.count(ConsultBIConstants.UserMainEvent.YDL_USER_SEARCH_CLICK,searchWords)
ActionCountUtils.count(ConsultBIConstants.UserMainEvent.YDL_USER_SEARCH_CLICK, searchWords)
if (!TextUtils.isEmpty(searchWords)) {
historyList.remove(searchWords)
historyList.add(searchWords)
......@@ -402,7 +424,7 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View, IHotSearchCon
Gson().toJson(historyList)
)
}
ExpertSearchActivity.startSearch(this, searchWords,"14",relatedWords,isRecommendWords)
ExpertSearchActivity.startSearch(this, searchWords, "14", relatedWords, isRecommendWords)
finish()
}
......
......@@ -37,7 +37,11 @@ import kotlin.math.roundToInt
* 筛选弹窗
* 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()
......@@ -139,7 +143,6 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear()
tempFilter.doctorEdu.clear()
tempFilter.enquiries.clear()
// 擅长人群
tempFilter.specialityCrowd.clear()
tempFilter.others.clear()
......@@ -158,17 +161,26 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
showTypeViews[1].isSelected = true
for (v in enquiryViews) {
v.isSelected = false
if (v is TextView) {
v.paint.isFakeBoldText = false
val textView: TextView = v.findViewById(R.id.tvFilterName)
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) {
v.isSelected = false
if (v is TextView) {
v.paint.isFakeBoldText = false
}
}
for (v in goodAtViews){
for (v in goodAtViews) {
v.isSelected = false
v.paint.isFakeBoldText = false
}
......@@ -325,6 +337,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
fun addSubscription(disposable: Disposable) {
mDisposableList.add(disposable)
}
/**
* 其他选择
* */
......@@ -413,13 +426,13 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
if (text == "展开") {
view.tv_crowd_open.text = "收起"
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
}
} else {
view.tv_crowd_open.text = "展开"
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
}
}
......@@ -452,7 +465,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
}
}
if (index>19){
if (index > 19) {
textView.visibility = View.GONE
}
goodAtViews.add(textView)
......@@ -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
view.flAge.addView(textView)
}
}
/**
* 学历
* */
......@@ -545,8 +560,8 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
for ((index, enquiry) in filterData.enquiry.withIndex()) {
val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null)
val textView:TextView = llLayout.findViewById(R.id.tvFilterName)
val ivIcon:ImageView = llLayout.findViewById(R.id.iv_consultant_method)
val textView: TextView = llLayout.findViewById(R.id.tvFilterName)
val ivIcon: ImageView = llLayout.findViewById(R.id.iv_consultant_method)
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
val marginNum = RxImageTool.dp2px(5f)
params.setMargins(
......@@ -561,7 +576,7 @@ class FilterPopupWindow(private val context: Context, private val filterData: Fi
.load(enquiry.unCheckUrl)
.into(ivIcon)
enquiryViews.add(view)
enquiryViews.add(llLayout)
if (tempFilter.enquiries.contains(enquiry)) {
llLayout.isSelected = true
textView.paint.isFakeBoldText = true
......
......@@ -6,7 +6,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvRegion"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@color/platform_white"
android:layout_weight="1"
......@@ -15,7 +15,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvSub"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@color/platform_color_F7F7F7"
android:layout_weight="2"
......
......@@ -137,7 +137,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
initListeners();
// initDatas();
setTabSelection(0);
StatusBarUtils.Companion.setCustomStatusView(this,members_title_rel,true);
StatusBarUtils.Companion.setCustomStatusViewForMembers(this,members_title_rel,true);
}
private void initEvent() {
......
......@@ -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.FOOTER_STATE_NO_DATA
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.trendsHome.TrendsHomeFragment
import io.reactivex.android.schedulers.AndroidSchedulers
......@@ -428,17 +429,13 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
if (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() {
if (page == 1) {
cdl!!.visibility = View.GONE
trend_list_no_datas_rel!!.visibility = View.VISIBLE
} else {
cdl!!.visibility = View.VISIBLE
trend_list_no_datas_rel!!.visibility = View.GONE
}
}
......@@ -590,8 +587,11 @@ class TrendsListFragment : BaseLazyFragment(), ITrendsListView,
} else {
LogUtil.i("get datas no more data$data")
trendsDatas!!.addAll(data)
if (trendsDatas == null || trendsDatas!!.size <= 0) {
cdl!!.visibility = View.GONE
if (trendsDatas == null || trendsDatas!!.size == 0) {
mRcvAdapter!!.setDatas(trendsDatas, FOOTRE_STATE_INIT)
if (page == 1) {
mRcvAdapter!!.notifyDataSetChanged()
}
trend_list_no_datas_rel!!.visibility = View.VISIBLE
return
}
......
<?xml version="1.0" encoding="utf-8"?>
<com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/trends_lastr_swl"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="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">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/cdl"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/trends_rcv"
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"/>
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<RelativeLayout
android:id="@+id/trend_list_no_datas_rel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone">
<ImageView
android:id="@+id/trend_list_no_datas_iv"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:src="@drawable/dynamic_blank" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/trend_list_no_datas_iv"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:text="暂无相关记录~"
android:textColor="@color/dynamic_text_gray" />
</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_marginBottom="85dp"
android:layout_marginRight="28dp"
android:padding="0dp"
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"
android:scaleType="center"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"
app:layout_behavior="com.yidianling.dynamic.common.behavior.ScrollAwareFABBehavior"/>
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:layout_marginBottom="20dp"
android:background="@color/platform_main_theme"
android:elevation="3dp"
android:padding="0dp"
......@@ -60,37 +75,9 @@
app:borderWidth="0dp"
app:fabSize="normal"
app:layout_anchor="@+id/trends_rcv"
app:layout_anchorGravity="bottom|right|end"/>
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<RelativeLayout
android:id="@+id/trend_list_no_datas_rel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone">
<ImageView
android:id="@+id/trend_list_no_datas_iv"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:src="@drawable/dynamic_blank"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/trend_list_no_datas_iv"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:text="暂无相关记录~"
android:textColor="@color/dynamic_text_gray"/>
</RelativeLayout>
</LinearLayout>
</com.ydl.ydlcommon.view.widgets.MultiSwipeRefreshLayout>
\ No newline at end of file
......@@ -176,7 +176,13 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
if (!TextUtils.isEmpty(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
}
......
......@@ -154,10 +154,10 @@
<ImageView
android:id="@+id/iv_search_icon"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_width="@dimen/platform_dp_26"
android:layout_height="@dimen/platform_dp_14"
android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp"
android:paddingLeft="12dp"
android:src="@drawable/home_icon_search"/>
<TextView
......
......@@ -14,6 +14,7 @@ import com.ydl.ydlcommon.base.lifecycle.ILifecycleable;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.data.http.ThrowableConsumer;
import com.ydl.ydlcommon.utils.StringUtils;
import com.ydl.ydlcommon.utils.Utils;
import com.ydl.ydlcommon.utils.remind.ToastHelper;
import com.yidianling.im.bean.MsgData;
import com.yidianling.im.config.constants.ImConstants;
......@@ -64,6 +65,9 @@ public class MsgListAdapter extends CommonAdapter<MsgData> {
}
((MsgListItemView) convertView).setData(mDataList.get(position));
convertView.setOnClickListener(v -> {
if (Utils.isFastClick()) {
return;
}
//动态消息暂时不需要访问以下接口
boolean fla = false;
//判断是否是跳转专家主页
......
......@@ -67,9 +67,21 @@ public class DatePickerDialogFragment extends BaseDialogFragment implements Date
@Override
public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
this.year = year;
this.month = monthOfYear;
this.day = dayOfMonth;
if (isDataAfter(view)) {
Calendar mCalendar = Calendar.getInstance();
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 {
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====================
......
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