作者 zhangji

增加收藏列表中的课程,在配置文件中增加客服页面

... ... @@ -133,6 +133,8 @@
<activity android:name=".ui.mine.activity.ComplaintsAndSuggestionsSuccessActivity"/>
<activity android:name=".ui.mine.activity.ClassDutyActivity"/>
<activity android:name=".ui.mine.activity.SignInActivity"/>
<activity android:name=".ui.mine.activity.CollectActivity" />
<activity android:name=".ui.mine.activity.ServiceActivity" />
</application>
... ...
... ... @@ -37,7 +37,7 @@ class HomeFragment :
binding.apply {
//搜索
search.setOnClickListener {
startActivity(CollectActivity::class.java)
startActivity(ServiceActivity::class.java)
// startActivity(SearchActivity::class.java)
}
banner.setAdapter(object : BannerImageAdapter<Int>(
... ...
... ... @@ -5,6 +5,7 @@ import com.br_technology.securitytrain_master.base.view.BasePagerAdapter
import com.br_technology.securitytrain_master.databinding.ActivityCollectBinding
import com.br_technology.securitytrain_master.ui.home.viewmodel.CollectViewModel
import com.br_technology.securitytrain_master.ui.mine.fragment.ClassDutyCourseFragment
import com.br_technology.securitytrain_master.ui.mine.fragment.CourseFragment
import com.br_technology.securitytrain_master.ui.mine.fragment.DatabaseFragment
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
... ... @@ -25,7 +26,7 @@ class CollectActivity :
"资料",
)
val fragments = listOf(
ClassDutyCourseFragment(), DatabaseFragment()
CourseFragment(), DatabaseFragment()
)
val basePagerAdapter = BasePagerAdapter(
... ...
package com.br_technology.securitytrain_master.ui.mine.fragment
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.FragmentCourseBinding
import com.br_technology.securitytrain_master.databinding.FragmentDatabaseBinding
import com.br_technology.securitytrain_master.ui.home.adapter.ResultAdapter
import com.br_technology.securitytrain_master.ui.home.pojo.RecommendData
import com.br_technology.securitytrain_master.ui.home.viewmodel.DatabaseFViewModel
import com.br_technology.securitytrain_master.ui.mine.adapter.SideslipAdapter
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment
/**
* createTime:2021/8/2 16:21
* auth:张继
* des:资料
*/
class CourseFragment :BaseLifeCycleFragment<DatabaseFViewModel,FragmentCourseBinding>(FragmentCourseBinding::inflate){
override fun initData() {
super.initData()
binding.apply {
val recommendList = mutableListOf(
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
RecommendData(
R.mipmap.banner,
"思维导图高分作文法(高中)议论",
"从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
),
)
val resultAdapter = SideslipAdapter()
result.adapter = resultAdapter
resultAdapter.addList(recommendList)
}
}
override fun initDataObserver() {
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.repository
import androidx.lifecycle.MutableLiveData
import com.br_technology.securitytrain_master.base.common.State
import com.wjx.android.wanandroidmvvm.base.repository.ApiRepository
/**
* createTime:2021/7/27 15:49
* auth:张继
* des:
*/
class CourseRepository(val loadState: MutableLiveData<State>):ApiRepository() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.viewmodel
import com.br_technology.securitytrain_master.ui.home.repository.*
import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
/**
* createTime:2021/7/27 15:48
* auth:张继
* des:
*/
class CourseViewModel:BaseViewModel<CourseRepository>() {
}
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<com.br_technology.securitytrain_master.view.SlideRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/result"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
... ...