Commit d9c1c7b6 authored by mengcuiguang2's avatar mengcuiguang2

修改vip弹窗

parent 13b83ef7
......@@ -135,6 +135,7 @@
android:name=".ui.activitys.VipForDialogActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/TransparentTheme"
tools:node="merge">
<intent-filter tools:node="replace">
<category android:name="android.intent.category.BROWSABLE" />
......
......@@ -435,7 +435,7 @@ class VipForDialogActivity : BaseActivity(), VipView, View.OnClickListener,
cbVipAgreement.setOnCheckedChangeListener(this)
}
override fun onItemClick(position: Int, view: View) {
override fun onItemClick(position: Int) {
vipAdapter.setPosition(position)
vipAdapter.notifyDataSetChanged()
......@@ -443,15 +443,15 @@ class VipForDialogActivity : BaseActivity(), VipView, View.OnClickListener,
if (vipList != null && vipList!!.size > 0) {
setVipContent(vipList!![position])
if (vipList!!.size > 2) {
if (position > 1 && position < vipList!!.size - 2) {
moveToCenter(view);
} else if (position in 0..1) {
rvVip.smoothScrollToPosition(0);
} else {
rvVip.smoothScrollToPosition(vipList!!.size - 1);
}
}
// if (vipList!!.size > 2) {
// if (position > 1 && position < vipList!!.size - 2) {
// moveToCenter(view);
// } else if (position in 0..1) {
// rvVip.smoothScrollToPosition(0);
// } else {
// rvVip.smoothScrollToPosition(vipList!!.size - 1);
// }
// }
}
}
......@@ -835,4 +835,5 @@ class VipForDialogActivity : BaseActivity(), VipView, View.OnClickListener,
e.printStackTrace()
}
}
}
\ No newline at end of file
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