正在显示
76 个修改的文件
包含
2313 行增加
和
167 行删除
.idea/runConfigurations.xml
已删除
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
2 | -<project version="4"> | ||
3 | - <component name="RunConfigurationProducerService"> | ||
4 | - <option name="ignoredProducers"> | ||
5 | - <set> | ||
6 | - <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" /> | ||
7 | - </set> | ||
8 | - </option> | ||
9 | - </component> | ||
10 | -</project> |
@@ -73,7 +73,15 @@ | @@ -73,7 +73,15 @@ | ||
73 | <activity android:name=".ui.home.activity.TextCourseActivity" /> | 73 | <activity android:name=".ui.home.activity.TextCourseActivity" /> |
74 | <activity android:name=".ui.home.activity.TextDetailActivity" /> | 74 | <activity android:name=".ui.home.activity.TextDetailActivity" /> |
75 | <activity android:name=".ui.home.activity.OnlineActivity" /> | 75 | <activity android:name=".ui.home.activity.OnlineActivity" /> |
76 | - <activity android:name=".ui.home.activity.OnlineDetailActivity"/> | 76 | + <activity android:name=".ui.home.activity.OnlineDetailActivity" |
77 | + android:configChanges="orientation|keyboardHidden|screenSize"/> | ||
78 | + <activity android:name=".ui.home.activity.LiveCourseActivity"/> | ||
79 | + <activity android:name=".ui.mine.activity.EditPersonalInfoActivity"/> | ||
80 | + <activity android:name=".ui.mine.activity.ChangePwdActivity"/> | ||
81 | + <activity android:name=".ui.mine.activity.ChangePhoneActivity"/> | ||
82 | + <activity android:name=".ui.mine.activity.MyErrorQuestionActivity"/> | ||
83 | + <activity android:name=".ui.mine.activity.QuestionRecordActivity"/> | ||
84 | + <activity android:name=".ui.mine.activity.MyCredentialsActivity"/> | ||
77 | 85 | ||
78 | 86 | ||
79 | </application> | 87 | </application> |
@@ -42,6 +42,9 @@ abstract class BaseActivity : AppCompatActivity() { | @@ -42,6 +42,9 @@ abstract class BaseActivity : AppCompatActivity() { | ||
42 | } | 42 | } |
43 | 43 | ||
44 | override fun onCreate(savedInstanceState: Bundle?) { | 44 | override fun onCreate(savedInstanceState: Bundle?) { |
45 | + ImmersionBar.with(this).transparentStatusBar().statusBarDarkFont(true).init() | ||
46 | +// .transparentNavigationBar() //透明导航栏,不写默认黑色(设置此方法,fullScreen()方法自动为true) | ||
47 | +// .transparentBar().navigationBarDarkIcon(true) | ||
45 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | 48 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { |
46 | val modes = window.windowManager.defaultDisplay.supportedModes | 49 | val modes = window.windowManager.defaultDisplay.supportedModes |
47 | modes.sortBy { | 50 | modes.sortBy { |
@@ -64,9 +67,7 @@ abstract class BaseActivity : AppCompatActivity() { | @@ -64,9 +67,7 @@ abstract class BaseActivity : AppCompatActivity() { | ||
64 | } | 67 | } |
65 | // EventBus.getDefault().register(this) | 68 | // EventBus.getDefault().register(this) |
66 | 69 | ||
67 | - ImmersionBar.with(this).transparentStatusBar().statusBarDarkFont(false).init() | ||
68 | -// .transparentNavigationBar() //透明导航栏,不写默认黑色(设置此方法,fullScreen()方法自动为true) | ||
69 | -// .transparentBar().navigationBarDarkIcon(true) | 70 | + |
70 | } | 71 | } |
71 | 72 | ||
72 | @RequiresApi(Build.VERSION_CODES.M) | 73 | @RequiresApi(Build.VERSION_CODES.M) |
app/src/main/java/com/br_technology/securitytrain_master/ui/home/activity/LiveCourseActivity.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.home.activity | ||
2 | + | ||
3 | +import android.view.View | ||
4 | +import androidx.core.content.ContextCompat | ||
5 | +import androidx.fragment.app.FragmentPagerAdapter | ||
6 | +import com.br_technology.securitytrain_master.R | ||
7 | +import com.br_technology.securitytrain_master.databinding.ActivityLiveCourseBinding | ||
8 | +import com.br_technology.securitytrain_master.ui.home.adapter.ResultPagerAdapter | ||
9 | +import com.br_technology.securitytrain_master.ui.home.fragment.CourseListFragment | ||
10 | +import com.br_technology.securitytrain_master.ui.home.fragment.OnLiveCourseFragment | ||
11 | +import com.br_technology.securitytrain_master.ui.home.fragment.OnlineDetailFragment | ||
12 | +import com.br_technology.securitytrain_master.ui.home.viewmodel.LiveCourseViewModel | ||
13 | +import com.br_technology.securitytrain_master.view.ClassifyPop | ||
14 | +import com.br_technology.securitytrain_master.view.listener.ToolBarClickListener | ||
15 | +import com.gyf.immersionbar.ImmersionBar | ||
16 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
17 | + | ||
18 | +/** | ||
19 | + * Time: 7/31/2021 10:43 | ||
20 | + * Author: Captain | ||
21 | + * Description: 初见时你很迷人 | ||
22 | + */ | ||
23 | +class LiveCourseActivity | ||
24 | + : | ||
25 | + BaseLifeCycleActivity<LiveCourseViewModel, ActivityLiveCourseBinding>(ActivityLiveCourseBinding::inflate) { | ||
26 | + | ||
27 | + private val classifyPop by lazy { | ||
28 | + ClassifyPop(this) | ||
29 | + } | ||
30 | + | ||
31 | + override fun initView() { | ||
32 | + super.initView() | ||
33 | + ImmersionBar.with(this@LiveCourseActivity).statusBarDarkFont(true).init(); | ||
34 | + } | ||
35 | + | ||
36 | + override fun initDataObserver() { | ||
37 | + | ||
38 | + } | ||
39 | + | ||
40 | + override fun initData() { | ||
41 | + super.initData() | ||
42 | + binding.apply { | ||
43 | + | ||
44 | + | ||
45 | + toolBar.setRightText("焊工") | ||
46 | + toolBar.setRightTextDrawable( | ||
47 | + ContextCompat.getDrawable( | ||
48 | + baseContext, | ||
49 | + R.mipmap.down_arrow | ||
50 | + ) | ||
51 | + ) | ||
52 | + toolBar.addRightListener(object : ToolBarClickListener { | ||
53 | + override fun onClick(view: View) { | ||
54 | + if (!classifyPop.isShowing) { | ||
55 | + classifyPop.showAsDropDown(view) | ||
56 | + } | ||
57 | + | ||
58 | + } | ||
59 | + }) | ||
60 | + | ||
61 | + val searchResultAdapter = ResultPagerAdapter( | ||
62 | + supportFragmentManager, | ||
63 | + FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT | ||
64 | + ) | ||
65 | + val list = | ||
66 | + listOf(OnLiveCourseFragment(),OnLiveCourseFragment(),OnLiveCourseFragment()) | ||
67 | + val titles = listOf("正在直播", "回放课程", "即将开播") | ||
68 | + searchResultAdapter.addData(list) | ||
69 | + searchResultAdapter.addTitle(titles) | ||
70 | + viewPager.adapter = searchResultAdapter | ||
71 | + tabLayout.setupWithViewPager(viewPager) | ||
72 | + | ||
73 | + } | ||
74 | + } | ||
75 | +} |
1 | package com.br_technology.securitytrain_master.ui.home.activity | 1 | package com.br_technology.securitytrain_master.ui.home.activity |
2 | 2 | ||
3 | -import android.content.pm.ActivityInfo | ||
4 | import android.content.res.Configuration | 3 | import android.content.res.Configuration |
5 | import android.view.View | 4 | import android.view.View |
6 | -import android.view.WindowManager | ||
7 | import androidx.fragment.app.FragmentPagerAdapter | 5 | import androidx.fragment.app.FragmentPagerAdapter |
8 | import com.br_technology.securitytrain_master.databinding.ActivityOnlineDetailBinding | 6 | import com.br_technology.securitytrain_master.databinding.ActivityOnlineDetailBinding |
9 | import com.br_technology.securitytrain_master.ui.home.adapter.ResultPagerAdapter | 7 | import com.br_technology.securitytrain_master.ui.home.adapter.ResultPagerAdapter |
@@ -11,11 +9,8 @@ import com.br_technology.securitytrain_master.ui.home.fragment.CourseListFragmen | @@ -11,11 +9,8 @@ import com.br_technology.securitytrain_master.ui.home.fragment.CourseListFragmen | ||
11 | import com.br_technology.securitytrain_master.ui.home.fragment.OnlineDetailFragment | 9 | import com.br_technology.securitytrain_master.ui.home.fragment.OnlineDetailFragment |
12 | import com.br_technology.securitytrain_master.ui.home.viewmodel.OnlineDetailViewModel | 10 | import com.br_technology.securitytrain_master.ui.home.viewmodel.OnlineDetailViewModel |
13 | import com.shuyu.gsyvideoplayer.GSYVideoManager | 11 | import com.shuyu.gsyvideoplayer.GSYVideoManager |
14 | -import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder | ||
15 | -import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack | ||
16 | -import com.shuyu.gsyvideoplayer.listener.LockClickListener | ||
17 | -import com.shuyu.gsyvideoplayer.utils.Debuger | ||
18 | import com.shuyu.gsyvideoplayer.utils.OrientationUtils | 12 | import com.shuyu.gsyvideoplayer.utils.OrientationUtils |
13 | +import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer | ||
19 | import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | 14 | import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity |
20 | 15 | ||
21 | 16 | ||
@@ -35,6 +30,7 @@ class OnlineDetailActivity | @@ -35,6 +30,7 @@ class OnlineDetailActivity | ||
35 | } | 30 | } |
36 | 31 | ||
37 | var isPlay : Boolean = false | 32 | var isPlay : Boolean = false |
33 | + var isPause : Boolean = false | ||
38 | 34 | ||
39 | override fun initData() { | 35 | override fun initData() { |
40 | super.initData() | 36 | super.initData() |
@@ -54,137 +50,61 @@ class OnlineDetailActivity | @@ -54,137 +50,61 @@ class OnlineDetailActivity | ||
54 | tabLayout.setupWithViewPager(viewPager) | 50 | tabLayout.setupWithViewPager(viewPager) |
55 | 51 | ||
56 | 52 | ||
57 | -// val source1 = | ||
58 | -// "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4" | ||
59 | -// videoPlayer.setUp(source1, true, "测试视频") | ||
60 | - | ||
61 | - //增加封面 | ||
62 | - | ||
63 | - | ||
64 | - //增加title | ||
65 | -// videoPlayer.titleTextView.visibility = View.VISIBLE | ||
66 | -// //设置返回键 | ||
67 | -// videoPlayer.backButton.visibility = View.VISIBLE | ||
68 | - //设置旋转 | ||
69 | - orientationUtils = OrientationUtils(this@OnlineDetailActivity, videoPlayer) | ||
70 | - | ||
71 | - val gsyVideoOption = GSYVideoOptionBuilder() | ||
72 | - gsyVideoOption | ||
73 | - .setIsTouchWiget(true) | ||
74 | - .setRotateViewAuto(false) | ||
75 | - .setLockLand(false) | ||
76 | - .setAutoFullWithSize(true) | ||
77 | - .setShowFullAnimation(false) | ||
78 | - .setNeedLockFull(true) | ||
79 | - .setUrl("http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4") | ||
80 | - .setCacheWithPlay(false) | ||
81 | - .setVideoTitle("测试视频") | ||
82 | - .setVideoAllCallBack(object : GSYSampleCallBack() { | ||
83 | - override fun onPrepared(url: String?, vararg objects: Any?) { | ||
84 | - super.onPrepared(url, *objects) | ||
85 | - //开始播放了才能旋转和全屏 | ||
86 | - orientationUtils!!.setEnable(true); | ||
87 | - isPlay = true; | ||
88 | - } | ||
89 | - | ||
90 | - override fun onQuitFullscreen(url: String?, vararg objects: Any?) { | ||
91 | - super.onQuitFullscreen(url, *objects) | ||
92 | - | ||
93 | - Debuger.printfError("***** onQuitFullscreen **** " + objects[0]);//title | ||
94 | - Debuger.printfError("***** onQuitFullscreen **** " + objects[1]);//当前非全屏player | ||
95 | - if (orientationUtils != null) { | ||
96 | - orientationUtils!!.backToProtVideo(); | ||
97 | - } | ||
98 | - } | ||
99 | - | ||
100 | - | ||
101 | - }).setLockClickListener(object : LockClickListener { | ||
102 | - override fun onClick(view: View?, lock: Boolean) { | ||
103 | - if (orientationUtils != null) { | ||
104 | - //配合下方的onConfigurationChanged | ||
105 | - orientationUtils!!.setEnable(!lock); | ||
106 | - } | ||
107 | - } | ||
108 | - | ||
109 | - }).build(videoPlayer) | ||
110 | - | ||
111 | - videoPlayer.fullscreenButton.setOnClickListener { //直接横屏 | ||
112 | - toolBar.visibility = View.GONE | ||
113 | - | ||
114 | -// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); | 53 | + initOrientationUtils(videoPlayer, false) |
54 | + val source1 = | ||
55 | + "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4" | ||
56 | + videoPlayer.setUp(source1, true, "测试视频") | ||
57 | + videoPlayer.backButton.visibility = View.GONE | ||
58 | + videoPlayer.startButton.setOnClickListener({ | ||
59 | + videoPlayer.startPlayLogic() | ||
60 | + }) | ||
115 | 61 | ||
62 | + videoPlayer.fullscreenButton.setOnClickListener { | ||
116 | orientationUtils!!.resolveByClick() | 63 | orientationUtils!!.resolveByClick() |
117 | - | ||
118 | - //第一个true是否需要隐藏actionbar,第二个true是否需要隐藏statusbar | ||
119 | - videoPlayer.startWindowFullscreen(this@OnlineDetailActivity, false, false) | ||
120 | - | 64 | + videoPlayer.startWindowFullscreen(this@OnlineDetailActivity,true,true) |
121 | } | 65 | } |
122 | 66 | ||
67 | + } | ||
123 | 68 | ||
124 | - //设置全屏按键功能,这是使用的是选择屏幕,而不是全屏 | 69 | + } |
125 | 70 | ||
126 | -// videoPlayer.fullscreenButton.setOnClickListener({ | ||
127 | -//// orientationUtils!!.resolveByClick() | ||
128 | -// | ||
129 | -// videoPlayer.startWindowFullscreen(this@OnlineDetailActivity, true, true); | ||
130 | -// }) | 71 | + private fun initOrientationUtils(videoPlayer: StandardGSYVideoPlayer, full: Boolean) { |
72 | + orientationUtils = OrientationUtils(this, videoPlayer) | ||
73 | + //是否需要跟随系统旋转设置 | ||
74 | + //orientationUtils.setRotateWithSystem(false); | ||
75 | + orientationUtils!!.isLand = if (full) 1 else 0 | ||
76 | + } | ||
131 | 77 | ||
132 | - //是否可以滑动调整 | ||
133 | - videoPlayer.setIsTouchWiget(true) | ||
134 | - //设置返回按键功能 | ||
135 | - videoPlayer.backButton.visibility = View.GONE | ||
136 | - videoPlayer.startButton.setOnClickListener({ | ||
137 | - videoPlayer.startPlayLogic() | ||
138 | - }) | ||
139 | - } | 78 | + override fun onPause() { |
79 | + super.onPause() | ||
80 | + binding.videoPlayer.onVideoPause() | ||
81 | + } | ||
140 | 82 | ||
83 | + override fun onResume() { | ||
84 | + super.onResume() | ||
85 | + binding.videoPlayer.onVideoResume() | ||
141 | } | 86 | } |
142 | 87 | ||
143 | override fun onDestroy() { | 88 | override fun onDestroy() { |
144 | - super.onDestroy() | ||
145 | GSYVideoManager.releaseAllVideos(); | 89 | GSYVideoManager.releaseAllVideos(); |
146 | if (orientationUtils != null) | 90 | if (orientationUtils != null) |
147 | orientationUtils!!.releaseListener(); | 91 | orientationUtils!!.releaseListener(); |
148 | - } | 92 | + super.onDestroy() |
149 | 93 | ||
150 | -// override fun getGSYVideoPlayer(): StandardGSYVideoPlayer { | ||
151 | -// return binding.videoPlayer | ||
152 | -// } | ||
153 | -// | ||
154 | -// override fun getGSYVideoOptionBuilder(): GSYVideoOptionBuilder { | ||
155 | -////内置封面可参考SampleCoverVideo | ||
156 | -// //内置封面可参考SampleCoverVideo | ||
157 | -// val imageView = ImageView(this) | ||
158 | -//// loadCover(imageView, url) | ||
159 | -// return GSYVideoOptionBuilder() | ||
160 | -// .setThumbImageView(imageView) | ||
161 | -// .setUrl("https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4") | ||
162 | -// .setCacheWithPlay(true) | ||
163 | -// .setVideoTitle(" ") | ||
164 | -// .setIsTouchWiget(true) | ||
165 | -// .setRotateViewAuto(false) | ||
166 | -// .setLockLand(false) | ||
167 | -// .setShowFullAnimation(false) | ||
168 | -// .setNeedLockFull(true) | ||
169 | -// .setSeekRatio(1f) | ||
170 | -// } | ||
171 | -// | ||
172 | -// override fun clickForFullScreen() { | ||
173 | -// | ||
174 | -// } | ||
175 | -// | ||
176 | -// override fun getDetailOrientationRotateAuto(): Boolean { | ||
177 | -// return false | ||
178 | -// } | 94 | + } |
179 | 95 | ||
180 | override fun onConfigurationChanged(newConfig: Configuration) { | 96 | override fun onConfigurationChanged(newConfig: Configuration) { |
181 | super.onConfigurationChanged(newConfig) | 97 | super.onConfigurationChanged(newConfig) |
182 | - // 横屏 | ||
183 | - if (newConfig.orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { | ||
184 | - binding.toolBar.visibility=View.GONE | ||
185 | - }else{ | ||
186 | - binding.toolBar.visibility=View.VISIBLE | ||
187 | - } | 98 | + //如果旋转了就全屏 |
99 | +// if (isPlay && !isPause) { | ||
100 | + binding.videoPlayer.onConfigurationChanged( | ||
101 | + this, | ||
102 | + newConfig, | ||
103 | + orientationUtils, | ||
104 | + true, | ||
105 | + true | ||
106 | + ); | ||
107 | +// } | ||
188 | 108 | ||
189 | } | 109 | } |
190 | } | 110 | } |
@@ -13,10 +13,7 @@ import androidx.recyclerview.widget.RecyclerView | @@ -13,10 +13,7 @@ import androidx.recyclerview.widget.RecyclerView | ||
13 | import com.br_technology.securitytrain_master.R | 13 | import com.br_technology.securitytrain_master.R |
14 | import com.br_technology.securitytrain_master.databinding.FragmentHomeBinding | 14 | import com.br_technology.securitytrain_master.databinding.FragmentHomeBinding |
15 | import com.br_technology.securitytrain_master.expand.addItemDecoration2 | 15 | import com.br_technology.securitytrain_master.expand.addItemDecoration2 |
16 | -import com.br_technology.securitytrain_master.ui.home.activity.DatabaseActivity | ||
17 | -import com.br_technology.securitytrain_master.ui.home.activity.OnlineActivity | ||
18 | -import com.br_technology.securitytrain_master.ui.home.activity.SearchActivity | ||
19 | -import com.br_technology.securitytrain_master.ui.home.activity.TextCourseActivity | 16 | +import com.br_technology.securitytrain_master.ui.home.activity.* |
20 | import com.br_technology.securitytrain_master.ui.home.adapter.RecommendDataAdapter | 17 | import com.br_technology.securitytrain_master.ui.home.adapter.RecommendDataAdapter |
21 | import com.br_technology.securitytrain_master.ui.home.adapter.VideoCourseAdapter | 18 | import com.br_technology.securitytrain_master.ui.home.adapter.VideoCourseAdapter |
22 | import com.br_technology.securitytrain_master.ui.home.pojo.RecommendData | 19 | import com.br_technology.securitytrain_master.ui.home.pojo.RecommendData |
@@ -90,6 +87,11 @@ class HomeFragment : | @@ -90,6 +87,11 @@ class HomeFragment : | ||
90 | startActivity(OnlineActivity::class.java) | 87 | startActivity(OnlineActivity::class.java) |
91 | } | 88 | } |
92 | 89 | ||
90 | + // 在线课程 | ||
91 | + liveCourse.setOnClickListener { | ||
92 | + startActivity(LiveCourseActivity::class.java) | ||
93 | + } | ||
94 | + | ||
93 | // 视频课程 | 95 | // 视频课程 |
94 | videoCourse.addItemDecoration2(2,15) | 96 | videoCourse.addItemDecoration2(2,15) |
95 | val videoCourseAdapter = VideoCourseAdapter() | 97 | val videoCourseAdapter = VideoCourseAdapter() |
app/src/main/java/com/br_technology/securitytrain_master/ui/home/fragment/OnLiveCourseFragment.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.home.fragment | ||
2 | + | ||
3 | +import android.view.View | ||
4 | +import androidx.core.content.ContextCompat | ||
5 | +import com.br_technology.securitytrain_master.R | ||
6 | +import com.br_technology.securitytrain_master.databinding.FragmentOnliveCourseBinding | ||
7 | +import com.br_technology.securitytrain_master.expand.addItemDecoration2 | ||
8 | +import com.br_technology.securitytrain_master.ui.home.activity.OnlineDetailActivity | ||
9 | +import com.br_technology.securitytrain_master.ui.home.adapter.VideoCourseAdapter | ||
10 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
11 | +import com.br_technology.securitytrain_master.ui.home.viewmodel.OnLiveCourseFragmentViewModel | ||
12 | +import com.br_technology.securitytrain_master.view.listener.OnItemClickListener | ||
13 | +import com.br_technology.securitytrain_master.view.listener.ToolBarClickListener | ||
14 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment | ||
15 | + | ||
16 | +/** | ||
17 | + * Time: 7/31/2021 10:58 | ||
18 | + * Author: Captain | ||
19 | + * Description: 初见时你很迷人 | ||
20 | + */ | ||
21 | +class OnLiveCourseFragment | ||
22 | + : BaseLifeCycleFragment<OnLiveCourseFragmentViewModel,FragmentOnliveCourseBinding>(FragmentOnliveCourseBinding :: inflate){ | ||
23 | + override fun initDataObserver() { | ||
24 | + | ||
25 | + } | ||
26 | + | ||
27 | + override fun initData() { | ||
28 | + super.initData() | ||
29 | + binding.apply { | ||
30 | + | ||
31 | + onlineRecycler.addItemDecoration2(2, 15) | ||
32 | + val videoCourseAdapter = VideoCourseAdapter() | ||
33 | + val list = mutableListOf( | ||
34 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
35 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
36 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
37 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
38 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
39 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
40 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
41 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
42 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
43 | + VideoCourse(R.mipmap.banner, "10课时", "自动化制作课程", "", "张钧-三岗职位培训班"), | ||
44 | + ) | ||
45 | + onlineRecycler.adapter = videoCourseAdapter | ||
46 | + videoCourseAdapter.addList(list) | ||
47 | + | ||
48 | + videoCourseAdapter.addListener(object : OnItemClickListener<VideoCourse> { | ||
49 | + override fun onClick(position: Int, data: VideoCourse) { | ||
50 | + startActivity(OnlineDetailActivity :: class.java) | ||
51 | + } | ||
52 | + | ||
53 | + }) | ||
54 | + | ||
55 | + } | ||
56 | + } | ||
57 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/home/repository/LiveCourseRepository.kt
0 → 100644
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 | + * Time: 7/31/2021 10:43 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class LiveCourseRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
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 | + * Time: 7/31/2021 10:58 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class OnLiveCourseFragmentRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/home/viewmodel/LiveCourseViewModel.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.home.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.home.repository.LiveCourseRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 10:44 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class LiveCourseViewModel : BaseViewModel<LiveCourseRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.home.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.home.repository.OnLiveCourseFragmentRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 11:00 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class OnLiveCourseFragmentViewModel : BaseViewModel<OnLiveCourseFragmentRepository>() { | ||
12 | +} |
@@ -6,7 +6,7 @@ import androidx.fragment.app.FragmentPagerAdapter | @@ -6,7 +6,7 @@ import androidx.fragment.app.FragmentPagerAdapter | ||
6 | import com.br_technology.securitytrain_master.databinding.ActivityMainBinding | 6 | import com.br_technology.securitytrain_master.databinding.ActivityMainBinding |
7 | import com.br_technology.securitytrain_master.ui.bank.fragment.BankFragment | 7 | import com.br_technology.securitytrain_master.ui.bank.fragment.BankFragment |
8 | import com.br_technology.securitytrain_master.ui.home.fragment.HomeFragment | 8 | import com.br_technology.securitytrain_master.ui.home.fragment.HomeFragment |
9 | -import com.br_technology.securitytrain_master.ui.home.MineFragment | 9 | +import com.br_technology.securitytrain_master.ui.mine.fragment.MineFragment |
10 | import com.br_technology.securitytrain_master.ui.main.viewmodel.MainViewModel | 10 | import com.br_technology.securitytrain_master.ui.main.viewmodel.MainViewModel |
11 | import com.gyf.immersionbar.ImmersionBar | 11 | import com.gyf.immersionbar.ImmersionBar |
12 | import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | 12 | import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity |
@@ -17,7 +17,7 @@ class MainActivity : | @@ -17,7 +17,7 @@ class MainActivity : | ||
17 | // private lateinit var mainAdapter: MainAdapter | 17 | // private lateinit var mainAdapter: MainAdapter |
18 | override fun onCreate(savedInstanceState: Bundle?) { | 18 | override fun onCreate(savedInstanceState: Bundle?) { |
19 | super.onCreate(savedInstanceState) | 19 | super.onCreate(savedInstanceState) |
20 | - | 20 | + ImmersionBar.with(this@MainActivity).statusBarDarkFont(false).init(); |
21 | val list = listOf(HomeFragment(), BankFragment(), MineFragment()) | 21 | val list = listOf(HomeFragment(), BankFragment(), MineFragment()) |
22 | 22 | ||
23 | // 初始化适配器 | 23 | // 初始化适配器 |
@@ -4,7 +4,7 @@ import androidx.fragment.app.Fragment | @@ -4,7 +4,7 @@ import androidx.fragment.app.Fragment | ||
4 | import androidx.lifecycle.MutableLiveData | 4 | import androidx.lifecycle.MutableLiveData |
5 | import com.br_technology.securitytrain_master.ui.bank.fragment.BankFragment | 5 | import com.br_technology.securitytrain_master.ui.bank.fragment.BankFragment |
6 | import com.br_technology.securitytrain_master.ui.home.fragment.HomeFragment | 6 | import com.br_technology.securitytrain_master.ui.home.fragment.HomeFragment |
7 | -import com.br_technology.securitytrain_master.ui.home.MineFragment | 7 | +import com.br_technology.securitytrain_master.ui.mine.fragment.MineFragment |
8 | import com.br_technology.securitytrain_master.ui.main.repository.MainRepository | 8 | import com.br_technology.securitytrain_master.ui.main.repository.MainRepository |
9 | import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | 9 | import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel |
10 | 10 | ||
@@ -18,7 +18,7 @@ class MainViewModel:BaseViewModel<MainRepository>() { | @@ -18,7 +18,7 @@ class MainViewModel:BaseViewModel<MainRepository>() { | ||
18 | MutableLiveData() | 18 | MutableLiveData() |
19 | } | 19 | } |
20 | init { | 20 | init { |
21 | - val list= listOf(HomeFragment(), BankFragment(),MineFragment()) | 21 | + val list= listOf(HomeFragment(), BankFragment(), MineFragment()) |
22 | liveData.postValue(list as List<Fragment>?) | 22 | liveData.postValue(list as List<Fragment>?) |
23 | } | 23 | } |
24 | 24 |
1 | -package com.br_technology.securitytrain_master.ui.home | ||
2 | - | ||
3 | -import android.app.Fragment | ||
4 | -import com.br_technology.securitytrain_master.R | ||
5 | -import com.br_technology.securitytrain_master.databinding.FragmentMineBinding | ||
6 | -import com.br_technology.securitytrain_master.ui.home.viewmodel.MineViewModel | ||
7 | -import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment | ||
8 | - | ||
9 | -/** | ||
10 | - * createTime:2021/7/27 15:47 | ||
11 | - * auth:张继 | ||
12 | - * des: | ||
13 | - */ | ||
14 | -class MineFragment :BaseLifeCycleFragment<MineViewModel,FragmentMineBinding>(FragmentMineBinding::inflate) { | ||
15 | - override fun initDataObserver() { | ||
16 | - | ||
17 | - } | ||
18 | - | ||
19 | -} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/activity/ChangePhoneActivity.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.activity | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.databinding.ActivityChangePhoneBinding | ||
4 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.ChangePhoneViewModel | ||
5 | +import com.gyf.immersionbar.ImmersionBar | ||
6 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
7 | + | ||
8 | +/** | ||
9 | + * Time: 7/31/2021 15:31 | ||
10 | + * Author: Captain | ||
11 | + * Description: 初见时你很迷人 | ||
12 | + */ | ||
13 | +class ChangePhoneActivity : | ||
14 | + BaseLifeCycleActivity<ChangePhoneViewModel, ActivityChangePhoneBinding>( | ||
15 | + ActivityChangePhoneBinding::inflate | ||
16 | + ) { | ||
17 | + override fun initDataObserver() { | ||
18 | + | ||
19 | + } | ||
20 | + | ||
21 | + override fun initView() { | ||
22 | + super.initView() | ||
23 | + ImmersionBar.with(this@ChangePhoneActivity).statusBarDarkFont(true).init(); | ||
24 | + } | ||
25 | + | ||
26 | + override fun initData() { | ||
27 | + super.initData() | ||
28 | + } | ||
29 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/activity/ChangePwdActivity.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.activity | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.databinding.ActivityChangePwdBinding | ||
4 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.ChangePwdViewModel | ||
5 | +import com.gyf.immersionbar.ImmersionBar | ||
6 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
7 | + | ||
8 | +/** | ||
9 | + * Time: 7/31/2021 15:04 | ||
10 | + * Author: Captain | ||
11 | + * Description: 初见时你很迷人 | ||
12 | + */ | ||
13 | +class ChangePwdActivity : | ||
14 | + BaseLifeCycleActivity<ChangePwdViewModel, ActivityChangePwdBinding>(ActivityChangePwdBinding::inflate) { | ||
15 | + override fun initDataObserver() { | ||
16 | + | ||
17 | + } | ||
18 | + | ||
19 | + override fun initView() { | ||
20 | + super.initView() | ||
21 | + ImmersionBar.with(this@ChangePwdActivity).statusBarDarkFont(true).init(); | ||
22 | + } | ||
23 | + | ||
24 | + override fun initData() { | ||
25 | + super.initData() | ||
26 | + | ||
27 | + } | ||
28 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.activity | ||
2 | + | ||
3 | +import android.view.View | ||
4 | +import com.br_technology.securitytrain_master.R | ||
5 | +import com.br_technology.securitytrain_master.databinding.ActivityEditPersonalInfoBinding | ||
6 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.EditPersonalInfoViewModel | ||
7 | +import com.gyf.immersionbar.ImmersionBar | ||
8 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
9 | + | ||
10 | +/** | ||
11 | + * Time: 7/31/2021 14:32 | ||
12 | + * Author: Captain | ||
13 | + * Description: 初见时你很迷人 | ||
14 | + */ | ||
15 | +class EditPersonalInfoActivity : | ||
16 | + BaseLifeCycleActivity<EditPersonalInfoViewModel, ActivityEditPersonalInfoBinding>( | ||
17 | + ActivityEditPersonalInfoBinding::inflate | ||
18 | + ), View.OnClickListener { | ||
19 | + override fun initDataObserver() { | ||
20 | + | ||
21 | + } | ||
22 | + | ||
23 | + override fun initView() { | ||
24 | + ImmersionBar.with(this@EditPersonalInfoActivity).statusBarDarkFont(true).init(); | ||
25 | + super.initView() | ||
26 | + } | ||
27 | + | ||
28 | + override fun initData() { | ||
29 | + super.initData() | ||
30 | + ImmersionBar.with(this@EditPersonalInfoActivity).statusBarDarkFont(true).init(); | ||
31 | + binding.apply { | ||
32 | + llChangePwd.setOnClickListener(this@EditPersonalInfoActivity) | ||
33 | + llChangePhone.setOnClickListener(this@EditPersonalInfoActivity) | ||
34 | + } | ||
35 | + } | ||
36 | + | ||
37 | + override fun onClick(v: View?) { | ||
38 | + when(v!!.id){ | ||
39 | + R.id.ll_change_pwd ->{ | ||
40 | + //修改密码 | ||
41 | + startActivity(ChangePwdActivity :: class.java) | ||
42 | + } | ||
43 | + R.id.ll_change_phone ->{ | ||
44 | + //修改手机号 | ||
45 | + startActivity(ChangePhoneActivity :: class.java) | ||
46 | + } | ||
47 | + } | ||
48 | + } | ||
49 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/activity/MyCredentialsActivity.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.activity | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.databinding.ActivityMyCredentialsBinding | ||
4 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.MyCredentialsViewModel | ||
5 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
6 | + | ||
7 | +/** | ||
8 | + * Time: 7/31/2021 17:48 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + * 我的证书 | ||
12 | + */ | ||
13 | +class MyCredentialsActivity : | ||
14 | + BaseLifeCycleActivity<MyCredentialsViewModel, ActivityMyCredentialsBinding>( | ||
15 | + ActivityMyCredentialsBinding::inflate | ||
16 | + ) { | ||
17 | + override fun initDataObserver() { | ||
18 | + | ||
19 | + } | ||
20 | + | ||
21 | + override fun initData() { | ||
22 | + super.initData() | ||
23 | + | ||
24 | + } | ||
25 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/activity/MyErrorQuestionActivity.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.activity | ||
2 | + | ||
3 | +import androidx.fragment.app.FragmentPagerAdapter | ||
4 | +import com.br_technology.securitytrain_master.databinding.ActivityMyErrorQuestionBinding | ||
5 | +import com.br_technology.securitytrain_master.ui.home.adapter.ResultPagerAdapter | ||
6 | +import com.br_technology.securitytrain_master.ui.home.fragment.OnLiveCourseFragment | ||
7 | +import com.br_technology.securitytrain_master.ui.mine.fragment.MyErrorQuestionFragment | ||
8 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.MyErrorQuestionViewModel | ||
9 | +import com.gyf.immersionbar.ImmersionBar | ||
10 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
11 | + | ||
12 | +/** | ||
13 | + * 我的错题 | ||
14 | + * Time: 7/31/2021 15:37 | ||
15 | + * Author: Captain | ||
16 | + * Description: 初见时你很迷人 | ||
17 | + */ | ||
18 | +class MyErrorQuestionActivity : | ||
19 | + BaseLifeCycleActivity<MyErrorQuestionViewModel, ActivityMyErrorQuestionBinding>( | ||
20 | + ActivityMyErrorQuestionBinding::inflate | ||
21 | + ) { | ||
22 | + override fun initDataObserver() { | ||
23 | + | ||
24 | + } | ||
25 | + | ||
26 | + override fun initView() { | ||
27 | + super.initView() | ||
28 | + ImmersionBar.with(this@MyErrorQuestionActivity).statusBarDarkFont(true).init(); | ||
29 | + } | ||
30 | + | ||
31 | + override fun initData() { | ||
32 | + super.initData() | ||
33 | + binding.apply { | ||
34 | + val searchResultAdapter = ResultPagerAdapter( | ||
35 | + supportFragmentManager, | ||
36 | + FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT | ||
37 | + ) | ||
38 | + val list = | ||
39 | + listOf(MyErrorQuestionFragment(), MyErrorQuestionFragment(), MyErrorQuestionFragment()) | ||
40 | + val titles = listOf("单选题", "判断题", "多选题") | ||
41 | + searchResultAdapter.addData(list) | ||
42 | + searchResultAdapter.addTitle(titles) | ||
43 | + viewPager.adapter = searchResultAdapter | ||
44 | + tabLayout.setupWithViewPager(viewPager) | ||
45 | + } | ||
46 | + } | ||
47 | + | ||
48 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/activity/QuestionRecordActivity.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.activity | ||
2 | + | ||
3 | +import androidx.fragment.app.FragmentPagerAdapter | ||
4 | +import com.br_technology.securitytrain_master.databinding.ActivityQuestionRecordBinding | ||
5 | +import com.br_technology.securitytrain_master.ui.home.adapter.ResultPagerAdapter | ||
6 | +import com.br_technology.securitytrain_master.ui.mine.fragment.MockExaminationFragment | ||
7 | +import com.br_technology.securitytrain_master.ui.mine.fragment.MyErrorQuestionFragment | ||
8 | +import com.br_technology.securitytrain_master.ui.mine.fragment.SpecialExercisesFragment | ||
9 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.QuestionRecordViewModel | ||
10 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity | ||
11 | + | ||
12 | +/** | ||
13 | + * Time: 7/31/2021 16:44 | ||
14 | + * Author: Captain | ||
15 | + * Description: 初见时你很迷人 | ||
16 | + */ | ||
17 | +class QuestionRecordActivity : | ||
18 | + BaseLifeCycleActivity<QuestionRecordViewModel, ActivityQuestionRecordBinding>( | ||
19 | + ActivityQuestionRecordBinding::inflate | ||
20 | + ) { | ||
21 | + override fun initDataObserver() { | ||
22 | + | ||
23 | + } | ||
24 | + | ||
25 | + override fun initData() { | ||
26 | + super.initData() | ||
27 | + binding.apply { | ||
28 | + val searchResultAdapter = ResultPagerAdapter( | ||
29 | + supportFragmentManager, | ||
30 | + FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT | ||
31 | + ) | ||
32 | + val list = | ||
33 | + listOf(SpecialExercisesFragment(), MockExaminationFragment()) | ||
34 | + val titles = listOf("专项练习", "模拟考试") | ||
35 | + searchResultAdapter.addData(list) | ||
36 | + searchResultAdapter.addTitle(titles) | ||
37 | + viewPager.adapter = searchResultAdapter | ||
38 | + tabLayout.setupWithViewPager(viewPager) | ||
39 | + } | ||
40 | + } | ||
41 | + | ||
42 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/adapter/MockExaminationAdapter.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.adapter | ||
2 | + | ||
3 | +import android.content.Context | ||
4 | +import android.view.LayoutInflater | ||
5 | +import android.view.ViewGroup | ||
6 | +import com.br_technology.securitytrain_master.base.view.BaseAdapter | ||
7 | +import com.br_technology.securitytrain_master.databinding.ItemMockExamnationBinding | ||
8 | +import com.br_technology.securitytrain_master.databinding.ItemMyErrorQuestionBinding | ||
9 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
10 | + | ||
11 | +/** | ||
12 | + * Time: 7/31/2021 17:24 | ||
13 | + * Author: Captain | ||
14 | + * Description: 初见时你很迷人 | ||
15 | + */ | ||
16 | +class MockExaminationAdapter : BaseAdapter<VideoCourse, ItemMockExamnationBinding>() { | ||
17 | + override fun getViewBinding( | ||
18 | + context: Context, | ||
19 | + parent: ViewGroup, | ||
20 | + viewType: Int, | ||
21 | + from: LayoutInflater | ||
22 | + ): ItemMockExamnationBinding { | ||
23 | + return ItemMockExamnationBinding.inflate(from, parent, false) | ||
24 | + } | ||
25 | + | ||
26 | + override fun onBind(holder: ItemMockExamnationBinding, position: Int, data: VideoCourse) { | ||
27 | + // 试题名称 | ||
28 | + holder.tvQuestionTitle.text = data.courseName | ||
29 | + holder.tvCommitTime.text = data.lesson | ||
30 | + holder.tvScore.text = data.head | ||
31 | + } | ||
32 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/adapter/MyErrorQuestionAdapter.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.adapter | ||
2 | + | ||
3 | +import android.content.Context | ||
4 | +import android.view.LayoutInflater | ||
5 | +import android.view.ViewGroup | ||
6 | +import com.br_technology.securitytrain_master.base.view.BaseAdapter | ||
7 | +import com.br_technology.securitytrain_master.databinding.ItemMyErrorQuestionBinding | ||
8 | +import com.br_technology.securitytrain_master.databinding.ItemVideoCourseBinding | ||
9 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
10 | + | ||
11 | +/** | ||
12 | + * Time: 7/31/2021 16:08 | ||
13 | + * Author: Captain | ||
14 | + * Description: 初见时你很迷人 | ||
15 | + */ | ||
16 | +class MyErrorQuestionAdapter : BaseAdapter<VideoCourse, ItemMyErrorQuestionBinding>() { | ||
17 | + override fun getViewBinding( | ||
18 | + context: Context, | ||
19 | + parent: ViewGroup, | ||
20 | + viewType: Int, | ||
21 | + from: LayoutInflater | ||
22 | + ): ItemMyErrorQuestionBinding { | ||
23 | + return ItemMyErrorQuestionBinding.inflate(from, parent, false) | ||
24 | + } | ||
25 | + | ||
26 | + override fun onBind(holder: ItemMyErrorQuestionBinding, position: Int, data: VideoCourse) { | ||
27 | + // 错题名称 | ||
28 | + holder.tvQuestionTitle.text = data.courseName | ||
29 | + } | ||
30 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/adapter/SpecialExercisesAdapter.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.adapter | ||
2 | + | ||
3 | +import android.content.Context | ||
4 | +import android.view.LayoutInflater | ||
5 | +import android.view.ViewGroup | ||
6 | +import com.br_technology.securitytrain_master.base.view.BaseAdapter | ||
7 | +import com.br_technology.securitytrain_master.databinding.ItemMyErrorQuestionBinding | ||
8 | +import com.br_technology.securitytrain_master.databinding.ItemSpecialExercisesBinding | ||
9 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
10 | + | ||
11 | +/** | ||
12 | + * Time: 7/31/2021 17:06 | ||
13 | + * Author: Captain | ||
14 | + * Description: 初见时你很迷人 | ||
15 | + */ | ||
16 | +class SpecialExercisesAdapter : BaseAdapter<VideoCourse,ItemSpecialExercisesBinding>() { | ||
17 | + override fun getViewBinding( | ||
18 | + context: Context, | ||
19 | + parent: ViewGroup, | ||
20 | + viewType: Int, | ||
21 | + from: LayoutInflater | ||
22 | + ): ItemSpecialExercisesBinding { | ||
23 | + return ItemSpecialExercisesBinding.inflate(from, parent, false) | ||
24 | + } | ||
25 | + | ||
26 | + override fun onBind(holder: ItemSpecialExercisesBinding, position: Int, data: VideoCourse) { | ||
27 | + // 题名称 | ||
28 | + holder.tvQuestionTitle.text = data.courseName | ||
29 | + } | ||
30 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/fragment/MineFragment.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.fragment | ||
2 | + | ||
3 | +import android.view.View | ||
4 | +import com.br_technology.securitytrain_master.R | ||
5 | +import com.br_technology.securitytrain_master.databinding.FragmentMineBinding | ||
6 | +import com.br_technology.securitytrain_master.ui.home.viewmodel.MineViewModel | ||
7 | +import com.br_technology.securitytrain_master.ui.mine.activity.EditPersonalInfoActivity | ||
8 | +import com.br_technology.securitytrain_master.ui.mine.activity.MyErrorQuestionActivity | ||
9 | +import com.br_technology.securitytrain_master.ui.mine.activity.QuestionRecordActivity | ||
10 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment | ||
11 | + | ||
12 | +/** | ||
13 | + * createTime:2021/7/27 15:47 | ||
14 | + * auth:张继 | ||
15 | + * des: | ||
16 | + */ | ||
17 | +class MineFragment | ||
18 | + :BaseLifeCycleFragment<MineViewModel,FragmentMineBinding>(FragmentMineBinding::inflate), | ||
19 | + View.OnClickListener { | ||
20 | + override fun initDataObserver() { | ||
21 | + | ||
22 | + } | ||
23 | + | ||
24 | + override fun initData() { | ||
25 | + super.initData() | ||
26 | + | ||
27 | + binding.apply { | ||
28 | + ivEditInfo.setOnClickListener(this@MineFragment) | ||
29 | + rlMineCuoti.setOnClickListener(this@MineFragment) | ||
30 | + rlMineDatijilu.setOnClickListener(this@MineFragment) | ||
31 | + mineZhengjian.setOnClickListener(this@MineFragment) | ||
32 | + rlMineShoucang.setOnClickListener(this@MineFragment) | ||
33 | + rlMineLiaotianjilu.setOnClickListener(this@MineFragment) | ||
34 | + rlMineTousuyujianyi.setOnClickListener(this@MineFragment) | ||
35 | + rlMineLianxikefu.setOnClickListener(this@MineFragment) | ||
36 | + } | ||
37 | + } | ||
38 | + | ||
39 | + override fun onClick(v: View?) { | ||
40 | + when(v!!.id){ | ||
41 | + R.id.iv_edit_info ->{ | ||
42 | + //编辑个人信息 | ||
43 | + startActivity(EditPersonalInfoActivity :: class.java) | ||
44 | + } | ||
45 | + | ||
46 | + R.id.rl_mine_cuoti ->{ | ||
47 | + //我的错题 | ||
48 | + startActivity(MyErrorQuestionActivity :: class.java) | ||
49 | + } | ||
50 | + | ||
51 | + R.id.rl_mine_datijilu ->{ | ||
52 | + //答题记录 | ||
53 | + startActivity(QuestionRecordActivity :: class.java) | ||
54 | + } | ||
55 | + | ||
56 | + R.id.mine_zhengjian ->{ | ||
57 | + //我的证件 | ||
58 | + } | ||
59 | + | ||
60 | + R.id.rl_mine_shoucang ->{ | ||
61 | + //我的收藏 | ||
62 | + } | ||
63 | + | ||
64 | + R.id.rl_mine_liaotianjilu ->{ | ||
65 | + //我的聊天记录 | ||
66 | + } | ||
67 | + | ||
68 | + R.id.rl_mine_tousuyujianyi ->{ | ||
69 | + //投诉与建议 | ||
70 | + } | ||
71 | + | ||
72 | + R.id.rl_mine_lianxikefu ->{ | ||
73 | + //联系客服 | ||
74 | + } | ||
75 | + | ||
76 | + | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
80 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/fragment/MockExaminationFragment.kt
0 → 100644
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.FragmentMockExaminationBinding | ||
5 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
6 | +import com.br_technology.securitytrain_master.ui.mine.adapter.MockExaminationAdapter | ||
7 | +import com.br_technology.securitytrain_master.ui.mine.adapter.SpecialExercisesAdapter | ||
8 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.MockExaminationFragmentViewModel | ||
9 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment | ||
10 | + | ||
11 | +/** | ||
12 | + * Time: 7/31/2021 17:21 | ||
13 | + * Author: Captain | ||
14 | + * Description: 初见时你很迷人 | ||
15 | + */ | ||
16 | +class MockExaminationFragment | ||
17 | + : BaseLifeCycleFragment<MockExaminationFragmentViewModel, FragmentMockExaminationBinding>( | ||
18 | + FragmentMockExaminationBinding::inflate | ||
19 | +) { | ||
20 | + override fun initDataObserver() { | ||
21 | + | ||
22 | + } | ||
23 | + | ||
24 | + override fun initData() { | ||
25 | + super.initData() | ||
26 | + binding.apply { | ||
27 | + | ||
28 | + val mockExaminationAdapter = MockExaminationAdapter() | ||
29 | + val list = mutableListOf( | ||
30 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "45分", "张钧-三岗职位培训班"), | ||
31 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "68分", "张钧-三岗职位培训班"), | ||
32 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "100分", "张钧-三岗职位培训班"), | ||
33 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "99分", "张钧-三岗职位培训班"), | ||
34 | + ) | ||
35 | + recyclerview.adapter = mockExaminationAdapter | ||
36 | + mockExaminationAdapter.addList(list) | ||
37 | + } | ||
38 | + } | ||
39 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/fragment/MyErrorQuestionFragment.kt
0 → 100644
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.FragmentMyErrorQuestionBinding | ||
5 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
6 | +import com.br_technology.securitytrain_master.ui.mine.adapter.MyErrorQuestionAdapter | ||
7 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.MyErrorQuestionFragmentViewModel | ||
8 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment | ||
9 | + | ||
10 | +/** | ||
11 | + * Time: 7/31/2021 15:47 | ||
12 | + * Author: Captain | ||
13 | + * Description: 初见时你很迷人 | ||
14 | + */ | ||
15 | +class MyErrorQuestionFragment : | ||
16 | + BaseLifeCycleFragment<MyErrorQuestionFragmentViewModel, FragmentMyErrorQuestionBinding>( | ||
17 | + FragmentMyErrorQuestionBinding::inflate | ||
18 | + ) { | ||
19 | + override fun initDataObserver() { | ||
20 | + | ||
21 | + } | ||
22 | + | ||
23 | + override fun initData() { | ||
24 | + super.initData() | ||
25 | + binding.apply { | ||
26 | + | ||
27 | + val myErrorQuestionAdapter = MyErrorQuestionAdapter() | ||
28 | + val list = mutableListOf( | ||
29 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
30 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
31 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
32 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
33 | + ) | ||
34 | + recyclerview.adapter = myErrorQuestionAdapter | ||
35 | + myErrorQuestionAdapter.addList(list) | ||
36 | + } | ||
37 | + } | ||
38 | +} |
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.FragmentSpecialExercisesBinding | ||
5 | +import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse | ||
6 | +import com.br_technology.securitytrain_master.ui.mine.adapter.MyErrorQuestionAdapter | ||
7 | +import com.br_technology.securitytrain_master.ui.mine.adapter.SpecialExercisesAdapter | ||
8 | +import com.br_technology.securitytrain_master.ui.mine.viewmodel.SpecialExercisesFragmentViewModel | ||
9 | +import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment | ||
10 | + | ||
11 | +/** | ||
12 | + * Time: 7/31/2021 17:02 | ||
13 | + * Author: Captain | ||
14 | + * Description: 初见时你很迷人 | ||
15 | + * 专项练习 | ||
16 | + */ | ||
17 | +class SpecialExercisesFragment | ||
18 | + : BaseLifeCycleFragment<SpecialExercisesFragmentViewModel, FragmentSpecialExercisesBinding>( | ||
19 | + FragmentSpecialExercisesBinding::inflate | ||
20 | +) { | ||
21 | + override fun initDataObserver() { | ||
22 | + | ||
23 | + } | ||
24 | + | ||
25 | + override fun initData() { | ||
26 | + super.initData() | ||
27 | + binding.apply { | ||
28 | + | ||
29 | + val specialExercisesAdapter = SpecialExercisesAdapter() | ||
30 | + val list = mutableListOf( | ||
31 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
32 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
33 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
34 | + VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"), | ||
35 | + ) | ||
36 | + recyclerview.adapter = specialExercisesAdapter | ||
37 | + specialExercisesAdapter.addList(list) | ||
38 | + } | ||
39 | + } | ||
40 | + | ||
41 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/repository/ChangePhoneRepository.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 15:31 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class ChangePhoneRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/repository/ChangePwdRepository.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 15:04 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class ChangePwdRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 14:33 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class EditPersonalInfoRepository(val loadState: MutableLiveData<State>): ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 17:21 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class MockExaminationFragmentRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 17:49 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class MyCredentialsRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 15:48 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class MyErrorQuestionFragmentRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 15:37 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class MyErrorQuestionRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 16:55 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class QuestionRecordRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.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 | + * Time: 7/31/2021 17:02 | ||
9 | + * Author: Captain | ||
10 | + * Description: 初见时你很迷人 | ||
11 | + */ | ||
12 | +class SpecialExercisesFragmentRepository(val loadState: MutableLiveData<State>) : ApiRepository() { | ||
13 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/viewmodel/ChangePhoneViewModel.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.ChangePhoneRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 15:32 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class ChangePhoneViewModel : BaseViewModel<ChangePhoneRepository>() { | ||
12 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/viewmodel/ChangePwdViewModel.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.ChangePwdRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 15:05 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class ChangePwdViewModel : BaseViewModel<ChangePwdRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.EditPersonalInfoRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 14:38 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class EditPersonalInfoViewModel : BaseViewModel<EditPersonalInfoRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.MockExaminationFragmentRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 17:21 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class MockExaminationFragmentViewModel : BaseViewModel<MockExaminationFragmentRepository>() { | ||
12 | +} |
app/src/main/java/com/br_technology/securitytrain_master/ui/mine/viewmodel/MyCredentialsViewModel.kt
0 → 100644
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.MyCredentialsRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 17:50 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class MyCredentialsViewModel : BaseViewModel<MyCredentialsRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.MyErrorQuestionFragmentRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 15:49 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class MyErrorQuestionFragmentViewModel : BaseViewModel<MyErrorQuestionFragmentRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.MyErrorQuestionRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 15:38 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class MyErrorQuestionViewModel : BaseViewModel<MyErrorQuestionRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.QuestionRecordRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 16:55 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class QuestionRecordViewModel : BaseViewModel<QuestionRecordRepository>() { | ||
12 | +} |
1 | +package com.br_technology.securitytrain_master.ui.mine.viewmodel | ||
2 | + | ||
3 | +import com.br_technology.securitytrain_master.ui.mine.repository.SpecialExercisesFragmentRepository | ||
4 | +import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel | ||
5 | + | ||
6 | +/** | ||
7 | + * Time: 7/31/2021 17:03 | ||
8 | + * Author: Captain | ||
9 | + * Description: 初见时你很迷人 | ||
10 | + */ | ||
11 | +class SpecialExercisesFragmentViewModel : BaseViewModel<SpecialExercisesFragmentRepository>() { | ||
12 | +} |
app/src/main/res/drawable/solid_e3f1ff.xml
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="match_parent" | ||
5 | + android:background="@color/white" | ||
6 | + android:orientation="vertical"> | ||
7 | + | ||
8 | + <include layout="@layout/layout_tool_bar" /> | ||
9 | + | ||
10 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
11 | + android:id="@+id/tool_bar" | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:layout_height="wrap_content" /> | ||
14 | + | ||
15 | + <TextView | ||
16 | + android:layout_width="wrap_content" | ||
17 | + android:layout_height="wrap_content" | ||
18 | + android:layout_marginStart="16dp" | ||
19 | + android:layout_marginTop="24dp" | ||
20 | + android:text="修改手机号" | ||
21 | + android:textColor="@color/color_32" | ||
22 | + android:textSize="18sp" | ||
23 | + android:textStyle="bold" /> | ||
24 | + | ||
25 | + <LinearLayout | ||
26 | + android:layout_width="match_parent" | ||
27 | + android:layout_height="48dp" | ||
28 | + android:layout_marginTop="20dp" | ||
29 | + android:orientation="horizontal"> | ||
30 | + | ||
31 | + <EditText | ||
32 | + android:layout_width="match_parent" | ||
33 | + android:layout_height="match_parent" | ||
34 | + android:layout_gravity="center_vertical" | ||
35 | + android:layout_marginStart="16dp" | ||
36 | + android:background="@null" | ||
37 | + android:hint="输入手机号" | ||
38 | + android:textColor="@color/color_32" | ||
39 | + android:textColorHint="@color/color_96" | ||
40 | + android:textSize="14sp" /> | ||
41 | + | ||
42 | + </LinearLayout> | ||
43 | + | ||
44 | + <View | ||
45 | + android:layout_marginStart="16dp" | ||
46 | + android:background="@color/color_f7" | ||
47 | + android:layout_width="match_parent" | ||
48 | + android:layout_height="1dp"> | ||
49 | + | ||
50 | + </View> | ||
51 | + | ||
52 | + <RelativeLayout | ||
53 | + android:layout_width="match_parent" | ||
54 | + android:layout_height="48dp"> | ||
55 | + | ||
56 | + <EditText | ||
57 | + android:id="@+id/et_code" | ||
58 | + android:layout_width="wrap_content" | ||
59 | + android:layout_height="match_parent" | ||
60 | + android:layout_centerVertical="true" | ||
61 | + android:layout_marginStart="16dp" | ||
62 | + android:background="@null" | ||
63 | + android:hint="输入验证码" | ||
64 | + android:textColor="@color/color_32" | ||
65 | + android:textColorHint="@color/color_96" | ||
66 | + android:textSize="14sp" /> | ||
67 | + <TextView | ||
68 | + android:gravity="center" | ||
69 | + android:id="@+id/tv_get_code" | ||
70 | + android:layout_marginEnd="16dp" | ||
71 | + android:layout_alignParentEnd="true" | ||
72 | + android:layout_centerVertical="true" | ||
73 | + android:textSize="14sp" | ||
74 | + android:textColor="@color/color_25" | ||
75 | + android:text="获取验证码" | ||
76 | + android:layout_width="86dp" | ||
77 | + android:layout_height="wrap_content"/> | ||
78 | + | ||
79 | + <View | ||
80 | + android:layout_alignParentEnd="true" | ||
81 | + android:layout_alignEnd="@id/et_code" | ||
82 | + android:layout_centerVertical="true" | ||
83 | + android:layout_marginEnd="110dp" | ||
84 | + android:background="@color/color_25" | ||
85 | + android:layout_width="1dp" | ||
86 | + android:layout_height="16dp"> | ||
87 | + | ||
88 | + </View> | ||
89 | + | ||
90 | + | ||
91 | + </RelativeLayout> | ||
92 | + | ||
93 | + <TextView | ||
94 | + android:gravity="center" | ||
95 | + android:background="@drawable/solid_25_4" | ||
96 | + android:layout_marginTop="40dp" | ||
97 | + android:layout_gravity="center_horizontal" | ||
98 | + android:textSize="16sp" | ||
99 | + android:textColor="@color/white" | ||
100 | + android:text="完成" | ||
101 | + android:layout_width="343dp" | ||
102 | + android:layout_height="44dp"/> | ||
103 | + | ||
104 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="match_parent" | ||
5 | + android:background="@color/white" | ||
6 | + android:orientation="vertical"> | ||
7 | + | ||
8 | + <include layout="@layout/layout_tool_bar" /> | ||
9 | + | ||
10 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
11 | + android:id="@+id/tool_bar" | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:layout_height="wrap_content" /> | ||
14 | + | ||
15 | + <TextView | ||
16 | + android:layout_width="wrap_content" | ||
17 | + android:layout_height="wrap_content" | ||
18 | + android:layout_marginStart="16dp" | ||
19 | + android:layout_marginTop="24dp" | ||
20 | + android:text="修改密码" | ||
21 | + android:textColor="@color/color_32" | ||
22 | + android:textSize="18sp" | ||
23 | + android:textStyle="bold" /> | ||
24 | + | ||
25 | + <LinearLayout | ||
26 | + android:layout_width="match_parent" | ||
27 | + android:layout_height="48dp" | ||
28 | + android:layout_marginTop="20dp" | ||
29 | + android:orientation="horizontal"> | ||
30 | + | ||
31 | + <EditText | ||
32 | + android:layout_width="match_parent" | ||
33 | + android:layout_height="match_parent" | ||
34 | + android:layout_gravity="center_vertical" | ||
35 | + android:layout_marginStart="16dp" | ||
36 | + android:background="@null" | ||
37 | + android:hint="输入手机号" | ||
38 | + android:textColor="@color/color_32" | ||
39 | + android:textColorHint="@color/color_96" | ||
40 | + android:textSize="14sp" /> | ||
41 | + | ||
42 | + </LinearLayout> | ||
43 | + | ||
44 | + <View | ||
45 | + android:layout_marginStart="16dp" | ||
46 | + android:background="@color/color_f7" | ||
47 | + android:layout_width="match_parent" | ||
48 | + android:layout_height="1dp"> | ||
49 | + | ||
50 | + </View> | ||
51 | + | ||
52 | + <RelativeLayout | ||
53 | + android:layout_width="match_parent" | ||
54 | + android:layout_height="48dp"> | ||
55 | + | ||
56 | + <EditText | ||
57 | + android:id="@+id/et_code" | ||
58 | + android:layout_width="wrap_content" | ||
59 | + android:layout_height="match_parent" | ||
60 | + android:layout_centerVertical="true" | ||
61 | + android:layout_marginStart="16dp" | ||
62 | + android:background="@null" | ||
63 | + android:hint="输入验证码" | ||
64 | + android:textColor="@color/color_32" | ||
65 | + android:textColorHint="@color/color_96" | ||
66 | + android:textSize="14sp" /> | ||
67 | + <TextView | ||
68 | + android:gravity="center" | ||
69 | + android:id="@+id/tv_get_code" | ||
70 | + android:layout_marginEnd="16dp" | ||
71 | + android:layout_alignParentEnd="true" | ||
72 | + android:layout_centerVertical="true" | ||
73 | + android:textSize="14sp" | ||
74 | + android:textColor="@color/color_25" | ||
75 | + android:text="获取验证码" | ||
76 | + android:layout_width="86dp" | ||
77 | + android:layout_height="wrap_content"/> | ||
78 | + | ||
79 | + <View | ||
80 | + android:layout_alignParentEnd="true" | ||
81 | + android:layout_alignEnd="@id/et_code" | ||
82 | + android:layout_centerVertical="true" | ||
83 | + android:layout_marginEnd="110dp" | ||
84 | + android:background="@color/color_25" | ||
85 | + android:layout_width="1dp" | ||
86 | + android:layout_height="16dp"> | ||
87 | + | ||
88 | + </View> | ||
89 | + | ||
90 | + | ||
91 | + </RelativeLayout> | ||
92 | + | ||
93 | + <View | ||
94 | + android:background="@color/color_f7" | ||
95 | + android:layout_width="match_parent" | ||
96 | + android:layout_height="8dp"> | ||
97 | + | ||
98 | + </View> | ||
99 | + | ||
100 | + <LinearLayout | ||
101 | + android:layout_width="match_parent" | ||
102 | + android:layout_height="48dp" | ||
103 | + android:layout_marginTop="20dp" | ||
104 | + android:orientation="horizontal"> | ||
105 | + | ||
106 | + <EditText | ||
107 | + android:layout_width="match_parent" | ||
108 | + android:layout_height="match_parent" | ||
109 | + android:layout_gravity="center_vertical" | ||
110 | + android:layout_marginStart="16dp" | ||
111 | + android:background="@null" | ||
112 | + android:hint="输入原密码" | ||
113 | + android:textColor="@color/color_32" | ||
114 | + android:textColorHint="@color/color_96" | ||
115 | + android:textSize="14sp" /> | ||
116 | + | ||
117 | + </LinearLayout> | ||
118 | + | ||
119 | + <View | ||
120 | + android:layout_marginStart="16dp" | ||
121 | + android:background="@color/color_f7" | ||
122 | + android:layout_width="match_parent" | ||
123 | + android:layout_height="1dp"> | ||
124 | + | ||
125 | + </View> | ||
126 | + | ||
127 | + <LinearLayout | ||
128 | + android:layout_width="match_parent" | ||
129 | + android:layout_height="48dp" | ||
130 | + android:orientation="horizontal"> | ||
131 | + | ||
132 | + <EditText | ||
133 | + android:layout_width="match_parent" | ||
134 | + android:layout_height="match_parent" | ||
135 | + android:layout_gravity="center_vertical" | ||
136 | + android:layout_marginStart="16dp" | ||
137 | + android:background="@null" | ||
138 | + android:hint="输入新密码" | ||
139 | + android:textColor="@color/color_32" | ||
140 | + android:textColorHint="@color/color_96" | ||
141 | + android:textSize="14sp" /> | ||
142 | + | ||
143 | + </LinearLayout> | ||
144 | + | ||
145 | + <View | ||
146 | + android:layout_marginStart="16dp" | ||
147 | + android:background="@color/color_f7" | ||
148 | + android:layout_width="match_parent" | ||
149 | + android:layout_height="1dp"> | ||
150 | + | ||
151 | + </View> | ||
152 | + | ||
153 | + <LinearLayout | ||
154 | + android:layout_width="match_parent" | ||
155 | + android:layout_height="48dp" | ||
156 | + android:orientation="horizontal"> | ||
157 | + | ||
158 | + <EditText | ||
159 | + android:layout_width="match_parent" | ||
160 | + android:layout_height="match_parent" | ||
161 | + android:layout_gravity="center_vertical" | ||
162 | + android:layout_marginStart="16dp" | ||
163 | + android:background="@null" | ||
164 | + android:hint="再次输入新密码" | ||
165 | + android:textColor="@color/color_32" | ||
166 | + android:textColorHint="@color/color_96" | ||
167 | + android:textSize="14sp" /> | ||
168 | + | ||
169 | + </LinearLayout> | ||
170 | + | ||
171 | + <TextView | ||
172 | + android:gravity="center" | ||
173 | + android:background="@drawable/solid_25_4" | ||
174 | + android:layout_marginTop="40dp" | ||
175 | + android:layout_gravity="center_horizontal" | ||
176 | + android:textSize="16sp" | ||
177 | + android:textColor="@color/white" | ||
178 | + android:text="完成" | ||
179 | + android:layout_width="343dp" | ||
180 | + android:layout_height="44dp"/> | ||
181 | + | ||
182 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:layout_width="match_parent" | ||
5 | + android:layout_height="match_parent" | ||
6 | + android:background="@color/white" | ||
7 | + android:orientation="vertical"> | ||
8 | + | ||
9 | + <include layout="@layout/layout_tool_bar" /> | ||
10 | + | ||
11 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
12 | + android:id="@+id/tool_bar" | ||
13 | + android:layout_width="match_parent" | ||
14 | + android:layout_height="wrap_content" | ||
15 | + app:toolTitle="个人信息" /> | ||
16 | + | ||
17 | + <RelativeLayout | ||
18 | + android:layout_width="74dp" | ||
19 | + android:layout_height="74dp" | ||
20 | + android:layout_gravity="center_horizontal" | ||
21 | + android:layout_marginTop="50dp"> | ||
22 | + | ||
23 | + <ImageView | ||
24 | + android:layout_width="72dp" | ||
25 | + android:layout_height="72dp" | ||
26 | + android:src="@mipmap/placeholder_head" /> | ||
27 | + | ||
28 | + <ImageView | ||
29 | + android:layout_alignParentEnd="true" | ||
30 | + android:layout_alignParentBottom="true" | ||
31 | + android:layout_width="wrap_content" | ||
32 | + android:layout_height="wrap_content" | ||
33 | + android:src="@mipmap/edit_camera" /> | ||
34 | + | ||
35 | + </RelativeLayout> | ||
36 | + | ||
37 | + <LinearLayout | ||
38 | + android:layout_marginTop="40dp" | ||
39 | + android:orientation="horizontal" | ||
40 | + android:layout_width="match_parent" | ||
41 | + android:layout_height="48dp"> | ||
42 | + | ||
43 | + <TextView | ||
44 | + android:layout_gravity="center_vertical" | ||
45 | + android:layout_marginStart="16dp" | ||
46 | + android:textColor="@color/color_32" | ||
47 | + android:textSize="14sp" | ||
48 | + android:text="姓名:" | ||
49 | + android:layout_width="wrap_content" | ||
50 | + android:layout_height="wrap_content"/> | ||
51 | + | ||
52 | + <TextView | ||
53 | + android:layout_marginEnd="4dp" | ||
54 | + android:gravity="end" | ||
55 | + android:layout_gravity="center_vertical" | ||
56 | + android:textColor="@color/color_96" | ||
57 | + android:textSize="14sp" | ||
58 | + android:text="赵丽静" | ||
59 | + android:layout_weight="1" | ||
60 | + android:layout_width="wrap_content" | ||
61 | + android:layout_height="wrap_content"/> | ||
62 | + | ||
63 | + <ImageView | ||
64 | + android:layout_marginEnd="16dp" | ||
65 | + android:layout_gravity="center_vertical" | ||
66 | + android:src="@mipmap/ic_arrow" | ||
67 | + android:layout_width="wrap_content" | ||
68 | + android:layout_height="wrap_content"/> | ||
69 | + | ||
70 | + </LinearLayout> | ||
71 | + | ||
72 | + <View | ||
73 | + android:layout_marginStart="16dp" | ||
74 | + android:background="@color/color_f7" | ||
75 | + android:layout_width="match_parent" | ||
76 | + android:layout_height="1dp"> | ||
77 | + | ||
78 | + </View> | ||
79 | + | ||
80 | + <LinearLayout | ||
81 | + android:id="@+id/ll_change_phone" | ||
82 | + android:orientation="horizontal" | ||
83 | + android:layout_width="match_parent" | ||
84 | + android:layout_height="48dp"> | ||
85 | + | ||
86 | + <TextView | ||
87 | + android:layout_gravity="center_vertical" | ||
88 | + android:layout_marginStart="16dp" | ||
89 | + android:textColor="@color/color_32" | ||
90 | + android:textSize="14sp" | ||
91 | + android:text="手机号:" | ||
92 | + android:layout_width="wrap_content" | ||
93 | + android:layout_height="wrap_content"/> | ||
94 | + | ||
95 | + <TextView | ||
96 | + android:layout_marginEnd="4dp" | ||
97 | + android:gravity="end" | ||
98 | + android:layout_gravity="center_vertical" | ||
99 | + android:textColor="@color/color_96" | ||
100 | + android:textSize="14sp" | ||
101 | + android:text="15435643667" | ||
102 | + android:layout_weight="1" | ||
103 | + android:layout_width="wrap_content" | ||
104 | + android:layout_height="wrap_content"/> | ||
105 | + | ||
106 | + <ImageView | ||
107 | + android:layout_marginEnd="16dp" | ||
108 | + android:layout_gravity="center_vertical" | ||
109 | + android:src="@mipmap/ic_arrow" | ||
110 | + android:layout_width="wrap_content" | ||
111 | + android:layout_height="wrap_content"/> | ||
112 | + | ||
113 | + </LinearLayout> | ||
114 | + | ||
115 | + <View | ||
116 | + android:layout_marginStart="16dp" | ||
117 | + android:background="@color/color_f7" | ||
118 | + android:layout_width="match_parent" | ||
119 | + android:layout_height="1dp"> | ||
120 | + | ||
121 | + </View> | ||
122 | + | ||
123 | + <LinearLayout | ||
124 | + android:id="@+id/ll_change_pwd" | ||
125 | + android:orientation="horizontal" | ||
126 | + android:layout_width="match_parent" | ||
127 | + android:layout_height="48dp"> | ||
128 | + | ||
129 | + <TextView | ||
130 | + android:layout_gravity="center_vertical" | ||
131 | + android:layout_marginStart="16dp" | ||
132 | + android:textColor="@color/color_32" | ||
133 | + android:textSize="14sp" | ||
134 | + android:text="密码:" | ||
135 | + android:layout_width="wrap_content" | ||
136 | + android:layout_height="wrap_content"/> | ||
137 | + | ||
138 | + <TextView | ||
139 | + android:layout_marginEnd="4dp" | ||
140 | + android:gravity="end" | ||
141 | + android:layout_gravity="center_vertical" | ||
142 | + android:textColor="@color/color_96" | ||
143 | + android:textSize="14sp" | ||
144 | + android:text="qwrrt" | ||
145 | + android:layout_weight="1" | ||
146 | + android:layout_width="wrap_content" | ||
147 | + android:layout_height="wrap_content"/> | ||
148 | + | ||
149 | + <ImageView | ||
150 | + android:layout_marginEnd="16dp" | ||
151 | + android:layout_gravity="center_vertical" | ||
152 | + android:src="@mipmap/ic_arrow" | ||
153 | + android:layout_width="wrap_content" | ||
154 | + android:layout_height="wrap_content"/> | ||
155 | + | ||
156 | + </LinearLayout> | ||
157 | + | ||
158 | + <View | ||
159 | + android:background="@color/color_f7" | ||
160 | + android:layout_width="match_parent" | ||
161 | + android:layout_height="8dp"> | ||
162 | + | ||
163 | + </View> | ||
164 | + | ||
165 | + <LinearLayout | ||
166 | + android:orientation="horizontal" | ||
167 | + android:layout_width="match_parent" | ||
168 | + android:layout_height="48dp"> | ||
169 | + | ||
170 | + <TextView | ||
171 | + android:layout_gravity="center_vertical" | ||
172 | + android:layout_marginStart="16dp" | ||
173 | + android:textColor="@color/color_32" | ||
174 | + android:textSize="14sp" | ||
175 | + android:text="身份证号:" | ||
176 | + android:layout_width="wrap_content" | ||
177 | + android:layout_height="wrap_content"/> | ||
178 | + | ||
179 | + <TextView | ||
180 | + android:layout_marginEnd="4dp" | ||
181 | + android:gravity="end" | ||
182 | + android:layout_gravity="center_vertical" | ||
183 | + android:textColor="@color/color_96" | ||
184 | + android:textSize="14sp" | ||
185 | + android:text="154356436675475467567435" | ||
186 | + android:layout_weight="1" | ||
187 | + android:layout_width="wrap_content" | ||
188 | + android:layout_height="wrap_content"/> | ||
189 | + | ||
190 | + <ImageView | ||
191 | + android:visibility="invisible" | ||
192 | + android:layout_marginEnd="16dp" | ||
193 | + android:layout_gravity="center_vertical" | ||
194 | + android:src="@mipmap/ic_arrow" | ||
195 | + android:layout_width="wrap_content" | ||
196 | + android:layout_height="wrap_content"/> | ||
197 | + | ||
198 | + </LinearLayout> | ||
199 | + | ||
200 | + <View | ||
201 | + android:layout_marginStart="16dp" | ||
202 | + android:background="@color/color_f7" | ||
203 | + android:layout_width="match_parent" | ||
204 | + android:layout_height="1dp"> | ||
205 | + | ||
206 | + </View> | ||
207 | + | ||
208 | + <LinearLayout | ||
209 | + android:orientation="horizontal" | ||
210 | + android:layout_width="match_parent" | ||
211 | + android:layout_height="48dp"> | ||
212 | + | ||
213 | + <TextView | ||
214 | + android:layout_gravity="center_vertical" | ||
215 | + android:layout_marginStart="16dp" | ||
216 | + android:textColor="@color/color_32" | ||
217 | + android:textSize="14sp" | ||
218 | + android:text="部门:" | ||
219 | + android:layout_width="wrap_content" | ||
220 | + android:layout_height="wrap_content"/> | ||
221 | + | ||
222 | + <TextView | ||
223 | + android:layout_marginEnd="4dp" | ||
224 | + android:gravity="end" | ||
225 | + android:layout_gravity="center_vertical" | ||
226 | + android:textColor="@color/color_96" | ||
227 | + android:textSize="14sp" | ||
228 | + android:text="工程部" | ||
229 | + android:layout_weight="1" | ||
230 | + android:layout_width="wrap_content" | ||
231 | + android:layout_height="wrap_content"/> | ||
232 | + | ||
233 | + <ImageView | ||
234 | + android:visibility="invisible" | ||
235 | + android:layout_marginEnd="16dp" | ||
236 | + android:layout_gravity="center_vertical" | ||
237 | + android:src="@mipmap/ic_arrow" | ||
238 | + android:layout_width="wrap_content" | ||
239 | + android:layout_height="wrap_content"/> | ||
240 | + | ||
241 | + </LinearLayout> | ||
242 | + | ||
243 | + <View | ||
244 | + android:layout_marginStart="16dp" | ||
245 | + android:background="@color/color_f7" | ||
246 | + android:layout_width="match_parent" | ||
247 | + android:layout_height="1dp"> | ||
248 | + | ||
249 | + </View> | ||
250 | + | ||
251 | + <LinearLayout | ||
252 | + android:orientation="horizontal" | ||
253 | + android:layout_width="match_parent" | ||
254 | + android:layout_height="48dp"> | ||
255 | + | ||
256 | + <TextView | ||
257 | + android:layout_gravity="center_vertical" | ||
258 | + android:layout_marginStart="16dp" | ||
259 | + android:textColor="@color/color_32" | ||
260 | + android:textSize="14sp" | ||
261 | + android:text="岗位:" | ||
262 | + android:layout_width="wrap_content" | ||
263 | + android:layout_height="wrap_content"/> | ||
264 | + | ||
265 | + <TextView | ||
266 | + android:layout_marginEnd="4dp" | ||
267 | + android:gravity="end" | ||
268 | + android:layout_gravity="center_vertical" | ||
269 | + android:textColor="@color/color_96" | ||
270 | + android:textSize="14sp" | ||
271 | + android:text="设备工程师" | ||
272 | + android:layout_weight="1" | ||
273 | + android:layout_width="wrap_content" | ||
274 | + android:layout_height="wrap_content"/> | ||
275 | + | ||
276 | + <ImageView | ||
277 | + android:visibility="invisible" | ||
278 | + android:layout_marginEnd="16dp" | ||
279 | + android:layout_gravity="center_vertical" | ||
280 | + android:src="@mipmap/ic_arrow" | ||
281 | + android:layout_width="wrap_content" | ||
282 | + android:layout_height="wrap_content"/> | ||
283 | + | ||
284 | + </LinearLayout> | ||
285 | + | ||
286 | + <View | ||
287 | + android:layout_marginStart="16dp" | ||
288 | + android:background="@color/color_f7" | ||
289 | + android:layout_width="match_parent" | ||
290 | + android:layout_height="1dp"> | ||
291 | + | ||
292 | + </View> | ||
293 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:layout_width="match_parent" | ||
5 | + android:layout_height="match_parent" | ||
6 | + android:orientation="vertical"> | ||
7 | + | ||
8 | + <include layout="@layout/layout_tool_bar" /> | ||
9 | + | ||
10 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
11 | + android:id="@+id/tool_bar" | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:layout_height="wrap_content" | ||
14 | + app:toolTitle="直播列表" /> | ||
15 | + | ||
16 | + <com.google.android.material.tabs.TabLayout | ||
17 | + android:id="@+id/tab_layout" | ||
18 | + style="@style/SearchTab" | ||
19 | + android:layout_width="match_parent" | ||
20 | + android:layout_height="?actionBarSize" | ||
21 | + android:overScrollMode="never" | ||
22 | + app:tabMode="auto" | ||
23 | + app:tabSelectedTextColor="@color/color_252" | ||
24 | + app:tabTextColor="@color/color_96" /> | ||
25 | + | ||
26 | + <androidx.viewpager.widget.ViewPager | ||
27 | + android:id="@+id/view_pager" | ||
28 | + android:layout_width="match_parent" | ||
29 | + android:layout_height="match_parent"> | ||
30 | + | ||
31 | + </androidx.viewpager.widget.ViewPager> | ||
32 | + | ||
33 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:orientation="vertical" | ||
5 | + android:background="@color/white" | ||
6 | + android:layout_width="match_parent" | ||
7 | + android:layout_height="match_parent"> | ||
8 | + <include layout="@layout/layout_tool_bar" /> | ||
9 | + | ||
10 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
11 | + android:id="@+id/tool_bar" | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:layout_height="wrap_content" | ||
14 | + app:toolTitle="我的证书" /> | ||
15 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:layout_width="match_parent" | ||
5 | + android:layout_height="match_parent" | ||
6 | + android:background="@color/white" | ||
7 | + android:orientation="vertical"> | ||
8 | + | ||
9 | + <include layout="@layout/layout_tool_bar" /> | ||
10 | + | ||
11 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
12 | + android:id="@+id/tool_bar" | ||
13 | + android:layout_width="match_parent" | ||
14 | + android:layout_height="wrap_content" | ||
15 | + app:toolTitle="我的错题" /> | ||
16 | + | ||
17 | + <com.google.android.material.tabs.TabLayout | ||
18 | + android:id="@+id/tab_layout" | ||
19 | + style="@style/SearchTab" | ||
20 | + android:layout_width="match_parent" | ||
21 | + android:layout_height="?actionBarSize" | ||
22 | + android:overScrollMode="never" | ||
23 | + app:tabMode="auto" | ||
24 | + app:tabSelectedTextColor="@color/color_252" | ||
25 | + app:tabTextColor="@color/color_96" /> | ||
26 | + | ||
27 | + <View | ||
28 | + android:layout_width="match_parent" | ||
29 | + android:layout_height="8dp" | ||
30 | + android:background="@color/color_f7"></View> | ||
31 | + | ||
32 | + <androidx.viewpager.widget.ViewPager | ||
33 | + android:id="@+id/view_pager" | ||
34 | + android:layout_width="match_parent" | ||
35 | + android:layout_height="match_parent"> | ||
36 | + | ||
37 | + </androidx.viewpager.widget.ViewPager> | ||
38 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:layout_width="match_parent" | ||
5 | + android:layout_height="match_parent" | ||
6 | + android:background="@color/white" | ||
7 | + android:orientation="vertical"> | ||
8 | + | ||
9 | + <include layout="@layout/layout_tool_bar" /> | ||
10 | + | ||
11 | + <com.br_technology.securitytrain_master.view.ViewToolBar | ||
12 | + android:id="@+id/tool_bar" | ||
13 | + android:layout_width="match_parent" | ||
14 | + android:layout_height="wrap_content" | ||
15 | + app:toolTitle="答题记录" /> | ||
16 | + | ||
17 | + <com.google.android.material.tabs.TabLayout | ||
18 | + android:id="@+id/tab_layout" | ||
19 | + style="@style/SearchTab" | ||
20 | + android:layout_width="match_parent" | ||
21 | + android:layout_height="?actionBarSize" | ||
22 | + android:overScrollMode="never" | ||
23 | + app:tabMode="auto" | ||
24 | + app:tabSelectedTextColor="@color/color_252" | ||
25 | + app:tabTextColor="@color/color_96" /> | ||
26 | + | ||
27 | + <View | ||
28 | + android:layout_width="match_parent" | ||
29 | + android:layout_height="8dp" | ||
30 | + android:background="@color/color_f7"></View> | ||
31 | + | ||
32 | + <androidx.viewpager.widget.ViewPager | ||
33 | + android:id="@+id/view_pager" | ||
34 | + android:layout_width="match_parent" | ||
35 | + android:layout_height="match_parent"> | ||
36 | + | ||
37 | + </androidx.viewpager.widget.ViewPager> | ||
38 | + | ||
39 | +</LinearLayout> |
@@ -4,10 +4,336 @@ | @@ -4,10 +4,336 @@ | ||
4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
5 | android:layout_height="match_parent"> | 5 | android:layout_height="match_parent"> |
6 | 6 | ||
7 | - <TextView | ||
8 | - android:layout_gravity="center_horizontal" | ||
9 | - android:gravity="center" | ||
10 | - android:text="mine" | 7 | + <include layout="@layout/layout_tool_bar_theme" /> |
8 | + | ||
9 | + <LinearLayout | ||
10 | + android:background="@mipmap/mine_bg" | ||
11 | + android:orientation="horizontal" | ||
12 | + android:layout_width="match_parent" | ||
13 | + android:layout_height="wrap_content"> | ||
14 | + | ||
15 | + <ImageView | ||
16 | + android:src="@mipmap/placeholder_head" | ||
17 | + android:layout_marginStart="16dp" | ||
18 | + android:layout_marginTop="105dp" | ||
19 | + android:layout_width="72dp" | ||
20 | + android:layout_height="72dp"/> | ||
21 | + | ||
22 | + <LinearLayout | ||
23 | + android:layout_marginTop="95dp" | ||
24 | + android:layout_marginStart="20dp" | ||
25 | + android:layout_weight="1" | ||
26 | + android:orientation="vertical" | ||
27 | + android:layout_width="wrap_content" | ||
28 | + android:layout_height="match_parent"> | ||
29 | + | ||
30 | + <TextView | ||
31 | + android:text="赵丽静" | ||
32 | + android:textColor="@color/white" | ||
33 | + android:textSize="28sp" | ||
34 | + android:layout_width="wrap_content" | ||
35 | + android:layout_height="wrap_content"/> | ||
36 | + | ||
37 | + <TextView | ||
38 | + android:layout_marginTop="8dp" | ||
39 | + android:drawablePadding="4dp" | ||
40 | + android:textSize="12sp" | ||
41 | + android:textColor="@color/white" | ||
42 | + android:drawableStart="@mipmap/mine_phone" | ||
43 | + android:text="15674678755" | ||
44 | + android:layout_width="wrap_content" | ||
45 | + android:layout_height="wrap_content"/> | ||
46 | + | ||
47 | + <TextView | ||
48 | + android:layout_marginTop="8dp" | ||
49 | + android:text="工程部-设备工程师" | ||
50 | + android:textColor="@color/white" | ||
51 | + android:textSize="12sp" | ||
52 | + android:layout_width="wrap_content" | ||
53 | + android:layout_height="wrap_content"/> | ||
54 | + | ||
55 | + </LinearLayout> | ||
56 | + | ||
57 | + <ImageView | ||
58 | + android:id="@+id/iv_edit_info" | ||
59 | + android:layout_marginEnd="16dp" | ||
60 | + android:layout_marginTop="95dp" | ||
61 | + android:src="@mipmap/mine_edit" | ||
62 | + android:background="@color/color_25" | ||
63 | + android:layout_width="wrap_content" | ||
64 | + android:layout_height="wrap_content"/> | ||
65 | + | ||
66 | + </LinearLayout> | ||
67 | + | ||
68 | + <LinearLayout | ||
69 | + android:orientation="horizontal" | ||
11 | android:layout_width="match_parent" | 70 | android:layout_width="match_parent" |
12 | - android:layout_height="match_parent" /> | 71 | + android:layout_height="wrap_content"> |
72 | + | ||
73 | + <RelativeLayout | ||
74 | + android:layout_marginTop="20dp" | ||
75 | + android:layout_marginStart="24dp" | ||
76 | + android:layout_weight="1" | ||
77 | + android:layout_width="wrap_content" | ||
78 | + android:layout_height="wrap_content"> | ||
79 | + | ||
80 | + <TextView | ||
81 | + android:textColor="@color/color_32" | ||
82 | + android:textSize="12sp" | ||
83 | + android:drawablePadding="8dp" | ||
84 | + android:drawableTop="@mipmap/mine_banjirenwu" | ||
85 | + android:text="班级任务" | ||
86 | + android:layout_width="wrap_content" | ||
87 | + android:layout_height="wrap_content"/> | ||
88 | + | ||
89 | + </RelativeLayout> | ||
90 | + | ||
91 | + <RelativeLayout | ||
92 | + android:layout_marginTop="20dp" | ||
93 | + android:layout_marginStart="24dp" | ||
94 | + android:layout_weight="1" | ||
95 | + android:layout_width="wrap_content" | ||
96 | + android:layout_height="wrap_content"> | ||
97 | + | ||
98 | + <TextView | ||
99 | + android:textColor="@color/color_32" | ||
100 | + android:textSize="12sp" | ||
101 | + android:drawablePadding="8dp" | ||
102 | + android:drawableTop="@mipmap/mine_xianxiapeixun" | ||
103 | + android:text="线下培训" | ||
104 | + android:layout_width="wrap_content" | ||
105 | + android:layout_height="wrap_content"/> | ||
106 | + | ||
107 | + </RelativeLayout> | ||
108 | + | ||
109 | + <RelativeLayout | ||
110 | + android:layout_marginTop="20dp" | ||
111 | + android:layout_marginStart="24dp" | ||
112 | + android:layout_weight="1" | ||
113 | + android:layout_width="wrap_content" | ||
114 | + android:layout_height="wrap_content"> | ||
115 | + | ||
116 | + <TextView | ||
117 | + android:textColor="@color/color_32" | ||
118 | + android:textSize="12sp" | ||
119 | + android:drawablePadding="8dp" | ||
120 | + android:drawableTop="@mipmap/mine_xueqingfankui" | ||
121 | + android:text="学情反馈" | ||
122 | + android:layout_width="wrap_content" | ||
123 | + android:layout_height="wrap_content"/> | ||
124 | + | ||
125 | + </RelativeLayout> | ||
126 | + | ||
127 | + <RelativeLayout | ||
128 | + android:layout_marginTop="20dp" | ||
129 | + android:layout_marginStart="24dp" | ||
130 | + android:layout_weight="1" | ||
131 | + android:layout_width="wrap_content" | ||
132 | + android:layout_height="wrap_content"> | ||
133 | + | ||
134 | + <TextView | ||
135 | + android:textColor="@color/color_32" | ||
136 | + android:textSize="12sp" | ||
137 | + android:drawablePadding="8dp" | ||
138 | + android:drawableTop="@mipmap/mine_xuexibaogao" | ||
139 | + android:text="学习报告" | ||
140 | + android:layout_width="wrap_content" | ||
141 | + android:layout_height="wrap_content"/> | ||
142 | + | ||
143 | + </RelativeLayout> | ||
144 | + | ||
145 | + | ||
146 | + </LinearLayout> | ||
147 | + | ||
148 | + <RelativeLayout | ||
149 | + android:id="@+id/rl_mine_cuoti" | ||
150 | + android:layout_marginTop="20dp" | ||
151 | + android:layout_width="match_parent" | ||
152 | + android:layout_height="52dp"> | ||
153 | + | ||
154 | + <TextView | ||
155 | + android:drawablePadding="12dp" | ||
156 | + android:drawableStart="@mipmap/mine_wodecuoti" | ||
157 | + android:layout_marginStart="16dp" | ||
158 | + android:layout_centerVertical="true" | ||
159 | + android:textSize="14sp" | ||
160 | + android:textColor="@color/color_32" | ||
161 | + android:text="我的错题" | ||
162 | + android:layout_width="wrap_content" | ||
163 | + android:layout_height="wrap_content"/> | ||
164 | + | ||
165 | + <ImageView | ||
166 | + android:layout_centerVertical="true" | ||
167 | + android:layout_alignParentEnd="true" | ||
168 | + android:layout_marginEnd="16dp" | ||
169 | + android:src="@mipmap/ic_arrow" | ||
170 | + android:layout_width="wrap_content" | ||
171 | + android:layout_height="wrap_content"/> | ||
172 | + | ||
173 | + | ||
174 | + </RelativeLayout> | ||
175 | + | ||
176 | + <RelativeLayout | ||
177 | + android:id="@+id/rl_mine_datijilu" | ||
178 | + android:layout_width="match_parent" | ||
179 | + android:layout_height="52dp"> | ||
180 | + | ||
181 | + <TextView | ||
182 | + android:drawablePadding="12dp" | ||
183 | + android:drawableStart="@mipmap/mine_datijilu" | ||
184 | + android:layout_marginStart="16dp" | ||
185 | + android:layout_centerVertical="true" | ||
186 | + android:textSize="14sp" | ||
187 | + android:textColor="@color/color_32" | ||
188 | + android:text="答题记录" | ||
189 | + android:layout_width="wrap_content" | ||
190 | + android:layout_height="wrap_content"/> | ||
191 | + | ||
192 | + <ImageView | ||
193 | + android:layout_centerVertical="true" | ||
194 | + android:layout_alignParentEnd="true" | ||
195 | + android:layout_marginEnd="16dp" | ||
196 | + android:src="@mipmap/ic_arrow" | ||
197 | + android:layout_width="wrap_content" | ||
198 | + android:layout_height="wrap_content"/> | ||
199 | + | ||
200 | + | ||
201 | + </RelativeLayout> | ||
202 | + | ||
203 | + <RelativeLayout | ||
204 | + android:id="@+id/mine_zhengjian" | ||
205 | + android:layout_width="match_parent" | ||
206 | + android:layout_height="52dp"> | ||
207 | + | ||
208 | + <TextView | ||
209 | + android:drawablePadding="12dp" | ||
210 | + android:drawableStart="@mipmap/mine_wodezhengjian" | ||
211 | + android:layout_marginStart="16dp" | ||
212 | + android:layout_centerVertical="true" | ||
213 | + android:textSize="14sp" | ||
214 | + android:textColor="@color/color_32" | ||
215 | + android:text="我的证件" | ||
216 | + android:layout_width="wrap_content" | ||
217 | + android:layout_height="wrap_content"/> | ||
218 | + | ||
219 | + <ImageView | ||
220 | + android:layout_centerVertical="true" | ||
221 | + android:layout_alignParentEnd="true" | ||
222 | + android:layout_marginEnd="16dp" | ||
223 | + android:src="@mipmap/ic_arrow" | ||
224 | + android:layout_width="wrap_content" | ||
225 | + android:layout_height="wrap_content"/> | ||
226 | + | ||
227 | + | ||
228 | + </RelativeLayout> | ||
229 | + | ||
230 | + <RelativeLayout | ||
231 | + android:id="@+id/rl_mine_shoucang" | ||
232 | + android:layout_width="match_parent" | ||
233 | + android:layout_height="52dp"> | ||
234 | + | ||
235 | + <TextView | ||
236 | + android:drawablePadding="12dp" | ||
237 | + android:drawableStart="@mipmap/mine_wodeshoucang" | ||
238 | + android:layout_marginStart="16dp" | ||
239 | + android:layout_centerVertical="true" | ||
240 | + android:textSize="14sp" | ||
241 | + android:textColor="@color/color_32" | ||
242 | + android:text="我的收藏" | ||
243 | + android:layout_width="wrap_content" | ||
244 | + android:layout_height="wrap_content"/> | ||
245 | + | ||
246 | + <ImageView | ||
247 | + android:layout_centerVertical="true" | ||
248 | + android:layout_alignParentEnd="true" | ||
249 | + android:layout_marginEnd="16dp" | ||
250 | + android:src="@mipmap/ic_arrow" | ||
251 | + android:layout_width="wrap_content" | ||
252 | + android:layout_height="wrap_content"/> | ||
253 | + | ||
254 | + | ||
255 | + </RelativeLayout> | ||
256 | + | ||
257 | + <RelativeLayout | ||
258 | + android:id="@+id/rl_mine_liaotianjilu" | ||
259 | + android:layout_width="match_parent" | ||
260 | + android:layout_height="52dp"> | ||
261 | + | ||
262 | + <TextView | ||
263 | + android:drawablePadding="12dp" | ||
264 | + android:drawableStart="@mipmap/mine_wodeliaotianjilu" | ||
265 | + android:layout_marginStart="16dp" | ||
266 | + android:layout_centerVertical="true" | ||
267 | + android:textSize="14sp" | ||
268 | + android:textColor="@color/color_32" | ||
269 | + android:text="我的聊天记录" | ||
270 | + android:layout_width="wrap_content" | ||
271 | + android:layout_height="wrap_content"/> | ||
272 | + | ||
273 | + <ImageView | ||
274 | + android:layout_centerVertical="true" | ||
275 | + android:layout_alignParentEnd="true" | ||
276 | + android:layout_marginEnd="16dp" | ||
277 | + android:src="@mipmap/ic_arrow" | ||
278 | + android:layout_width="wrap_content" | ||
279 | + android:layout_height="wrap_content"/> | ||
280 | + | ||
281 | + | ||
282 | + </RelativeLayout> | ||
283 | + | ||
284 | + <RelativeLayout | ||
285 | + android:id="@+id/rl_mine_tousuyujianyi" | ||
286 | + android:layout_width="match_parent" | ||
287 | + android:layout_height="52dp"> | ||
288 | + | ||
289 | + <TextView | ||
290 | + android:drawablePadding="12dp" | ||
291 | + android:drawableStart="@mipmap/mine_tousuyujianyi" | ||
292 | + android:layout_marginStart="16dp" | ||
293 | + android:layout_centerVertical="true" | ||
294 | + android:textSize="14sp" | ||
295 | + android:textColor="@color/color_32" | ||
296 | + android:text="投诉与建议" | ||
297 | + android:layout_width="wrap_content" | ||
298 | + android:layout_height="wrap_content"/> | ||
299 | + | ||
300 | + <ImageView | ||
301 | + android:layout_centerVertical="true" | ||
302 | + android:layout_alignParentEnd="true" | ||
303 | + android:layout_marginEnd="16dp" | ||
304 | + android:src="@mipmap/ic_arrow" | ||
305 | + android:layout_width="wrap_content" | ||
306 | + android:layout_height="wrap_content"/> | ||
307 | + | ||
308 | + | ||
309 | + </RelativeLayout> | ||
310 | + | ||
311 | + <RelativeLayout | ||
312 | + android:id="@+id/rl_mine_lianxikefu" | ||
313 | + android:layout_width="match_parent" | ||
314 | + android:layout_height="52dp"> | ||
315 | + | ||
316 | + <TextView | ||
317 | + android:drawablePadding="12dp" | ||
318 | + android:drawableStart="@mipmap/mine_lianxikefu" | ||
319 | + android:layout_marginStart="16dp" | ||
320 | + android:layout_centerVertical="true" | ||
321 | + android:textSize="14sp" | ||
322 | + android:textColor="@color/color_32" | ||
323 | + android:text="联系客服" | ||
324 | + android:layout_width="wrap_content" | ||
325 | + android:layout_height="wrap_content"/> | ||
326 | + | ||
327 | + <ImageView | ||
328 | + android:layout_centerVertical="true" | ||
329 | + android:layout_alignParentEnd="true" | ||
330 | + android:layout_marginEnd="16dp" | ||
331 | + android:src="@mipmap/ic_arrow" | ||
332 | + android:layout_width="wrap_content" | ||
333 | + android:layout_height="wrap_content"/> | ||
334 | + | ||
335 | + | ||
336 | + </RelativeLayout> | ||
337 | + | ||
338 | + | ||
13 | </LinearLayout> | 339 | </LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:layout_width="match_parent" | ||
5 | + android:layout_height="match_parent" | ||
6 | + android:background="@color/white" | ||
7 | + android:orientation="vertical"> | ||
8 | + | ||
9 | + <androidx.recyclerview.widget.RecyclerView | ||
10 | + android:id="@+id/recyclerview" | ||
11 | + android:layout_width="match_parent" | ||
12 | + android:layout_height="match_parent" | ||
13 | + android:layout_marginStart="16dp" | ||
14 | + android:layout_marginEnd="16dp" | ||
15 | + android:overScrollMode="never" | ||
16 | + android:scrollbars="none" | ||
17 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> | ||
18 | + | ||
19 | + | ||
20 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="match_parent" | ||
5 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
6 | + android:background="@color/white" | ||
7 | + android:orientation="vertical"> | ||
8 | + | ||
9 | + <androidx.recyclerview.widget.RecyclerView | ||
10 | + android:id="@+id/recyclerview" | ||
11 | + android:layout_width="match_parent" | ||
12 | + android:layout_height="match_parent" | ||
13 | + android:layout_marginStart="16dp" | ||
14 | + android:layout_marginTop="24dp" | ||
15 | + android:layout_marginEnd="16dp" | ||
16 | + android:overScrollMode="never" | ||
17 | + android:scrollbars="none" | ||
18 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> | ||
19 | + | ||
20 | + | ||
21 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:orientation="vertical" | ||
5 | + android:layout_width="match_parent" | ||
6 | + android:layout_height="match_parent"> | ||
7 | + | ||
8 | + <androidx.recyclerview.widget.RecyclerView | ||
9 | + android:id="@+id/online_recycler" | ||
10 | + android:layout_width="match_parent" | ||
11 | + android:layout_height="match_parent" | ||
12 | + android:layout_marginStart="16dp" | ||
13 | + android:layout_marginEnd="16dp" | ||
14 | + android:overScrollMode="never" | ||
15 | + android:paddingTop="4dp" | ||
16 | + android:paddingBottom="12dp" | ||
17 | + android:scrollbars="none" | ||
18 | + app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | ||
19 | + app:spanCount="2" /> | ||
20 | + | ||
21 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
4 | + android:orientation="vertical" | ||
5 | + android:background="@color/white" | ||
6 | + android:layout_width="match_parent" | ||
7 | + android:layout_height="match_parent"> | ||
8 | + | ||
9 | + <androidx.recyclerview.widget.RecyclerView | ||
10 | + android:id="@+id/recyclerview" | ||
11 | + android:layout_width="match_parent" | ||
12 | + android:layout_height="match_parent" | ||
13 | + android:layout_marginStart="16dp" | ||
14 | + android:layout_marginEnd="16dp" | ||
15 | + android:overScrollMode="never" | ||
16 | + android:scrollbars="none" | ||
17 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> | ||
18 | + | ||
19 | + | ||
20 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="wrap_content" | ||
5 | + android:orientation="vertical"> | ||
6 | + | ||
7 | + <RelativeLayout | ||
8 | + android:layout_width="match_parent" | ||
9 | + android:layout_height="136dp" | ||
10 | + android:layout_marginStart="16dp" | ||
11 | + android:layout_marginTop="16dp" | ||
12 | + android:layout_marginEnd="16dp" | ||
13 | + android:background="@drawable/solid_eff2_4"> | ||
14 | + | ||
15 | + <LinearLayout | ||
16 | + android:layout_width="match_parent" | ||
17 | + android:layout_height="match_parent" | ||
18 | + android:orientation="vertical"> | ||
19 | + | ||
20 | + <TextView | ||
21 | + android:id="@+id/tv_question_title" | ||
22 | + android:layout_width="wrap_content" | ||
23 | + android:layout_height="wrap_content" | ||
24 | + android:layout_marginStart="16dp" | ||
25 | + android:layout_marginTop="16dp" | ||
26 | + android:text="考试问卷名称(焊工)" | ||
27 | + android:textColor="@color/color_32" | ||
28 | + android:textSize="14sp" /> | ||
29 | + | ||
30 | + <View | ||
31 | + android:layout_width="match_parent" | ||
32 | + android:layout_height="1dp" | ||
33 | + android:layout_margin="16dp" | ||
34 | + android:background="@color/color_dcdee0"> | ||
35 | + | ||
36 | + </View> | ||
37 | + | ||
38 | + <LinearLayout | ||
39 | + android:layout_width="match_parent" | ||
40 | + android:layout_height="wrap_content" | ||
41 | + android:orientation="horizontal"> | ||
42 | + | ||
43 | + <TextView | ||
44 | + android:layout_width="wrap_content" | ||
45 | + android:layout_height="wrap_content" | ||
46 | + android:layout_marginStart="16dp" | ||
47 | + android:text="提交时间:" | ||
48 | + android:textColor="@color/color_96" | ||
49 | + android:textSize="14sp" /> | ||
50 | + | ||
51 | + <TextView | ||
52 | + android:id="@+id/tv_commit_time" | ||
53 | + android:layout_width="wrap_content" | ||
54 | + android:layout_height="wrap_content" | ||
55 | + android:layout_marginStart="24dp" | ||
56 | + android:layout_marginEnd="16dp" | ||
57 | + android:text="2021-08-23 08:30" | ||
58 | + android:textColor="@color/color_32" | ||
59 | + android:textSize="14sp" /> | ||
60 | + </LinearLayout> | ||
61 | + | ||
62 | + <LinearLayout | ||
63 | + android:layout_width="match_parent" | ||
64 | + android:layout_height="wrap_content" | ||
65 | + android:orientation="horizontal"> | ||
66 | + | ||
67 | + <TextView | ||
68 | + android:layout_width="wrap_content" | ||
69 | + android:layout_height="wrap_content" | ||
70 | + android:layout_marginStart="16dp" | ||
71 | + android:text="分数:" | ||
72 | + android:textColor="@color/color_96" | ||
73 | + android:textSize="14sp" /> | ||
74 | + | ||
75 | + <TextView | ||
76 | + android:id="@+id/tv_score" | ||
77 | + android:layout_width="wrap_content" | ||
78 | + android:layout_height="wrap_content" | ||
79 | + android:layout_marginStart="52dp" | ||
80 | + android:layout_marginEnd="16dp" | ||
81 | + android:text="100分" | ||
82 | + android:textColor="@color/color_32" | ||
83 | + android:textSize="14sp" /> | ||
84 | + </LinearLayout> | ||
85 | + | ||
86 | + | ||
87 | + </LinearLayout> | ||
88 | + | ||
89 | + | ||
90 | + <ImageView | ||
91 | + android:layout_width="wrap_content" | ||
92 | + android:layout_height="wrap_content" | ||
93 | + android:layout_alignParentEnd="true" | ||
94 | + android:layout_margin="12dp" | ||
95 | + android:src="@mipmap/good" /> | ||
96 | + </RelativeLayout> | ||
97 | + | ||
98 | + | ||
99 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="wrap_content" | ||
5 | + android:background="@color/white" | ||
6 | + android:orientation="vertical"> | ||
7 | + | ||
8 | + <LinearLayout | ||
9 | + android:layout_width="match_parent" | ||
10 | + android:layout_height="82dp" | ||
11 | + android:layout_marginStart="16dp" | ||
12 | + android:layout_marginEnd="16dp" | ||
13 | + android:layout_marginTop="16dp" | ||
14 | + android:background="@mipmap/item_error_question_bg" | ||
15 | + android:orientation="horizontal"> | ||
16 | + | ||
17 | + <TextView | ||
18 | + android:id="@+id/tv_question_title" | ||
19 | + android:layout_width="wrap_content" | ||
20 | + android:layout_height="wrap_content" | ||
21 | + android:layout_gravity="center_vertical" | ||
22 | + android:layout_marginStart="16dp" | ||
23 | + android:layout_marginEnd="16dp" | ||
24 | + android:layout_weight="1" | ||
25 | + android:text="男子从国外赶回陪产,回家第二天被隔离:孩子出生了我却见不到?" | ||
26 | + android:textColor="@color/color_32" | ||
27 | + android:textSize="14sp" /> | ||
28 | + | ||
29 | + | ||
30 | + <ImageView | ||
31 | + android:id="@+id/iv_del" | ||
32 | + android:layout_width="wrap_content" | ||
33 | + android:layout_height="wrap_content" | ||
34 | + android:layout_gravity="center_vertical" | ||
35 | + android:layout_marginEnd="16dp" | ||
36 | + android:src="@mipmap/item_error_question_del" /> | ||
37 | + | ||
38 | + | ||
39 | + </LinearLayout> | ||
40 | + | ||
41 | +</LinearLayout> |
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | + android:layout_width="match_parent" | ||
4 | + android:layout_height="wrap_content" | ||
5 | + android:background="@color/white" | ||
6 | + android:orientation="vertical"> | ||
7 | + | ||
8 | + <LinearLayout | ||
9 | + android:layout_width="match_parent" | ||
10 | + android:layout_height="83dp" | ||
11 | + android:layout_marginStart="16dp" | ||
12 | + android:layout_marginTop="16dp" | ||
13 | + android:layout_marginEnd="16dp" | ||
14 | + android:background="@drawable/solid_eff2_4" | ||
15 | + android:orientation="vertical"> | ||
16 | + | ||
17 | + <LinearLayout | ||
18 | + android:layout_width="match_parent" | ||
19 | + android:layout_height="wrap_content" | ||
20 | + android:orientation="horizontal"> | ||
21 | + | ||
22 | + <TextView | ||
23 | + android:id="@+id/tv_question_title" | ||
24 | + android:layout_width="wrap_content" | ||
25 | + android:layout_height="wrap_content" | ||
26 | + android:layout_marginStart="12dp" | ||
27 | + android:layout_marginTop="16dp" | ||
28 | + android:layout_weight="1" | ||
29 | + android:drawableStart="@mipmap/item_special_exercises_icon" | ||
30 | + android:drawablePadding="8dp" | ||
31 | + android:text="专项练习(焊工)" | ||
32 | + android:textColor="@color/color_32" | ||
33 | + android:textSize="14sp" /> | ||
34 | + | ||
35 | + <TextView | ||
36 | + android:layout_width="wrap_content" | ||
37 | + android:layout_height="wrap_content" | ||
38 | + android:layout_marginTop="18dp" | ||
39 | + android:layout_marginEnd="12dp" | ||
40 | + android:text="2020-09-10 12:00" | ||
41 | + android:textColor="@color/color_96" | ||
42 | + android:textSize="12sp" /> | ||
43 | + | ||
44 | + </LinearLayout> | ||
45 | + | ||
46 | + <TextView | ||
47 | + android:layout_width="wrap_content" | ||
48 | + android:layout_height="wrap_content" | ||
49 | + android:layout_marginStart="52dp" | ||
50 | + android:layout_marginTop="8dp" | ||
51 | + android:background="@drawable/solid_e3f1ff" | ||
52 | + android:paddingStart="8dp" | ||
53 | + android:paddingTop="2dp" | ||
54 | + android:paddingEnd="8dp" | ||
55 | + android:paddingBottom="2dp" | ||
56 | + android:text="答对:50/100" | ||
57 | + android:textColor="@color/color_25" | ||
58 | + android:textSize="12sp" /> | ||
59 | + | ||
60 | + | ||
61 | + </LinearLayout> | ||
62 | + | ||
63 | +</LinearLayout> |
2.7 KB
2.7 KB
297 字节
1.5 KB
1.3 KB
app/src/main/res/mipmap-xxhdpi/good.png
0 → 100644
8.1 KB
1.6 KB
15.0 KB
728 字节
1.5 KB
14.6 KB
app/src/main/res/mipmap-xxhdpi/not_pass.png
0 → 100644
8.5 KB
1 | <resources xmlns:tools="http://schemas.android.com/tools"> | 1 | <resources xmlns:tools="http://schemas.android.com/tools"> |
2 | <!-- Base application theme. --> | 2 | <!-- Base application theme. --> |
3 | - <style name="Theme.SecurityTrainMaster" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | 3 | + <style name="Theme.SecurityTrainMaster" parent="Theme.AppCompat.DayNight.NoActionBar"> |
4 | <!-- Primary brand color. --> | 4 | <!-- Primary brand color. --> |
5 | <item name="colorPrimary">@color/purple_200</item> | 5 | <item name="colorPrimary">@color/purple_200</item> |
6 | <item name="colorPrimaryVariant">@color/purple_700</item> | 6 | <item name="colorPrimaryVariant">@color/purple_700</item> |
@@ -24,5 +24,10 @@ | @@ -24,5 +24,10 @@ | ||
24 | <color name="color_33">#333333</color> | 24 | <color name="color_33">#333333</color> |
25 | <color name="color_eff2">#EFF2F6</color> | 25 | <color name="color_eff2">#EFF2F6</color> |
26 | <color name="color_10BE8A">#10BE8A</color> | 26 | <color name="color_10BE8A">#10BE8A</color> |
27 | + <color name="color_e8">#00E8A1</color> | ||
28 | + <color name="color_e9">#E9405A</color> | ||
29 | + <color name="color_f7">#F7F8FA</color> | ||
30 | + <color name="color_e3">#E3F1FF</color> | ||
31 | + <color name="color_dcdee0">#DCDEE0</color> | ||
27 | 32 | ||
28 | </resources> | 33 | </resources> |
1 | <resources xmlns:tools="http://schemas.android.com/tools"> | 1 | <resources xmlns:tools="http://schemas.android.com/tools"> |
2 | <!-- Base application theme. --> | 2 | <!-- Base application theme. --> |
3 | - <style name="Theme.SecurityTrainMaster" parent="Theme.MaterialComponents.Light.NoActionBar"> | 3 | + <style name="Theme.SecurityTrainMaster" parent="Theme.AppCompat.Light.NoActionBar"> |
4 | <!-- Primary brand color. --> | 4 | <!-- Primary brand color. --> |
5 | <item name="colorPrimary">@color/purple_500</item> | 5 | <item name="colorPrimary">@color/purple_500</item> |
6 | <item name="colorPrimaryVariant">@color/purple_700</item> | 6 | <item name="colorPrimaryVariant">@color/purple_700</item> |
-
请 注册 或 登录 后发表评论