Commit f85bb03a authored by jyx's avatar jyx

代码优化

parent 2e55c5bd
......@@ -129,22 +129,26 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
fun selectVedio() {
// vpFragmentMoney.currentItem = 0
xtFragmentMoney.getTabAt(0)?.select()
if (mainFragment == null) {
mainFragment = MainFragment()
}
addOrShowFragment(childFragmentManager, mainFragment!!, FRAGMENT_TAG_VIDEO)
}
fun selectBook() {
// vpFragmentMoney.currentItem = 1
xtFragmentMoney.getTabAt(1)?.select()
if (bookStoreFragment == null) {
bookStoreFragment = ZhangyueFragment()
}
addOrShowFragment(childFragmentManager, bookStoreFragment!!, FRAGMENT_TAG_BOOKSTORE)
}
fun selectXmly() {
xtFragmentMoney.getTabAt(2)?.select()
if (xmlyGameFragment == null) {
xmlyGameFragment = XmlyFragment()
}
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/pre_icon_transparent_disable" android:state_enabled="false"></item>
<item android:drawable="@mipmap/pre_icon_transparent_pressed" android:state_enabled="true" android:state_pressed="true"></item>
<item android:drawable="@mipmap/pre_icon_transparent_normal" android:state_enabled="true" android:state_pressed="false"></item>
</selector>
\ 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