From 855a7e18a795f0db2453a19e3e8f26ba2ff553b4 Mon Sep 17 00:00:00 2001 From: lmw <125975490@qq.com> Date: 星期四, 29 五月 2025 16:32:41 +0800 Subject: [PATCH] UI调整 --- app/src/main/java/com/dollearn/student/ui/home/WeekendFragment.kt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/app/src/main/java/com/dollearn/student/ui/home/WeekendFragment.kt b/app/src/main/java/com/dollearn/student/ui/home/WeekendFragment.kt index a7b3608..24b214e 100644 --- a/app/src/main/java/com/dollearn/student/ui/home/WeekendFragment.kt +++ b/app/src/main/java/com/dollearn/student/ui/home/WeekendFragment.kt @@ -3,7 +3,13 @@ import androidx.core.os.bundleOf import cn.sinata.xldutils.fragment.BaseFragment import com.dollearn.student.R +import com.dollearn.student.network.HttpManager +import com.dollearn.student.network.requestByF +import com.dollearn.student.utils.Const +import com.dollearn.student.utils.event.EmptyEvent import kotlinx.android.synthetic.main.fragment_weekend.* +import org.greenrobot.eventbus.EventBus +import org.jetbrains.anko.support.v4.startActivity class WeekendFragment : BaseFragment() { override fun contentViewId() = R.layout.fragment_weekend @@ -14,11 +20,45 @@ private val week by lazy { (requireActivity() as ScheduleActivity).week } + private val season by lazy { + (requireActivity() as ScheduleActivity).season + } override fun onFirstVisibleToUser() { if (day == 7){ tv_name_1.text = "自主故事1—看图配音" tv_name_2.text = "自主故事2—框架记忆" + cl_1.setOnClickListener { + showDialog("加载题目...") + HttpManager.lookPictureDbu(season, week).requestByF(this){_,data-> + startActivity<LookImgActivity>("data" to data,"week" to week,"season" to season) + EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) + } + } + cl_2.setOnClickListener { + showDialog("加载题目...") + HttpManager.frameworkMemory(season, week).requestByF(this){_,data-> + startActivity<ListenStoryActivity>("data" to data,"week" to week,"season" to season) + EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) + + } + } + } + if (day == 6){ + cl_1.setOnClickListener { + HttpManager.userGameDifficulty(week).requestByF(this){_,data-> + startActivity<SuperListenActivity>("week" to week,"season" to season,"level" to (data?:0)) + EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) + } + } + cl_2.setOnClickListener { + showDialog("加载题目...") + HttpManager.gameMemory(season, week).requestByF(this){_,data-> + startActivity<MemoryActivity>("data" to data,"week" to week,"season" to season) + EventBus.getDefault().post(EmptyEvent(Const.EventCode.START_TIMER)) + + } + } } } -- Gitblit v1.7.1