作者 liyan

Merge branch 'master' of http://114.215.101.231:8099/liuzhen/security-android

 Conflicts:
	app/src/main/AndroidManifest.xml
	app/src/main/res/values/colors.xml
正在显示 34 个修改的文件 包含 779 行增加59 行删除
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
... ...
package com.br_technology.securitytrain_master.ui.bank
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.FragmentBankBinding
import com.br_technology.securitytrain_master.ui.bank.viewmodel.BankViewModel
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment
/**
* createTime:2021/7/27 15:47
* auth:张继
* des:
*/
class BankFragment :BaseLifeCycleFragment<BankViewModel,FragmentBankBinding>(FragmentBankBinding::inflate) {
override fun initDataObserver() {
}
}
\ No newline at end of file
package com.br_technology.securitytrain_master.ui.bank.activity
import android.view.View
import androidx.core.content.ContextCompat
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.ActivityPracticeBinding
import com.br_technology.securitytrain_master.ui.bank.adapter.TopicAdapter
import com.br_technology.securitytrain_master.ui.bank.viewmodel.PracticeViewModel
import com.br_technology.securitytrain_master.view.DialogSureCancel
import com.br_technology.securitytrain_master.view.DialogTitle
import com.br_technology.securitytrain_master.view.listener.DialogListener
import com.br_technology.securitytrain_master.view.listener.OnItemClickListener
import com.br_technology.securitytrain_master.view.listener.ToolBarClickListener
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
/**
* createTime:2021/7/30 15:06
* auth:张继
* des:每日一练
*/
class PracticeActivity :
BaseLifeCycleActivity<PracticeViewModel, ActivityPracticeBinding>(ActivityPracticeBinding::inflate) {
private val cancelDialog by lazy {
DialogSureCancel(this)
}
private val titleDialog by lazy {
DialogTitle(this)
}
override fun initData() {
super.initData()
binding.apply {
toolBar.setRightText("答题卡")
toolBar.setRightTextDrawable(
ContextCompat.getDrawable(
baseContext,
R.mipmap.answer_sheet
)
)
// 答题卡点击事件
toolBar.addRightListener(object : ToolBarClickListener {
override fun onClick(view: View) {
}
})
val topicAdapter = TopicAdapter()
topicAdapter.addListener(object : OnItemClickListener<String> {
override fun onClick(position: Int, data: String) {
topicAdapter.index = position
topicAdapter.notifyDataSetChanged()
}
})
val list = listOf(
"A.泰国奸商回收20万个“二手口罩”翻新出售",
"B.紧急呼叫丨江西539元贪污案宣判",
"C.往武汉送海鲜确诊!浙江男司机冲医生怒吼",
"D.17名驰援湖北“最美逆行者”",
)
topicRecycler.adapter = topicAdapter
topicAdapter.addList(list)
// 上一题
previous.setOnClickListener { }
// 下一题
next.setOnClickListener {
}
// 交卷
finishJob.setOnClickListener {
if (!cancelDialog.isShowing) {
cancelDialog.setTitle("您还有题未答完,是否确定提交?").show()
}
}
}
// 弹窗确定点击事件
cancelDialog.setListener(object : DialogListener {
override fun determine() {
cancelDialog.dismiss()
if (!titleDialog.isShowing) {
titleDialog.setTitleSpan("答对6道题").show()
}
}
})
// 标题弹窗
titleDialog.setListener(object : DialogListener {
override fun determine() {
finish()
}
})
}
override fun initDataObserver() {
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.bank.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.br_technology.securitytrain_master.base.view.BaseAdapter
import com.br_technology.securitytrain_master.databinding.AdapterPdfBinding
import com.br_technology.securitytrain_master.databinding.AdapterPracticeBinding
/**
* createTime:2021/7/30 14:40
* auth:张继
* des:
*/
class PracticeAdapter:BaseAdapter<String,AdapterPracticeBinding>() {
override fun getViewBinding(
context: Context,
parent: ViewGroup,
viewType: Int,
from: LayoutInflater
): AdapterPracticeBinding {
return AdapterPracticeBinding.inflate(from,parent,false)
}
override fun onBind(holder: AdapterPracticeBinding, position: Int, data: String) {
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.bank.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.base.view.BaseAdapter
import com.br_technology.securitytrain_master.databinding.AdapterTopicBinding
/**
* createTime:2021/7/30 15:45
* auth:张继
* des: 每日一练选择题列表适配器
*/
class TopicAdapter : BaseAdapter<String, AdapterTopicBinding>() {
var index: Int = -1
override fun getViewBinding(
context: Context,
parent: ViewGroup,
viewType: Int,
from: LayoutInflater
): AdapterTopicBinding {
return AdapterTopicBinding.inflate(from, parent, false)
}
override fun onBind(holder: AdapterTopicBinding, position: Int, data: String) {
holder.name.text = data
holder.name.setBackgroundResource(R.drawable.stroke_eb_4)
holder.name.setTextColor(ContextCompat.getColor(holder.root.context, R.color.color_32))
// 错误
if (position == 3 && index != -1) {
holder.name.setBackgroundResource(R.drawable.topic_back_error)
holder.name.setTextColor(ContextCompat.getColor(holder.root.context, R.color.color_e9))
}
// 选择与正确
if (position == index) {
holder.name.setBackgroundResource(R.drawable.solid_a2_4_08a2)
holder.name.setTextColor(ContextCompat.getColor(holder.root.context, R.color.color_e8))
}
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.bank.fragment
import com.br_technology.securitytrain_master.databinding.FragmentBankBinding
import com.br_technology.securitytrain_master.ui.bank.activity.PracticeActivity
import com.br_technology.securitytrain_master.ui.bank.adapter.PracticeAdapter
import com.br_technology.securitytrain_master.ui.bank.viewmodel.BankViewModel
import com.br_technology.securitytrain_master.view.ClassifyPop
import com.br_technology.securitytrain_master.view.listener.OnItemClickListener
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment
/**
* createTime:2021/7/27 15:47
* auth:张继
* des:全能题库
*/
class BankFragment :
BaseLifeCycleFragment<BankViewModel, FragmentBankBinding>(FragmentBankBinding::inflate) {
private val classifyPop by lazy {
ClassifyPop(requireActivity())
}
override fun initData() {
super.initData()
binding.apply {
// 标题栏类型
type.setOnClickListener {
if (!classifyPop.isShowing) {
classifyPop.showAsDropDown(it)
}
}
// 练习题列表
val practiceAdapter = PracticeAdapter()
practiceAdapter.addListener(object : OnItemClickListener<String> {
override fun onClick(position: Int, data: String) {
startActivity(PracticeActivity::class.java)
}
})
val list = listOf(
"",
"",
"",
"",
"",
"",
"",
)
practice.adapter = practiceAdapter
practiceAdapter.addList(list)
}
}
override fun initDataObserver() {
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.bank.repository
import androidx.lifecycle.MutableLiveData
import com.br_technology.securitytrain_master.base.common.State
import com.wjx.android.wanandroidmvvm.base.repository.ApiRepository
/**
* createTime:2021/7/27 15:49
* auth:张继
* des:
*/
class PracticeRepository(val loadState: MutableLiveData<State>):ApiRepository() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.bank.viewmodel
import com.br_technology.securitytrain_master.ui.bank.repository.PracticeRepository
import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
/**
* createTime:2021/7/27 15:48
* auth:张继
* des:
*/
class PracticeViewModel:BaseViewModel<PracticeRepository>() {
}
\ No newline at end of file
... ...
... ... @@ -3,9 +3,8 @@ package com.br_technology.securitytrain_master.ui.main
import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.ActivityMainBinding
import com.br_technology.securitytrain_master.ui.bank.BankFragment
import com.br_technology.securitytrain_master.ui.bank.fragment.BankFragment
import com.br_technology.securitytrain_master.ui.home.fragment.HomeFragment
import com.br_technology.securitytrain_master.ui.home.MineFragment
import com.br_technology.securitytrain_master.ui.main.viewmodel.MainViewModel
... ...
... ... @@ -2,7 +2,7 @@ package com.br_technology.securitytrain_master.ui.main.viewmodel
import androidx.fragment.app.Fragment
import androidx.lifecycle.MutableLiveData
import com.br_technology.securitytrain_master.ui.bank.BankFragment
import com.br_technology.securitytrain_master.ui.bank.fragment.BankFragment
import com.br_technology.securitytrain_master.ui.home.fragment.HomeFragment
import com.br_technology.securitytrain_master.ui.home.MineFragment
import com.br_technology.securitytrain_master.ui.main.repository.MainRepository
... ... @@ -18,7 +18,7 @@ class MainViewModel:BaseViewModel<MainRepository>() {
MutableLiveData()
}
init {
val list= listOf(HomeFragment(),BankFragment(),MineFragment())
val list= listOf(HomeFragment(), BankFragment(),MineFragment())
liveData.postValue(list as List<Fragment>?)
}
... ...
... ... @@ -6,6 +6,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.DialogSureCancelBinding
import com.br_technology.securitytrain_master.expand.dp2px
import com.br_technology.securitytrain_master.expand.screenWidth
import com.br_technology.securitytrain_master.view.listener.DialogListener
... ... @@ -17,17 +18,19 @@ import com.br_technology.securitytrain_master.view.listener.DialogListener
class DialogSureCancel(context: Context) : Dialog(context, R.style.UserDefaultDialog) {
private var listener: DialogListener? = null
private val binding by lazy {
DialogSureCancelBinding.inflate(LayoutInflater.from(context))
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val inflate = DialogSureCancelBinding.inflate(LayoutInflater.from(context))
setContentView(inflate.root)
setContentView(binding.root)
val attributes = window?.attributes
attributes?.width = inflate.root.screenWidth() - 160
attributes?.width = binding.root.screenWidth() - 40.dp2px()
// 点击区域外不取消
setCanceledOnTouchOutside(false)
inflate.apply {
binding.apply {
// 取消
cancel.setOnClickListener {
dismiss()
... ... @@ -39,9 +42,15 @@ class DialogSureCancel(context: Context) : Dialog(context, R.style.UserDefaultDi
}
}
fun setListener(listener: DialogListener):DialogSureCancel {
fun setListener(listener: DialogListener): DialogSureCancel {
this.listener = listener
return this
}
fun setTitle(title: String): DialogSureCancel {
binding.title.text = title
return this
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.view
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.text.Spannable
import android.text.SpannableString
import android.text.style.AbsoluteSizeSpan
import android.text.style.ForegroundColorSpan
import android.view.LayoutInflater
import androidx.core.content.ContextCompat
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.DialogTitleBinding
import com.br_technology.securitytrain_master.expand.dp2px
import com.br_technology.securitytrain_master.expand.screenWidth
import com.br_technology.securitytrain_master.view.listener.DialogListener
/**
* createTime:2021/7/28 13:45
* auth:张继
* des:
*/
class DialogTitle(context: Context) : Dialog(context, R.style.UserDefaultDialog) {
private var listener: DialogListener? = null
private val binding by lazy {
DialogTitleBinding.inflate(LayoutInflater.from(context))
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
val attributes = window?.attributes
attributes?.width = binding.root.screenWidth() - 40.dp2px()
// 点击区域外不取消
setCanceledOnTouchOutside(false)
binding.apply {
// 确定
complete.setOnClickListener {
listener?.determine()
}
}
}
fun setListener(listener: DialogListener): DialogTitle {
this.listener = listener
return this
}
fun setTitleSpan(title: String): DialogTitle {
val span: Spannable = SpannableString(title)
span.setSpan(
AbsoluteSizeSpan(36.dp2px()),
2,
title.length - 2,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
span.setSpan(
ForegroundColorSpan(ContextCompat.getColor(context, R.color.color_25)),
2,
title.length - 2,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
);
binding.title.text = span
return this
}
fun setTitle(title: String): DialogTitle {
binding.title.text = title
return this
}
}
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#0800E8A2" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_25" />
<corners android:topLeftRadius="4dp" android:topRightRadius="4dp"/>
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:color="@color/color_e8"
android:width="1dp" />
<corners android:radius="4dp" />
<solid android:color="#0800E8A2" />
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#08E9405A" />
<stroke
android:width="1dp"
android:color="@color/color_e9" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/logo"
android:scaleType="fitXY"
android:src="@mipmap/practice_back" />
<include layout="@layout/layout_tool_bar" />
<com.br_technology.securitytrain_master.view.ViewToolBar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/status_bar"
app:toolTitle="每日一练" />
<TextView
android:id="@+id/topic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tool_bar"
android:layout_margin="16dp"
android:text="(1/9)男子从国外赶回陪产,回家第二天被隔离:孩子出生了我却见不到?"
android:textColor="@color/color_25"
android:textSize="18sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/topic_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/topic"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:paddingBottom="12dp"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="@color/color_f7" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="115dp"
android:layout_height="40dp"
android:layout_marginTop="24dp"
android:background="@drawable/solid_a2_4_08a2"
android:gravity="center"
android:text="正确答案:B"
android:textColor="@color/color_e8"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="解析:首例境外输入病例详情!穿越大半个中国,飞机、火车、出租车全坐过"
android:textColor="@color/color_96"
android:textSize="14sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_f7" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/previous"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@mipmap/previous"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="上一题"
android:textColor="@color/color_25"
android:textSize="14sp" />
<View
android:layout_width="40dp"
android:layout_height="match_parent" />
<TextView
android:id="@+id/next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableEnd="@mipmap/next"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="下一题"
android:textColor="@color/color_25"
android:textSize="14sp" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:id="@+id/finish_job"
android:layout_width="104dp"
android:layout_height="44dp"
android:background="@drawable/solid_25_4"
android:gravity="center"
android:text="交卷"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="54dp"
android:layout_marginBottom="12dp"
android:background="@drawable/stroke_eb_4"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:contentDescription="@string/logo"
android:src="@mipmap/txt" />
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:text="三岗练习"
android:textColor="@color/color_32"
android:textSize="14sp" />
<TextView
android:id="@+id/num"
android:layout_width="60dp"
android:layout_height="28dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:background="@drawable/solid_25_4"
android:drawableEnd="@mipmap/paly_white"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="12dp"
android:paddingEnd="5dp"
android:text="20题"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:gravity="center_vertical"
android:minHeight="62dp"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textSize="14sp" />
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="@drawable/solid_ff_8"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="@drawable/solid_top_25_4">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:contentDescription="@string/logo"
android:src="@mipmap/dialog_title" />
</FrameLayout>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:gravity="center"
android:text="答对6道题" />
<TextView
android:id="@+id/complete"
android:layout_width="118dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="32dp"
android:layout_marginBottom="24dp"
android:background="@drawable/solid_25_4"
android:gravity="center"
android:text="完成"
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/layout_tool_bar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<ImageView
android:layout_width="87dp"
android:layout_height="26dp"
android:layout_gravity="center_vertical"
android:background="@color/color_96"
android:contentDescription="@string/logo" />
<EditText
android:id="@+id/search_edit"
android:layout_width="0dp"
android:layout_height="32dp"
android:layout_weight="1"
android:background="@drawable/stroke_25_4"
android:drawableStart="@mipmap/search"
android:drawablePadding="12dp"
android:hint="搜索"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="10dp"
android:textColor="@color/color_25"
android:textColorHint="@color/color_4025"
android:textSize="14sp" />
<TextView
android:id="@+id/type"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="40dp"
android:drawableEnd="@mipmap/down_arrow"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:text="焊工"
android:textColor="@color/color_32"
android:textSize="14sp" />
</LinearLayout>
<RelativeLayout
android:id="@+id/search"
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:overScrollMode="never"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:background="@drawable/search_back">
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/mock_exam"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/mock_exam" />
<ImageView
android:id="@+id/practice_daily"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/practice_daily" />
<ImageView
android:id="@+id/challenge_answer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@mipmap/challenge_answer" />
</LinearLayout>
<FrameLayout
android:id="@+id/leaderboard_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:background="@color/color_e3">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:contentDescription="@string/logo"
android:src="@mipmap/leaderboard" />
<TextView
android:id="@+id/leaderboard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:layout_marginEnd="16dp"
android:drawableEnd="@mipmap/arrow_right_25"
android:text="1845人参与"
android:textColor="@color/color_25"
android:textSize="12sp" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="搜索"
android:textColor="@color/white"
android:textSize="14sp" />
<ImageView
android:layout_width="40dp"
android:layout_height="28dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="2dp"
android:background="@drawable/solid_ff_14"
android:contentDescription="@string/logo"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:src="@mipmap/search" />
</RelativeLayout>
</LinearLayout>
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="16dp"
android:text="专项练习"
android:textColor="@color/color_32"
android:textSize="18sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/practice"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<FrameLayout
android:id="@+id/change"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="6dp"
android:background="@drawable/solid_eff2_4">
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center"
android:drawableEnd="@mipmap/change"
android:drawablePadding="4dp"
android:gravity="center"
android:text="换一换"
android:textColor="@color/color_25"
android:textSize="12sp" />
</FrameLayout>
</LinearLayout>
\ No newline at end of file
... ...