Commit d9c1c7b6 authored by mengcuiguang2's avatar mengcuiguang2

修改vip弹窗

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