Commit e9849e2a authored by jyx's avatar jyx

代码优化

parent 223c768b
...@@ -94,16 +94,13 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou ...@@ -94,16 +94,13 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
holder.getView<LinearLayout>(R.id.ll_recommend_root) holder.getView<LinearLayout>(R.id.ll_recommend_root)
.setBackgroundResource(R.drawable.shape_bg_black) .setBackgroundResource(R.drawable.shape_bg_black)
if(item.headerUrl!=null&&!TextUtils.isEmpty(item.headerUrl)){ loadSquareImageView(
loadSquareImageView( context,
context, item.headerUrl,
item.headerUrl, holder.getView(R.id.iv_recommend_header),
holder.getView(R.id.iv_recommend_header), isBlur,
isBlur, R.mipmap.ic_default_avatar_female
R.mipmap.ic_default_avatar_female )
)
}
holder.getView<RelativeLayout>(R.id.rl_album).visibility = View.VISIBLE holder.getView<RelativeLayout>(R.id.rl_album).visibility = View.VISIBLE
holder.getView<TextView>(R.id.tv_status).visibility = View.VISIBLE holder.getView<TextView>(R.id.tv_status).visibility = View.VISIBLE
...@@ -219,7 +216,7 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou ...@@ -219,7 +216,7 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
fun loadSquareImageView( fun loadSquareImageView(
ctx: Context, ctx: Context,
path: String, path: String?,
iv: ImageView, iv: ImageView,
isBlur: Boolean, isBlur: Boolean,
defaultImage: Int = R.mipmap.ic_default_avatar_male defaultImage: Int = R.mipmap.ic_default_avatar_male
......
...@@ -66,9 +66,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene ...@@ -66,9 +66,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
override fun onFragmentResume() { override fun onFragmentResume() {
super.onFragmentResume() super.onFragmentResume()
if (::squareAdapter.isInitialized && !squareAdapter.isBlur() && UserManager.getInstance().vipFlag) { // if (::squareAdapter.isInitialized && !squareAdapter.isBlur() && UserManager.getInstance().vipFlag) {
squareAdapter.setIsBlur(true) // squareAdapter.setIsBlur(true)
} // }
} }
override fun onFragmentFirstVisible() { override fun onFragmentFirstVisible() {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_behavior=".ui.widgets.AppBarLayoutBehavior"> >
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
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