Compare commits
3 Commits
2.3.0_Test
...
master
Author | SHA1 | Date | |
---|---|---|---|
524270dde7 | |||
f80c23c90a | |||
37a9c0968f |
|
@ -32,7 +32,7 @@ android {
|
|||
minSdkVersion 23
|
||||
targetSdkVersion 33
|
||||
versionCode 28
|
||||
versionName "2.1.1 Test(2024-7-20)"
|
||||
versionName "2.3.0 Test(2025-One)"//第一季度 One 第二季度 Two 第三季度 Three 第四季度 Four
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
@ -180,8 +180,8 @@ dependencies {
|
|||
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||
|
||||
// Android智能下拉刷新框架-SmartRefreshLayout
|
||||
implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0' //核心必须依赖
|
||||
implementation 'io.github.scwang90:refresh-header-classics:2.1.0' //经典刷新头
|
||||
implementation 'io.github.scwang90:refresh-footer-classics:2.1.0' //经典加载
|
||||
implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0' //核心必须依赖
|
||||
implementation 'io.github.scwang90:refresh-header-classics:2.1.0' //经典刷新头
|
||||
implementation 'io.github.scwang90:refresh-footer-classics:2.1.0' //经典加载
|
||||
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
package com.coldmint.rust.pro
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.view.*
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
import com.coldmint.rust.core.dataBean.AppUpdateData
|
||||
import com.coldmint.rust.core.tool.AppOperator
|
||||
|
@ -15,8 +17,10 @@ import com.coldmint.rust.pro.adapters.ModPageDetailsAdapter
|
|||
import com.coldmint.rust.pro.base.BaseActivity
|
||||
import com.coldmint.rust.pro.databinding.ActivityWebModInfoBinding
|
||||
import com.coldmint.rust.pro.databinding.LoadFileLayoutBinding
|
||||
import com.coldmint.rust.pro.fragments.WebModDetailsFragment
|
||||
import com.coldmint.rust.pro.tool.AppSettings
|
||||
import com.coldmint.rust.pro.tool.GlobalMethod
|
||||
import com.coldmint.rust.pro.tool.Tools
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.google.gson.Gson
|
||||
|
@ -29,8 +33,8 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
lateinit var tip: String
|
||||
val targetFile: File by lazy {
|
||||
val modFolderPath = AppSettings.getValue(
|
||||
AppSettings.Setting.ModFolder,
|
||||
Environment.getExternalStorageDirectory().absolutePath + "/rustedWarfare/units/"
|
||||
AppSettings.Setting.ModFolder,
|
||||
Environment.getExternalStorageDirectory().absolutePath + "/rustedWarfare/units/"
|
||||
)
|
||||
val modFolder = File(modFolderPath)
|
||||
if (!modFolder.exists()) {
|
||||
|
@ -44,6 +48,10 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
}
|
||||
lateinit var adapter: ModPageDetailsAdapter
|
||||
|
||||
val modName: MutableLiveData<String> by lazy {
|
||||
MutableLiveData()
|
||||
}
|
||||
@SuppressLint("CommitTransaction")
|
||||
private fun initView() {
|
||||
setReturnButton()
|
||||
val activityIntent = intent
|
||||
|
@ -64,27 +72,52 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
viewBinding.button.isEnabled = false
|
||||
viewBinding.button.text = getString(R.string.installated)
|
||||
}
|
||||
adapter = ModPageDetailsAdapter(this, modId)
|
||||
adapter.modName.observe(this) {
|
||||
modName.observe(this) {
|
||||
title = it
|
||||
}
|
||||
val webModDetailsFragment = WebModDetailsFragment(modId, modName)
|
||||
// 检测是否处于平板模式
|
||||
if (Tools.isTabletMode(this)) {
|
||||
adapter = ModPageDetailsAdapter(this, modId)
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment,webModDetailsFragment)
|
||||
.commit()
|
||||
viewBinding.viewPager2.adapter = adapter
|
||||
TabLayoutMediator(viewBinding.tabLayout, viewBinding.viewPager2) { tab, i ->
|
||||
tab.text = when (i) {
|
||||
0 -> {
|
||||
getString(R.string.details)
|
||||
TabLayoutMediator(viewBinding.tabLayout, viewBinding.viewPager2) { tab, i ->
|
||||
tab.text = when (i) {
|
||||
0 -> {
|
||||
getString(R.string.insert_coins)
|
||||
}
|
||||
1 -> {
|
||||
getString(R.string.discussion)
|
||||
}else -> {
|
||||
getString(R.string.title)
|
||||
}
|
||||
}
|
||||
1 -> {
|
||||
getString(R.string.insert_coins)
|
||||
}.attach()
|
||||
} else {
|
||||
adapter = ModPageDetailsAdapter(this, modId, webModDetailsFragment)
|
||||
viewBinding.viewPager2.adapter = adapter
|
||||
TabLayoutMediator(viewBinding.tabLayout, viewBinding.viewPager2) { tab, i ->
|
||||
tab.text = when (i) {
|
||||
0 -> {
|
||||
getString(R.string.details)
|
||||
}
|
||||
|
||||
1 -> {
|
||||
getString(R.string.insert_coins)
|
||||
}
|
||||
|
||||
2 -> {
|
||||
getString(R.string.discussion)
|
||||
}
|
||||
|
||||
else -> {
|
||||
getString(R.string.title)
|
||||
}
|
||||
}
|
||||
2 -> {
|
||||
getString(R.string.discussion)
|
||||
}
|
||||
else -> {
|
||||
getString(R.string.title)
|
||||
}
|
||||
}
|
||||
}.attach()
|
||||
}.attach()
|
||||
}
|
||||
viewBinding.button.setOnClickListener {
|
||||
val type = viewBinding.button.text
|
||||
val installation = getString(R.string.installation)
|
||||
|
@ -111,25 +144,27 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
when (AppOperator.getNetworkType(this)) {
|
||||
AppOperator.NetWorkType.NetWorkType_Moble -> {
|
||||
val useMobileNetWork =
|
||||
AppSettings.getValue(AppSettings.Setting.UseMobileNetwork, false)
|
||||
AppSettings.getValue(AppSettings.Setting.UseMobileNetwork, false)
|
||||
if (useMobileNetWork) {
|
||||
downloadWork(fileLink)
|
||||
} else {
|
||||
CoreDialog(this).setTitle(R.string.using_mobile_networks)
|
||||
.setMessage(R.string.using_mobile_networks_msg)
|
||||
.setPositiveButton(R.string.only_one) {
|
||||
downloadWork(fileLink)
|
||||
}.setNegativeButton(R.string.always_allow) {
|
||||
AppSettings.setValue(AppSettings.Setting.UseMobileNetwork, true)
|
||||
downloadWork(fileLink)
|
||||
}.setNeutralButton(R.string.dialog_cancel) {
|
||||
.setMessage(R.string.using_mobile_networks_msg)
|
||||
.setPositiveButton(R.string.only_one) {
|
||||
downloadWork(fileLink)
|
||||
}.setNegativeButton(R.string.always_allow) {
|
||||
AppSettings.setValue(AppSettings.Setting.UseMobileNetwork, true)
|
||||
downloadWork(fileLink)
|
||||
}.setNeutralButton(R.string.dialog_cancel) {
|
||||
|
||||
}.show()
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
|
||||
AppOperator.NetWorkType.NetWorkType_Wifi -> {
|
||||
downloadWork(fileLink)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
|
||||
|
@ -143,14 +178,15 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
}
|
||||
|
||||
|
||||
@SuppressLint("StringFormatInvalid")
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.report_item -> {
|
||||
if (token.isBlank()) {
|
||||
Snackbar.make(
|
||||
viewBinding.button,
|
||||
R.string.please_login_first,
|
||||
Snackbar.LENGTH_SHORT
|
||||
viewBinding.button,
|
||||
R.string.please_login_first,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
return true
|
||||
}
|
||||
|
@ -165,29 +201,32 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
} else {
|
||||
//不能举报未公开的模组
|
||||
Snackbar.make(
|
||||
viewBinding.button,
|
||||
R.string.unable_to_report,
|
||||
Snackbar.LENGTH_SHORT
|
||||
viewBinding.button,
|
||||
R.string.unable_to_report,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
R.id.share_item -> {
|
||||
val link = AppSettings.getValue(AppSettings.Setting.ServerAddress, "")
|
||||
val updateData = AppSettings.getValue(AppSettings.Setting.UpdateData, "")
|
||||
var appUpdateLink = ""
|
||||
if (!updateData.isNullOrBlank()) {
|
||||
if (updateData.isNotBlank()) {
|
||||
val gson = Gson()
|
||||
val updateDataObj = gson.fromJson(updateData, AppUpdateData.Data::class.java)
|
||||
appUpdateLink = updateDataObj.link
|
||||
}
|
||||
|
||||
val s = String.format(
|
||||
getString(R.string.share_mod_msg),
|
||||
title,
|
||||
link + "website/pages/modPage.php?&modId=" + modId, appUpdateLink
|
||||
getString(R.string.share_mod_msg),
|
||||
title,
|
||||
link + "website/pages/modPage.php?&modId=" + modId, appUpdateLink
|
||||
)
|
||||
|
||||
AppOperator.shareText(this, getString(R.string.share_mod), s)
|
||||
}
|
||||
|
||||
R.id.update_record -> {
|
||||
GlobalMethod.showUpdateLog(this, modId)
|
||||
}
|
||||
|
@ -215,7 +254,7 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
val numberFormat = NumberFormat.getNumberInstance()
|
||||
numberFormat.maximumFractionDigits = 2
|
||||
val trueProgress =
|
||||
numberFormat.format(bytesRead.toDouble() / contentLength.toDouble() * 100)
|
||||
numberFormat.format(bytesRead.toDouble() / contentLength.toDouble() * 100)
|
||||
progress = trueProgress.toFloat().toInt()
|
||||
runOnUiThread {
|
||||
val progressTip = String.format(tip, progress)
|
||||
|
@ -319,12 +358,12 @@ class WebModInfoActivity : BaseActivity<ActivityWebModInfoBinding>() {
|
|||
*/
|
||||
fun gotoUserPage(userId: String) {
|
||||
val intent = Intent(
|
||||
this@WebModInfoActivity,
|
||||
UserHomePageActivity::class.java
|
||||
this@WebModInfoActivity,
|
||||
UserHomePageActivity::class.java
|
||||
)
|
||||
intent.putExtra("userId", userId)
|
||||
startActivity(
|
||||
intent
|
||||
intent
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -15,19 +15,18 @@ import com.coldmint.rust.pro.fragments.WebModDetailsFragment
|
|||
* 模组详情页面适配器
|
||||
* @constructor
|
||||
*/
|
||||
class ModPageDetailsAdapter(fragmentActivity: FragmentActivity, val modId: String) :
|
||||
FragmentStateAdapter(fragmentActivity) {
|
||||
class ModPageDetailsAdapter(fragmentActivity: FragmentActivity, val modId: String, var A: WebModDetailsFragment? = null) :
|
||||
FragmentStateAdapter(fragmentActivity) {
|
||||
private lateinit var webModDetailsFragment: WebModDetailsFragment
|
||||
private lateinit var modCommentsFragment: ModCommentsFragment
|
||||
override fun getItemCount(): Int {
|
||||
return 3
|
||||
}
|
||||
if (A == null) {
|
||||
return 2
|
||||
} else
|
||||
return 3
|
||||
|
||||
val modName: MutableLiveData<String> by lazy {
|
||||
MutableLiveData()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取下载链接
|
||||
* @return String?
|
||||
|
@ -55,25 +54,48 @@ class ModPageDetailsAdapter(fragmentActivity: FragmentActivity, val modId: Strin
|
|||
}
|
||||
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
return when (position) {
|
||||
0 -> {
|
||||
if (!this::webModDetailsFragment.isInitialized) {
|
||||
webModDetailsFragment = WebModDetailsFragment(modId, modName)
|
||||
if (A == null) {
|
||||
return when (position) {
|
||||
0 -> {
|
||||
InsertCoinsFragment(modId)
|
||||
}
|
||||
webModDetailsFragment
|
||||
}
|
||||
1 -> {
|
||||
InsertCoinsFragment(modId)
|
||||
}
|
||||
2 -> {
|
||||
if (!this::modCommentsFragment.isInitialized) {
|
||||
modCommentsFragment = ModCommentsFragment(modId)
|
||||
|
||||
1 -> {
|
||||
if (!this::modCommentsFragment.isInitialized) {
|
||||
modCommentsFragment = ModCommentsFragment(modId)
|
||||
}
|
||||
modCommentsFragment
|
||||
}else -> {
|
||||
NullFragment()
|
||||
}
|
||||
modCommentsFragment
|
||||
}
|
||||
else -> {
|
||||
NullFragment()
|
||||
|
||||
} else {
|
||||
return when (position) {
|
||||
0 -> {
|
||||
if (!this::webModDetailsFragment.isInitialized) {
|
||||
webModDetailsFragment = A as WebModDetailsFragment
|
||||
}
|
||||
webModDetailsFragment
|
||||
}
|
||||
|
||||
1 -> {
|
||||
InsertCoinsFragment(modId)
|
||||
}
|
||||
|
||||
2 -> {
|
||||
if (!this::modCommentsFragment.isInitialized) {
|
||||
modCommentsFragment = ModCommentsFragment(modId)
|
||||
}
|
||||
modCommentsFragment
|
||||
}else -> {
|
||||
NullFragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// else -> {
|
||||
// NullFragment()
|
||||
// }
|
||||
}
|
||||
}
|
|
@ -8,7 +8,9 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.coldmint.rust.pro.R
|
||||
import com.coldmint.rust.pro.adapters.CommunityAdapter
|
||||
import com.coldmint.rust.pro.tool.Tools
|
||||
import com.google.android.material.navigation.NavigationBarView
|
||||
import com.google.android.material.navigationrail.NavigationRailView
|
||||
|
||||
class CommunityFragment : Fragment() {
|
||||
|
||||
|
@ -19,9 +21,6 @@ class CommunityFragment : Fragment() {
|
|||
if (!isAdded) {
|
||||
return
|
||||
}
|
||||
/* else {
|
||||
viewBinding.pager.postDelayed({ loadTab() }, MainActivity.linkInterval)
|
||||
}*/
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
|
@ -29,7 +28,6 @@ class CommunityFragment : Fragment() {
|
|||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
val inflate = inflater.inflate(R.layout.fragment_community, container, false)
|
||||
|
||||
onViewCreated(inflate)
|
||||
return inflate
|
||||
|
||||
|
@ -38,6 +36,10 @@ class CommunityFragment : Fragment() {
|
|||
private fun onViewCreated(view: View) {
|
||||
val navigationBarView : NavigationBarView = view.findViewById(R.id.bottomnavigationView)
|
||||
val pager : ViewPager2 = view.findViewById(R.id.pager)
|
||||
if (Tools.isTabletMode(requireContext())) {
|
||||
// var navigation = navigationBarView as NavigationRailView
|
||||
// navigation.setonc
|
||||
}
|
||||
pager.adapter = CommunityAdapter(this)
|
||||
pager.isSaveEnabled = false
|
||||
pager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||
|
@ -76,46 +78,4 @@ class CommunityFragment : Fragment() {
|
|||
true
|
||||
}
|
||||
}
|
||||
// override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
// viewBinding.pager.adapter = CommunityAdapter(this)
|
||||
// viewBinding.pager.isSaveEnabled = false
|
||||
// viewBinding.pager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||
// override fun onPageSelected(position: Int) {
|
||||
// when (position) {
|
||||
// 0 -> {
|
||||
// viewBinding.bottomnavigationView.selectedItemId = R.id.action_recommended
|
||||
// }
|
||||
// 1 -> {
|
||||
// viewBinding.bottomnavigationView.selectedItemId = R.id.action_follow
|
||||
// }
|
||||
// 2 -> {
|
||||
// viewBinding.bottomnavigationView.selectedItemId = R.id.action_ranking
|
||||
// }
|
||||
// 3 -> {
|
||||
// viewBinding.bottomnavigationView.selectedItemId = R.id.action_my
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// viewBinding.bottomnavigationView.setOnItemSelectedListener {
|
||||
// when (it.itemId) {
|
||||
// R.id.action_recommended -> {
|
||||
// viewBinding.pager.currentItem = 0
|
||||
// }
|
||||
// R.id.action_follow -> {
|
||||
// viewBinding.pager.currentItem = 1
|
||||
// }
|
||||
// R.id.action_ranking -> {
|
||||
// viewBinding.pager.currentItem = 2
|
||||
// }
|
||||
// R.id.action_my -> {
|
||||
// viewBinding.pager.currentItem = 3
|
||||
// }
|
||||
// }
|
||||
// true
|
||||
// }
|
||||
//
|
||||
//
|
||||
// loadTab()
|
||||
// }
|
||||
}
|
|
@ -42,6 +42,7 @@ class ModCommentsFragment(val modId: String) : BaseFragment<FragmentModCommentsB
|
|||
viewBinding.recyclerView.addItemDecoration(
|
||||
divider
|
||||
)
|
||||
//刷新评论区
|
||||
viewBinding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadCommentList(modId, false)
|
||||
viewBinding.swipeRefreshLayout.isRefreshing = false
|
||||
|
|
|
@ -87,7 +87,6 @@ class RankingFragment : BaseFragment<FragmentRankingBinding>() {
|
|||
private fun loadMods() {
|
||||
viewBinding.progressBar.isVisible = true
|
||||
viewBinding.textview.isVisible = false
|
||||
// viewBinding.swipeRefreshLayout.isVisible = false
|
||||
WebMod.instance.list(object : ApiCallBack<WebModListData> {
|
||||
override fun onResponse(t: WebModListData) {
|
||||
if (!isAdded) {
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.coldmint.rust.pro.fragments
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.isVisible
|
||||
import com.bumptech.glide.Glide
|
||||
import com.coldmint.dialog.CoreDialog
|
||||
|
@ -28,6 +26,7 @@ import com.youth.banner.adapter.BannerImageAdapter
|
|||
import com.youth.banner.holder.BannerImageHolder
|
||||
import com.youth.banner.indicator.CircleIndicator
|
||||
|
||||
|
||||
class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
|
||||
|
||||
/**
|
||||
|
@ -67,32 +66,34 @@ class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
|
|||
/**
|
||||
* 加载随机推荐
|
||||
*/
|
||||
fun loadRandomRecommended() {
|
||||
private fun loadRandomRecommended() {
|
||||
viewBinding.randomRecommendedProgressIndicator.isVisible = true
|
||||
WebMod.instance.randomRecommended(6, object : ApiCallBack<WebModListData> {
|
||||
override fun onResponse(t: WebModListData) {
|
||||
val data = t.data?.toMutableList()
|
||||
if (data == null || data.isEmpty()) {
|
||||
if (data.isNullOrEmpty()) {
|
||||
viewBinding.randomRecommendedProgressIndicator.isVisible = false
|
||||
viewBinding.swipeRefreshLayout.isRefreshing = false
|
||||
} else {
|
||||
viewBinding.randomRecommendedProgressIndicator.isVisible = false
|
||||
viewBinding.randomRecommendedView.isVisible = true
|
||||
viewBinding.randomRecommendedView.adapter = createAdapter(data)
|
||||
viewBinding.swipeRefreshLayout.isRefreshing = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(e: Exception) {
|
||||
e.printStackTrace()
|
||||
viewBinding.randomRecommendedProgressIndicator.isVisible = false
|
||||
viewBinding.swipeRefreshLayout.isRefreshing = false
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载个性化推荐
|
||||
*/
|
||||
fun loadSoleRecommended() {
|
||||
private fun loadSoleRecommended() {
|
||||
viewBinding.soleRecommendedCardView.isVisible = false
|
||||
viewBinding.soleRecommendedProgressIndicator.isVisible = true
|
||||
val account = AppSettings.getValue(AppSettings.Setting.Account, "")
|
||||
|
@ -123,17 +124,17 @@ class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
|
|||
/**
|
||||
* 加载轮播图数据
|
||||
*/
|
||||
fun loadBannerData() {
|
||||
private fun loadBannerData() {
|
||||
BannerManager.instance.getItems(object : ApiCallBack<BannerItemDataBean> {
|
||||
override fun onResponse(t: BannerItemDataBean) {
|
||||
if (t.code == ServerConfiguration.Success_Code) {
|
||||
val dataList = t.data
|
||||
if (dataList != null && dataList.isNotEmpty()) {
|
||||
if (!dataList.isNullOrEmpty()) {
|
||||
val forever =
|
||||
AppSettings.getValue(
|
||||
AppSettings.Setting.ExpirationTime,
|
||||
0.toLong()
|
||||
) == (-2).toLong()
|
||||
AppSettings.getValue(
|
||||
AppSettings.Setting.ExpirationTime,
|
||||
0.toLong()
|
||||
) == (-2).toLong()
|
||||
val textStyleMaker = TextStyleMaker.instance
|
||||
val showList = dataList.filter {
|
||||
var show = true
|
||||
|
@ -145,31 +146,31 @@ class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
|
|||
show
|
||||
}
|
||||
viewBinding.banner.setAdapter(object :
|
||||
BannerImageAdapter<BannerItemDataBean.Data>(showList) {
|
||||
BannerImageAdapter<BannerItemDataBean.Data>(showList) {
|
||||
override fun onBindView(
|
||||
holder: BannerImageHolder?,
|
||||
data: BannerItemDataBean.Data?,
|
||||
position: Int,
|
||||
size: Int
|
||||
holder: BannerImageHolder?,
|
||||
data: BannerItemDataBean.Data?,
|
||||
position: Int,
|
||||
size: Int
|
||||
) {
|
||||
if (holder != null && data != null) {
|
||||
Glide.with(holder.itemView).load(data.picture)
|
||||
.apply(GlobalMethod.getRequestOptions())
|
||||
.into(holder.imageView)
|
||||
.apply(GlobalMethod.getRequestOptions())
|
||||
.into(holder.imageView)
|
||||
holder.imageView.setOnClickListener {
|
||||
val type = textStyleMaker.getType(data.link)
|
||||
val linkData = textStyleMaker.getData(data.link)
|
||||
if (type == null || linkData == null) {
|
||||
CoreDialog(requireContext()).setTitle(data.title)
|
||||
.setMessage(data.link)
|
||||
.setPositiveButton(R.string.dialog_ok) {
|
||||
.setMessage(data.link)
|
||||
.setPositiveButton(R.string.dialog_ok) {
|
||||
|
||||
}.setCancelable(false).show()
|
||||
}.setCancelable(false).show()
|
||||
} else {
|
||||
textStyleMaker.clickEvent(
|
||||
requireContext(),
|
||||
type,
|
||||
linkData
|
||||
requireContext(),
|
||||
type,
|
||||
linkData
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -231,11 +232,16 @@ class RecommendedFragment : BaseFragment<FragmentRecommendedBinding>() {
|
|||
override fun whenViewCreated(inflater: LayoutInflater, savedInstanceState: Bundle?) {
|
||||
viewBinding.latestReleaseView.layoutManager = ScrollLinearLayoutManager(requireContext())
|
||||
viewBinding.soleRecommendedRecyclerView.layoutManager =
|
||||
ScrollLinearLayoutManager(requireContext())
|
||||
ScrollLinearLayoutManager(requireContext())
|
||||
viewBinding.randomRecommendedView.layoutManager = ScrollLinearLayoutManager(requireContext())
|
||||
loadRandomRecommended()
|
||||
viewBinding.changeRandomRecommended.setOnClickListener {
|
||||
// 下拉刷新随机推荐的模组
|
||||
viewBinding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadRandomRecommended()
|
||||
}
|
||||
// 动态设置Banner高度
|
||||
viewBinding.bannerCardView.layoutParams.height = (resources.displayMetrics.heightPixels / 2.5).toInt()
|
||||
viewBinding.bannerCardView.requestLayout()
|
||||
|
||||
}
|
||||
}
|
19
app/src/main/java/com/coldmint/rust/pro/tool/Tools.kt
Normal file
19
app/src/main/java/com/coldmint/rust/pro/tool/Tools.kt
Normal file
|
@ -0,0 +1,19 @@
|
|||
package com.coldmint.rust.pro.tool
|
||||
|
||||
import android.app.UiModeManager
|
||||
import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import androidx.core.content.ContextCompat.getSystemService
|
||||
|
||||
|
||||
class Tools {
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 判断是否为平板
|
||||
*/
|
||||
fun isTabletMode(context: Context): Boolean {
|
||||
return context.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
|
||||
}
|
||||
}
|
||||
}
|
71
app/src/main/res/layout-land/activity_web_mod_info.xml
Normal file
71
app/src/main/res/layout-land/activity_web_mod_info.xml
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
tools:context=".WebModInfoActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"/>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent">
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="投币" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="评论" />
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/installation"
|
||||
app:icon="@drawable/cloud_download" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -15,11 +15,4 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- <com.google.android.material.bottomnavigation.BottomNavigationView-->
|
||||
<!-- android:id="@+id/bottomnavigationView"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:menu="@menu/menu_main_bottom" />-->
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".WebModInfoActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
@ -14,7 +13,7 @@
|
|||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_collapseMode="pin" />
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
|
@ -66,16 +64,23 @@
|
|||
android:id="@+id/linearProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true"
|
||||
android:layout_marginTop="8dp" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:visibility="gone"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/loadLayout"
|
||||
|
@ -85,13 +90,13 @@
|
|||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:text="@string/no_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:context=".fragments.ModCommentsFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -38,18 +38,24 @@
|
|||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/linearProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="invisible"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true"
|
||||
android:visibility="invisible" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:visibility="gone"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isScrollContainer="true"
|
||||
android:visibility="gone" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noContentLayout"
|
||||
|
@ -64,4 +70,4 @@
|
|||
android:text="@string/no_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -87,8 +87,7 @@
|
|||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
android:background="#fff" />
|
||||
android:overScrollMode="ifContentScrolls" />
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?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"
|
||||
xmlns:card_view="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:animateLayoutChanges="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -21,142 +22,151 @@
|
|||
android:text="@string/info"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nestedScrollView"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="visible">
|
||||
<LinearLayout
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nestedScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
app:banner_indicator_selected_color="?attr/colorPrimary" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:fillViewport="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/bannerCardView"
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp">
|
||||
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:banner_indicator_selected_color="?attr/colorPrimary" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="0dp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/random_recommended" />
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/changeRandomRecommended"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/random_recommended" />
|
||||
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/changeRandomRecommended"-->
|
||||
<!-- style="@style/Widget.Material3.Button.TextButton"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="@string/change_random_recommended"-->
|
||||
<!-- card_view:ignore="RelativeOverlap" />-->
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/randomRecommendedProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/change_random_recommended"
|
||||
card_view:ignore="RelativeOverlap" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/randomRecommendedView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/randomRecommendedProgressIndicator"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/latest_release" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/latestReleaseProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/randomRecommendedView"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/latestReleaseView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/soleRecommendedCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:visibility="gone" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pay_attention_new" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/soleRecommendedProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/soleRecommendedRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/latest_release" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/latestReleaseProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/latestReleaseView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:layout_marginTop="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/soleRecommendedCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pay_attention_new" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/soleRecommendedProgressIndicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/soleRecommendedRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="false"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:layout_marginTop="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user