作者 zhangji

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

@@ -133,6 +133,8 @@ @@ -133,6 +133,8 @@
133 <activity android:name=".ui.mine.activity.ComplaintsAndSuggestionsSuccessActivity"/> 133 <activity android:name=".ui.mine.activity.ComplaintsAndSuggestionsSuccessActivity"/>
134 <activity android:name=".ui.mine.activity.ClassDutyActivity"/> 134 <activity android:name=".ui.mine.activity.ClassDutyActivity"/>
135 <activity android:name=".ui.mine.activity.SignInActivity"/> 135 <activity android:name=".ui.mine.activity.SignInActivity"/>
  136 + <activity android:name=".ui.mine.activity.CollectActivity" />
  137 + <activity android:name=".ui.mine.activity.ServiceActivity" />
136 138
137 139
138 </application> 140 </application>
@@ -37,7 +37,7 @@ class HomeFragment : @@ -37,7 +37,7 @@ class HomeFragment :
37 binding.apply { 37 binding.apply {
38 //搜索 38 //搜索
39 search.setOnClickListener { 39 search.setOnClickListener {
40 - startActivity(CollectActivity::class.java) 40 + startActivity(ServiceActivity::class.java)
41 // startActivity(SearchActivity::class.java) 41 // startActivity(SearchActivity::class.java)
42 } 42 }
43 banner.setAdapter(object : BannerImageAdapter<Int>( 43 banner.setAdapter(object : BannerImageAdapter<Int>(
@@ -5,6 +5,7 @@ import com.br_technology.securitytrain_master.base.view.BasePagerAdapter @@ -5,6 +5,7 @@ import com.br_technology.securitytrain_master.base.view.BasePagerAdapter
5 import com.br_technology.securitytrain_master.databinding.ActivityCollectBinding 5 import com.br_technology.securitytrain_master.databinding.ActivityCollectBinding
6 import com.br_technology.securitytrain_master.ui.home.viewmodel.CollectViewModel 6 import com.br_technology.securitytrain_master.ui.home.viewmodel.CollectViewModel
7 import com.br_technology.securitytrain_master.ui.mine.fragment.ClassDutyCourseFragment 7 import com.br_technology.securitytrain_master.ui.mine.fragment.ClassDutyCourseFragment
  8 +import com.br_technology.securitytrain_master.ui.mine.fragment.CourseFragment
8 import com.br_technology.securitytrain_master.ui.mine.fragment.DatabaseFragment 9 import com.br_technology.securitytrain_master.ui.mine.fragment.DatabaseFragment
9 import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity 10 import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
10 11
@@ -25,7 +26,7 @@ class CollectActivity : @@ -25,7 +26,7 @@ class CollectActivity :
25 "资料", 26 "资料",
26 ) 27 )
27 val fragments = listOf( 28 val fragments = listOf(
28 - ClassDutyCourseFragment(), DatabaseFragment() 29 + CourseFragment(), DatabaseFragment()
29 ) 30 )
30 31
31 val basePagerAdapter = BasePagerAdapter( 32 val basePagerAdapter = BasePagerAdapter(
  1 +package com.br_technology.securitytrain_master.ui.mine.fragment
  2 +
  3 +import com.br_technology.securitytrain_master.R
  4 +import com.br_technology.securitytrain_master.databinding.FragmentCourseBinding
  5 +import com.br_technology.securitytrain_master.databinding.FragmentDatabaseBinding
  6 +import com.br_technology.securitytrain_master.ui.home.adapter.ResultAdapter
  7 +import com.br_technology.securitytrain_master.ui.home.pojo.RecommendData
  8 +import com.br_technology.securitytrain_master.ui.home.viewmodel.DatabaseFViewModel
  9 +import com.br_technology.securitytrain_master.ui.mine.adapter.SideslipAdapter
  10 +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment
  11 +
  12 +/**
  13 + * createTime:2021/8/2 16:21
  14 + * auth:张继
  15 + * des:资料
  16 + */
  17 +class CourseFragment :BaseLifeCycleFragment<DatabaseFViewModel,FragmentCourseBinding>(FragmentCourseBinding::inflate){
  18 + override fun initData() {
  19 + super.initData()
  20 + binding.apply {
  21 + val recommendList = mutableListOf(
  22 + RecommendData(
  23 + R.mipmap.banner,
  24 + "思维导图高分作文法(高中)议论",
  25 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  26 + ),
  27 + RecommendData(
  28 + R.mipmap.banner,
  29 + "思维导图高分作文法(高中)议论",
  30 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  31 + ),
  32 + RecommendData(
  33 + R.mipmap.banner,
  34 + "思维导图高分作文法(高中)议论",
  35 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  36 + ),
  37 + RecommendData(
  38 + R.mipmap.banner,
  39 + "思维导图高分作文法(高中)议论",
  40 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  41 + ),
  42 + RecommendData(
  43 + R.mipmap.banner,
  44 + "思维导图高分作文法(高中)议论",
  45 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  46 + ),
  47 + RecommendData(
  48 + R.mipmap.banner,
  49 + "思维导图高分作文法(高中)议论",
  50 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  51 + ),
  52 + RecommendData(
  53 + R.mipmap.banner,
  54 + "思维导图高分作文法(高中)议论",
  55 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  56 + ),
  57 + RecommendData(
  58 + R.mipmap.banner,
  59 + "思维导图高分作文法(高中)议论",
  60 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  61 + ),
  62 + RecommendData(
  63 + R.mipmap.banner,
  64 + "思维导图高分作文法(高中)议论",
  65 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  66 + ),
  67 + RecommendData(
  68 + R.mipmap.banner,
  69 + "思维导图高分作文法(高中)议论",
  70 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  71 + ),
  72 + RecommendData(
  73 + R.mipmap.banner,
  74 + "思维导图高分作文法(高中)议论",
  75 + "从这个角度看,康得在不经意间这样说过,既然我已踏上了这条道路,那么"
  76 + ),
  77 + )
  78 + val resultAdapter = SideslipAdapter()
  79 + result.adapter = resultAdapter
  80 + resultAdapter.addList(recommendList)
  81 + }
  82 + }
  83 + override fun initDataObserver() {
  84 +
  85 + }
  86 +}
  1 +package com.br_technology.securitytrain_master.ui.home.repository
  2 +
  3 +import androidx.lifecycle.MutableLiveData
  4 +import com.br_technology.securitytrain_master.base.common.State
  5 +import com.wjx.android.wanandroidmvvm.base.repository.ApiRepository
  6 +
  7 +/**
  8 + * createTime:2021/7/27 15:49
  9 + * auth:张继
  10 + * des:
  11 + */
  12 +class CourseRepository(val loadState: MutableLiveData<State>):ApiRepository() {
  13 +}
  1 +package com.br_technology.securitytrain_master.ui.home.viewmodel
  2 +
  3 +import com.br_technology.securitytrain_master.ui.home.repository.*
  4 +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
  5 +
  6 +/**
  7 + * createTime:2021/7/27 15:48
  8 + * auth:张继
  9 + * des:
  10 + */
  11 +class CourseViewModel:BaseViewModel<CourseRepository>() {
  12 +}
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<com.br_technology.securitytrain_master.view.SlideRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
  3 + xmlns:app="http://schemas.android.com/apk/res-auto"
  4 + android:id="@+id/result"
  5 + android:layout_width="match_parent"
  6 + android:layout_height="match_parent"
  7 + android:overScrollMode="never"
  8 + android:paddingStart="16dp"
  9 + android:paddingEnd="16dp"
  10 + android:scrollbars="none"
  11 + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
  12 +