页面优化
This commit is contained in:
@@ -191,7 +191,7 @@ class HomeActivity : BaseActivity() {
|
|||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
private fun updateUI(data: RespData<*>) {
|
private fun updateUI(data: RespData<*>) {
|
||||||
binding.include?.root?.gone()
|
binding.include?.root?.gone()
|
||||||
Loading.dismiss()
|
window?.decorView?.postDelayed({Loading.dismiss()},500)
|
||||||
if (data.result !is ShelfResult) {
|
if (data.result !is ShelfResult) {
|
||||||
loadEmptyView()
|
loadEmptyView()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -334,7 +334,8 @@ class ShelfActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
it.ivEmptyIcon.setImageResource(R.drawable.ic_empty_gray)
|
it.ivEmptyIcon.setImageResource(R.drawable.ic_empty_gray)
|
||||||
it.ivEmptyIcon.updateLayoutParams<LinearLayout.LayoutParams> {
|
it.ivEmptyIcon.updateLayoutParams<LinearLayout.LayoutParams> {
|
||||||
width = 200.dp
|
val swDpValue = resources?.configuration?.smallestScreenWidthDp?:0
|
||||||
|
width = if (swDpValue > 600) 200.dp else 120.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.refreshLayout.run {
|
binding.refreshLayout.run {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user