init
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
53
app/build.gradle.kts
Normal file
@ -0,0 +1,53 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
android {
|
||||
namespace = "com.tools.device.devcheck"
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.tools.device.devcheck.test"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
buildFeatures{
|
||||
viewBinding = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.appcompat)
|
||||
implementation(libs.material)
|
||||
implementation(libs.androidx.activity)
|
||||
implementation(libs.androidx.constraintlayout)
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.androidx.junit)
|
||||
androidTestImplementation(libs.androidx.espresso.core)
|
||||
implementation ("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||
implementation ("androidx.gridlayout:gridlayout:1.0.0")
|
||||
implementation ("com.google.android.material:material:1.12.0")
|
||||
}
|
||||
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@ -0,0 +1,24 @@
|
||||
package com.tools.device.devcheck
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.tools.device.devcheck", appContext.packageName)
|
||||
}
|
||||
}
|
||||
27
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.DevCheck"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity
|
||||
android:name=".main.MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,34 @@
|
||||
package com.tools.device.devcheck.base
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.tools.device.devcheck.R
|
||||
|
||||
abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() {
|
||||
|
||||
protected lateinit var binding: VB
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
binding = inflateBinding(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||
insets
|
||||
}
|
||||
initView()
|
||||
initData()
|
||||
}
|
||||
|
||||
protected abstract fun inflateBinding(inflater: LayoutInflater): VB
|
||||
|
||||
protected open fun initView() {}
|
||||
|
||||
protected open fun initData() {}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.tools.device.devcheck.base
|
||||
|
||||
import android.content.Context
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.viewbinding.ViewBinding
|
||||
|
||||
abstract class BaseAdapter<K, T : ViewBinding>(
|
||||
protected val mContext: Context
|
||||
) : RecyclerView.Adapter<BaseAdapter.VHolder<T>>() {
|
||||
|
||||
protected val data: MutableList<K> = mutableListOf()
|
||||
|
||||
fun addData(items: List<K>?) {
|
||||
items?.let {
|
||||
val start = data.size
|
||||
data.addAll(it)
|
||||
notifyItemRangeInserted(start, it.size)
|
||||
}
|
||||
}
|
||||
|
||||
fun setData(items: List<K>?) {
|
||||
data.clear()
|
||||
items?.let { data.addAll(it) }
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
||||
override fun getItemCount(): Int = data.size
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VHolder<T> {
|
||||
return VHolder(getViewBinding(parent))
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: VHolder<T>, position: Int) {
|
||||
bindItem(holder, data[position])
|
||||
}
|
||||
|
||||
|
||||
protected abstract fun getViewBinding(parent: ViewGroup): T
|
||||
protected abstract fun bindItem(holder: VHolder<T>, item: K)
|
||||
|
||||
|
||||
class VHolder<V : ViewBinding>(val vb: V) : RecyclerView.ViewHolder(vb.root)
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.tools.device.devcheck.base
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import androidx.core.graphics.drawable.toDrawable
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.tools.device.devcheck.databinding.DialogBaseBinding
|
||||
|
||||
abstract class BaseDialogFragment<VB : ViewBinding>(
|
||||
private val bindingInflater: (LayoutInflater, ViewGroup?, Boolean) -> VB
|
||||
) : DialogFragment() {
|
||||
|
||||
private var _binding: DialogBaseBinding? = null
|
||||
private val baseBinding get() = _binding!!
|
||||
private var _contentBinding: VB? = null
|
||||
protected val binding get() = _contentBinding!!
|
||||
|
||||
abstract fun getTitle(): String
|
||||
open fun getIconRes(): Int? = null
|
||||
|
||||
|
||||
open fun onPositiveClick() {}
|
||||
open fun onNegativeClick() {}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = DialogBaseBinding.inflate(inflater, container, false)
|
||||
|
||||
// inflate 子类内容到 contentContainer
|
||||
_contentBinding = bindingInflater(inflater, baseBinding.contentContainer, true)
|
||||
|
||||
return baseBinding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
baseBinding.dialogTitle.text = getTitle()
|
||||
getIconRes()?.let {
|
||||
baseBinding.imageIcon.setImageResource(it)
|
||||
baseBinding.imageIcon.visibility = View.VISIBLE
|
||||
}
|
||||
baseBinding.textCancel.setOnClickListener {
|
||||
onPositiveClick()
|
||||
dismiss()
|
||||
}
|
||||
baseBinding.textSettings.setOnClickListener {
|
||||
onNegativeClick()
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
dialog?.window?.let { window ->
|
||||
window.setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
|
||||
|
||||
val params = window.attributes
|
||||
val displayMetrics = resources.displayMetrics
|
||||
val margin = (10 * displayMetrics.density).toInt()
|
||||
params.width = displayMetrics.widthPixels - margin * 2
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
window.attributes = params
|
||||
window.setGravity(Gravity.CENTER)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
_contentBinding = null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
package com.tools.device.devcheck.base
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewbinding.ViewBinding
|
||||
|
||||
abstract class BaseFragment<VB : ViewBinding> : Fragment() {
|
||||
|
||||
private var _binding: VB? = null
|
||||
protected val binding get() = _binding!!
|
||||
|
||||
|
||||
abstract fun getViewBinding(inflater: LayoutInflater, container: ViewGroup?): VB
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = getViewBinding(inflater, container)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null // 避免内存泄漏
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.tools.device.devcheck.custom
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import com.google.android.material.textview.MaterialTextView
|
||||
import com.tools.device.devcheck.R
|
||||
import androidx.core.content.withStyledAttributes
|
||||
|
||||
|
||||
class LabelValueCustomView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : LinearLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
private val tvLabel: MaterialTextView
|
||||
private val tvValue: MaterialTextView
|
||||
private val tvSubTitle: MaterialTextView
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.common_dialog_item, this, true)
|
||||
tvValue = findViewById(R.id.tv_value)
|
||||
tvLabel = findViewById(R.id.tv_label)
|
||||
tvSubTitle = findViewById(R.id.tv_sub_title)
|
||||
|
||||
orientation = HORIZONTAL
|
||||
|
||||
attrs?.let {
|
||||
context.withStyledAttributes(it, R.styleable.LabelValueCustomView) {
|
||||
val label = getString(R.styleable.LabelValueCustomView_labelText) ?: ""
|
||||
val value = getString(R.styleable.LabelValueCustomView_valueText) ?: ""
|
||||
val subtitle = getString(R.styleable.LabelValueCustomView_subTitleText)
|
||||
|
||||
tvSubTitle.run {
|
||||
visibility = if (subtitle.isNullOrBlank()) GONE else VISIBLE
|
||||
text = subtitle
|
||||
}
|
||||
tvLabel.text = label
|
||||
tvValue.text = value
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setLabel(text: String) {
|
||||
tvLabel.text = text
|
||||
}
|
||||
|
||||
fun setValue(text: String) {
|
||||
tvValue.text = text
|
||||
}
|
||||
|
||||
fun getValue(): String = tvValue.text.toString()
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.tools.device.devcheck.dashboard
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import com.tools.device.devcheck.base.BaseAdapter
|
||||
import com.tools.device.devcheck.databinding.DashboardCpuAdapterBinding
|
||||
|
||||
class CpuAdapter(context: Context) : BaseAdapter<String, DashboardCpuAdapterBinding>(context) {
|
||||
override fun getViewBinding(parent: ViewGroup): DashboardCpuAdapterBinding =
|
||||
DashboardCpuAdapterBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
|
||||
override fun bindItem(
|
||||
holder: VHolder<DashboardCpuAdapterBinding>,
|
||||
item: String
|
||||
) {
|
||||
holder.vb.textCpuContent.text = item
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
package com.tools.device.devcheck.dashboard
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.tools.device.devcheck.base.BaseFragment
|
||||
import com.tools.device.devcheck.databinding.FragmentDashboardBinding
|
||||
|
||||
|
||||
private const val ARG_PARAM1 = "param1"
|
||||
private const val ARG_PARAM2 = "param2"
|
||||
|
||||
class DashboardFragment : BaseFragment<FragmentDashboardBinding>() {
|
||||
|
||||
private var param1: String? = null
|
||||
private var param2: String? = null
|
||||
|
||||
private var dialogBattery: DialogBattery? = null
|
||||
private var dialogNetwork: DialogNetwork? = null
|
||||
private var dialogDisplay: DialogDisplay? = null
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance() =
|
||||
DashboardFragment().apply {
|
||||
arguments = Bundle().apply {
|
||||
// putString(ARG_PARAM1, param1)
|
||||
// putString(ARG_PARAM2, param2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
// param1 = it.getString(ARG_PARAM1)
|
||||
// param2 = it.getString(ARG_PARAM2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun getViewBinding(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?
|
||||
): FragmentDashboardBinding {
|
||||
return FragmentDashboardBinding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
initCpu()
|
||||
initClick()
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun initCpu() {
|
||||
binding.layoutCpu.run {
|
||||
recyclerCpu.run {
|
||||
adapter = CpuAdapter(requireContext()).apply {
|
||||
setData(
|
||||
listOf(
|
||||
"1804 MHz",
|
||||
"1804 MHz",
|
||||
"1804 MHz",
|
||||
"1804 MHz",
|
||||
"1804 MHz",
|
||||
"1804 MHz",
|
||||
"1804 MHz",
|
||||
"1804 MHz"
|
||||
)
|
||||
)
|
||||
}
|
||||
layoutManager = GridLayoutManager(requireContext(), 2)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun initClick() {
|
||||
binding.layoutCenter.run {
|
||||
relayoutBattery.setOnClickListener {
|
||||
dialogBattery = dialogBattery ?: DialogBattery()
|
||||
dialogBattery?.show(parentFragmentManager, "")
|
||||
}
|
||||
relayoutNetwork.setOnClickListener {
|
||||
dialogNetwork = dialogNetwork ?: DialogNetwork()
|
||||
dialogNetwork?.show(parentFragmentManager, "")
|
||||
}
|
||||
relayoutDisplay.setOnClickListener {
|
||||
dialogDisplay = dialogDisplay?: DialogDisplay()
|
||||
dialogDisplay?.show(parentFragmentManager, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.tools.device.devcheck.dashboard
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.tools.device.devcheck.R
|
||||
import com.tools.device.devcheck.base.BaseDialogFragment
|
||||
import com.tools.device.devcheck.databinding.DialogBatteryBinding
|
||||
|
||||
class DialogBattery :BaseDialogFragment<DialogBatteryBinding>(DialogBatteryBinding::inflate){
|
||||
override fun getTitle(): String = resources.getString(R.string.battery)
|
||||
|
||||
override fun getIconRes(): Int? {
|
||||
return super.getIconRes()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
}
|
||||
|
||||
override fun onNegativeClick() {
|
||||
super.onNegativeClick()
|
||||
|
||||
}
|
||||
|
||||
override fun onPositiveClick() {
|
||||
super.onPositiveClick()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.tools.device.devcheck.dashboard
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.tools.device.devcheck.R
|
||||
import com.tools.device.devcheck.base.BaseDialogFragment
|
||||
import com.tools.device.devcheck.databinding.DialogBatteryBinding
|
||||
import com.tools.device.devcheck.databinding.DialogDisplayBinding
|
||||
import com.tools.device.devcheck.databinding.DialogNetworkBinding
|
||||
|
||||
class DialogDisplay :BaseDialogFragment<DialogDisplayBinding>(DialogDisplayBinding::inflate){
|
||||
override fun getTitle(): String = resources.getString(R.string.display)
|
||||
|
||||
override fun getIconRes(): Int? {
|
||||
return super.getIconRes()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
}
|
||||
|
||||
override fun onNegativeClick() {
|
||||
super.onNegativeClick()
|
||||
|
||||
}
|
||||
|
||||
override fun onPositiveClick() {
|
||||
super.onPositiveClick()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.tools.device.devcheck.dashboard
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.tools.device.devcheck.R
|
||||
import com.tools.device.devcheck.base.BaseDialogFragment
|
||||
import com.tools.device.devcheck.databinding.DialogBatteryBinding
|
||||
import com.tools.device.devcheck.databinding.DialogNetworkBinding
|
||||
|
||||
class DialogNetwork :BaseDialogFragment<DialogNetworkBinding>(DialogNetworkBinding::inflate){
|
||||
override fun getTitle(): String = resources.getString(R.string.network)
|
||||
|
||||
override fun getIconRes(): Int? {
|
||||
return super.getIconRes()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
}
|
||||
|
||||
override fun onNegativeClick() {
|
||||
super.onNegativeClick()
|
||||
|
||||
}
|
||||
|
||||
override fun onPositiveClick() {
|
||||
super.onPositiveClick()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.tools.device.devcheck.main
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.tools.device.devcheck.base.BaseActivity
|
||||
import com.tools.device.devcheck.R
|
||||
import com.tools.device.devcheck.dashboard.DashboardFragment
|
||||
import com.tools.device.devcheck.databinding.ActivityMainBinding
|
||||
|
||||
class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
override fun inflateBinding(inflater: LayoutInflater): ActivityMainBinding =
|
||||
ActivityMainBinding.inflate(inflater)
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.run {
|
||||
|
||||
val stringArray = resources.getStringArray(R.array.tab_title)
|
||||
TabLayoutMediator(tablelayout, viewpager3.apply {
|
||||
adapter = ViewPagerAdapter(
|
||||
this@MainActivity, listOf(
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance(),
|
||||
DashboardFragment.newInstance()
|
||||
)
|
||||
)
|
||||
registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
super.onPageSelected(position)
|
||||
|
||||
}
|
||||
})
|
||||
}) { tab, position ->
|
||||
tab.text = stringArray[position]
|
||||
// tab.setCustomView(R.layout.custom_tab)
|
||||
//
|
||||
// tab.customView?.run {
|
||||
// val indicator: ImageView = findViewById(R.id.image_indicator)
|
||||
// indicator.isVisible = position == 0
|
||||
// }
|
||||
}.attach()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.tools.device.devcheck.main
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
|
||||
class ViewPagerAdapter(
|
||||
fragmentActivity: FragmentActivity,
|
||||
private val fragments: List<Fragment>
|
||||
) : FragmentStateAdapter(fragmentActivity) {
|
||||
|
||||
override fun getItemCount(): Int = fragments.size
|
||||
|
||||
override fun createFragment(position: Int): Fragment = fragments[position]
|
||||
}
|
||||
10
app/src/main/java/com/tools/device/devcheck/utils/Helper.kt
Normal file
@ -0,0 +1,10 @@
|
||||
package com.tools.device.devcheck.utils
|
||||
|
||||
import android.content.Context
|
||||
|
||||
object Helper {
|
||||
fun dpToPx(context: Context,dpValue: Int): Float {
|
||||
val density: Float = context.resources.displayMetrics.density
|
||||
return density * dpValue + 0.5f
|
||||
}
|
||||
}
|
||||
6
app/src/main/res/color/selector_color_main_tab_title.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/main_tab_selected" android:state_selected="true" />
|
||||
<item android:color="@color/main_tab_unselected" android:state_selected="false" />
|
||||
|
||||
</selector>
|
||||
7
app/src/main/res/drawable/dashboard_model_background.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/forground_color"/>
|
||||
<corners android:radius="@dimen/dashboard_model_background_corners"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/forground_color"/>
|
||||
<corners android:topLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:topRightRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomLeftRadius="@dimen/dashboard_model_background_corners"
|
||||
android:bottomRightRadius="@dimen/dashboard_model_background_corners_small"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/forground_color"/>
|
||||
<corners android:topLeftRadius="@dimen/dashboard_model_background_corners"
|
||||
android:topRightRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomRightRadius="@dimen/dashboard_model_background_corners_small"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/forground_color"/>
|
||||
<corners android:topLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:topRightRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomRightRadius="@dimen/dashboard_model_background_corners"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/forground_color"/>
|
||||
<corners android:topLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:topRightRadius="@dimen/dashboard_model_background_corners"
|
||||
android:bottomLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomRightRadius="@dimen/dashboard_model_background_corners_small"/>
|
||||
|
||||
</shape>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/forground_color"/>
|
||||
<corners android:topLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:topRightRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomLeftRadius="@dimen/dashboard_model_background_corners_small"
|
||||
android:bottomRightRadius="@dimen/dashboard_model_background_corners_small"/>
|
||||
|
||||
</shape>
|
||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
30
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
8
app/src/main/res/drawable/module_oval.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="12dp"
|
||||
android:height="12dp"/>
|
||||
<solid android:color="@color/black"/>
|
||||
</shape>
|
||||
7
app/src/main/res/drawable/tab_indicator.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="10dp" />
|
||||
<solid android:color="@color/main_tab_selected" />
|
||||
|
||||
</shape>
|
||||
BIN
app/src/main/res/font/semibold.ttf
Normal file
82
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,82 @@
|
||||
<?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:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/forground_color"
|
||||
tools:context=".main.MainActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:background="@color/forground_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_sidebar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/text_app_name"
|
||||
android:layout_alignBottom="@id/text_app_name"
|
||||
android:contentDescription="Sidebar"
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="55dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/main_app_name"
|
||||
android:textSize="@dimen/size_main_app_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_tool"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/text_app_name"
|
||||
android:layout_alignBottom="@id/text_app_name"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:contentDescription="Tool"
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablelayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:background="@color/forground_color"
|
||||
app:tabGravity="center"
|
||||
app:layout_collapseMode="pin"
|
||||
app:tabIndicatorColor="@color/main_tab_indicatorColor"
|
||||
app:tabIndicatorFullWidth="true"
|
||||
app:tabIndicatorHeight="@dimen/tab_indicator_height"
|
||||
app:tabMaxWidth="100dp"
|
||||
app:tabMinWidth="100dp"
|
||||
app:tabMode="scrollable"
|
||||
app:tabRippleColor="@null"
|
||||
app:tabSelectedTextColor="@color/main_tab_selected"
|
||||
app:tabTextColor="@color/main_tab_unselected" />
|
||||
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewpager3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
38
app/src/main/res/layout/common_dialog_item.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/tv_sub_title"
|
||||
style="@style/TextDialogSubTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="15dp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/tv_label"
|
||||
style="@style/TextDialogLabel"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_sub_title"
|
||||
android:gravity="start"
|
||||
android:text="sppppppppppppppppppppp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/tv_value"
|
||||
style="@style/TextDialogContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/tv_label"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_toEndOf="@id/tv_label"
|
||||
android:gravity="center"
|
||||
android:text="sppppppppppppppppppppp" />
|
||||
|
||||
</RelativeLayout>
|
||||
21
app/src/main/res/layout/custom_tab.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/selector_color_main_tab_title"
|
||||
android:textSize="@dimen/size_main_tab_title" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_indicator_height"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@drawable/tab_indicator" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
10
app/src/main/res/layout/dashboard_cpu_adapter.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.textview.MaterialTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/TextCPUContent"
|
||||
android:id="@+id/text_cpu_content"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_cpu_content_item_padding_vertical">
|
||||
|
||||
</com.google.android.material.textview.MaterialTextView>
|
||||
151
app/src/main/res/layout/dashboard_module_bottom.xml
Normal file
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/relayout_tests"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_tools"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/test"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/relayout_tools"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_tests"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_tests">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/tools"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_tests">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/phone_logo"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="54dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/im_menu"
|
||||
android:layout_toEndOf="@id/phone_logo"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextBig"
|
||||
android:id="@+id/tv_phone_brand"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_api_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_uptime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/uptime"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_deep_sleep"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/deep_sleep"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
313
app/src/main/res/layout/dashboard_module_center.xml
Normal file
@ -0,0 +1,313 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_battery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_background_left_top"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_network"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_battery"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/battery"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_battery"
|
||||
android:layout_alignBottom="@id/title_battery"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_battery"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_battery"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/battery_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_battery"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_battery"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_network"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_right_top"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_battery"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_battery">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_network"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/network"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_network"
|
||||
android:layout_alignBottom="@id/title_network"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_network"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_network"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/network_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_network"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_network"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_apps"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_small"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_display"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_battery">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_apps"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_apps"
|
||||
android:layout_alignBottom="@id/title_apps"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_apps"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_apps"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/apps_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_apps"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_apps"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_display"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_small"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_apps"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_apps">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_display"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/display"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_display"
|
||||
android:layout_alignBottom="@id/title_display"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_display"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_display"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/display_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_display"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_display"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_ram"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_left_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_storage"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_apps">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_ram"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/ram"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_ram"
|
||||
android:layout_alignBottom="@id/title_ram"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_ram"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_ram"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/ram_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_ram"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_ram"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_storage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_ram"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_ram">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_storage"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/storage"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_storage"
|
||||
android:layout_alignBottom="@id/title_storage"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_storage"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_storage"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/storage_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_storage"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_storage"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
89
app/src/main/res/layout/dashboard_module_cpu.xml
Normal file
@ -0,0 +1,89 @@
|
||||
<?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:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_cpu"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/cpu_status"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@id/title_cpu"
|
||||
android:layout_alignBottom="@id/title_cpu"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/module_oval" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_cpu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title_cpu"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/end_im"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/module_oval"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text_cpu0"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cpu_0"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/text_cpu1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text_cpu1"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cpu_1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/text_cpu0"
|
||||
app:layout_constraintRight_toRightOf="@id/end_im"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
70
app/src/main/res/layout/dialog_base.xml
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_icon"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_line"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:background="@color/module_title_color"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/dialog_title"
|
||||
style="@style/TextBig"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:text="@string/app_name"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_line"
|
||||
app:layout_constraintLeft_toRightOf="@id/image_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<!-- 子类内容容器 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/contentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text_cancel"
|
||||
style="@style/TextBtnTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="@string/cancel"
|
||||
android:layout_marginEnd="20dp"
|
||||
app:layout_constraintRight_toLeftOf="@id/text_settings"
|
||||
app:layout_constraintTop_toTopOf="@id/text_settings" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/text_settings"
|
||||
style="@style/TextBtnTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="@string/settings"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/contentContainer" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
47
app/src/main/res/layout/dialog_battery.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<?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="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv1_battery_level"
|
||||
app:labelText="@string/battery_level"/>
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv2_temperature"
|
||||
app:labelText="@string/temperature"/>
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv3_status"
|
||||
app:labelText="@string/status"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv4_technology"
|
||||
app:labelText="@string/technology"
|
||||
app:valueText="@string/capacity"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv5_health"
|
||||
app:labelText="@string/health"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv6_voltage"
|
||||
app:labelText="@string/voltage"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv7_capacity"
|
||||
app:labelText="@string/capacity"/>
|
||||
</LinearLayout>
|
||||
46
app/src/main/res/layout/dialog_display.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?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="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv1_gpu"
|
||||
app:labelText="@string/gpu"/>
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv2_max_frequency"
|
||||
app:labelText="@string/max_frequency"/>
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv3_resolution"
|
||||
app:labelText="@string/resolution"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv4_screen_density"
|
||||
app:labelText="@string/screen_density" />
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv5_screen_size"
|
||||
app:labelText="@string/screen_size"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv6_aspect_ratio"
|
||||
app:labelText="@string/aspect_ratio"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv7_frame_rate"
|
||||
app:labelText="@string/frame_rate"/>
|
||||
</LinearLayout>
|
||||
55
app/src/main/res/layout/dialog_network.xml
Normal file
@ -0,0 +1,55 @@
|
||||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv1_status"
|
||||
app:subTitleText="@string/wifi"
|
||||
app:labelText="@string/status"/>
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv2_ip_address"
|
||||
app:labelText="@string/ip_address"/>
|
||||
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv3_link_speed"
|
||||
app:labelText="@string/link_speed"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv4_signal_strength"
|
||||
app:labelText="@string/signal_strength" />
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv5_status"
|
||||
app:subTitleText="@string/mobile"
|
||||
app:labelText="@string/status"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv6_phone_type"
|
||||
app:labelText="@string/phone_type"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv7_state"
|
||||
app:subTitleText="@string/sim"
|
||||
app:labelText="@string/state"/>
|
||||
<com.tools.device.devcheck.custom.LabelValueCustomView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv7_operator"
|
||||
app:labelText="@string/operator"/>
|
||||
</LinearLayout>
|
||||
39
app/src/main/res/layout/fragment_dashboard.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout 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="wrap_content"
|
||||
android:background="@color/background_color"
|
||||
tools:context=".dashboard.DashboardFragment">
|
||||
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/dashboard_fragment_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_fragment_padding_vertical">
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_cpu"
|
||||
layout="@layout/dashboard_module_cpu" />
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_center"
|
||||
layout="@layout/dashboard_module_center" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_bottom"
|
||||
layout="@layout/dashboard_module_bottom" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
7
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.DevCheck" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
12
app/src/main/res/values/attrs.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="LabelValueCustomView">
|
||||
<!-- 小标题 -->
|
||||
<attr name="subTitleText" format="string" />
|
||||
<!-- 左边标题 -->
|
||||
<attr name="labelText" format="string" />
|
||||
<!-- 右边默认值 -->
|
||||
<attr name="valueText" format="string" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
15
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="main_app_name">#1E8C29</color>
|
||||
<color name="main_tab_unselected">#C3C0C0</color>
|
||||
<color name="main_tab_selected">#1E8C29</color>
|
||||
<color name="main_tab_indicatorColor">#1E8C29</color>
|
||||
<color name="forground_color">#FFFFFF</color>
|
||||
<color name="background_color">#EDEDED</color>
|
||||
<color name="module_title_color">#1E8C29</color>
|
||||
<color name="cpu_module_content_color">#444544</color>
|
||||
<color name="dialog_label_color">#666666</color>
|
||||
<color name="dialog_value_color">#757575</color>
|
||||
</resources>
|
||||
32
app/src/main/res/values/dimens.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="size_main_app_name">20sp</dimen>
|
||||
<dimen name="size_main_tab_title">15sp</dimen>
|
||||
<dimen name="size_module_title">13sp</dimen>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dimen name="tab_indicator_height">3dp</dimen>
|
||||
<dimen name="dashboard_model_title_padding_vertical">3dp</dimen>
|
||||
<dimen name="dashboard_model_background_corners">13dp</dimen>
|
||||
<dimen name="dashboard_model_background_corners_small">2dp</dimen>
|
||||
|
||||
<dimen name="dashboard_fragment_padding_horizontal">8dp</dimen>
|
||||
<dimen name="dashboard_fragment_padding_vertical">15dp</dimen>
|
||||
<dimen name="dashboard_model_padding_horizontal">8dp</dimen>
|
||||
<dimen name="dashboard_model_padding_vertical">10dp</dimen>
|
||||
|
||||
|
||||
<!-- 图标和显示内容之间的间距-->
|
||||
<dimen name="dashboard_icon_content_interval">17dp</dimen>
|
||||
|
||||
<dimen name="dashboard_cpu_content_item_padding_vertical">8dp</dimen>
|
||||
|
||||
<dimen name="common_module_interval_small">3dp</dimen>
|
||||
<dimen name="common_module_interval_medium">7dp</dimen>
|
||||
<dimen name="common_module_interval_large">10dp</dimen>
|
||||
</resources>
|
||||
72
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,72 @@
|
||||
<resources>
|
||||
<string name="app_name">DevCheck</string>
|
||||
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string-array name="tab_title">
|
||||
<item>Dashboard</item>
|
||||
<item>Hardware</item>
|
||||
<item>System</item>
|
||||
<item>Battery</item>
|
||||
<item>Network</item>
|
||||
<item>Apps</item>
|
||||
<item>Camera</item>
|
||||
<item>Sensors</item>
|
||||
</string-array>
|
||||
|
||||
<!-- dashboard-->
|
||||
<string name="cpu_status">CPU Status</string>
|
||||
<string name="cpu_0">CPU0:%s</string>
|
||||
<string name="cpu_1">%s:%s</string>
|
||||
|
||||
<string name="battery">Battery</string>
|
||||
<string name="battery_level">Battery level</string>
|
||||
<string name="temperature">Temperature</string>
|
||||
<string name="status">Status</string>
|
||||
<string name="technology">Technology</string>
|
||||
<string name="health">Health</string>
|
||||
<string name="voltage">Voltage</string>
|
||||
<string name="capacity">Capacity(reported by system)</string>
|
||||
|
||||
|
||||
<string name="network">Network</string>
|
||||
<string name="wifi">Wi-Fi</string>
|
||||
<string name="ip_address">IP address</string>
|
||||
<string name="link_speed">Link speed</string>
|
||||
<string name="signal_strength">Signal strength</string>
|
||||
<string name="mobile">Mobile</string>
|
||||
<string name="phone_type">Phone type</string>
|
||||
<string name="sim">SIM</string>
|
||||
<string name="state">State</string>
|
||||
<string name="operator">Operator</string>
|
||||
|
||||
|
||||
<string name="apps">Apps</string>
|
||||
|
||||
<string name="display">Display</string>
|
||||
<string name="gpu">GPU</string>
|
||||
<string name="max_frequency">Max frequency</string>
|
||||
<string name="resolution">Resolution</string>
|
||||
<string name="screen_density">Screen density</string>
|
||||
<string name="screen_size">Screen size(estimated)</string>
|
||||
<string name="aspect_ratio">Aspect ratio</string>
|
||||
<string name="frame_rate">Frame rate</string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<string name="ram">RAM</string>
|
||||
<string name="storage">Storage</string>
|
||||
|
||||
<string name="test">Tests</string>
|
||||
<string name="tools">Tools</string>
|
||||
|
||||
<string name="uptime">Uptime:</string>
|
||||
<string name="deep_sleep">Deep sleep:</string>
|
||||
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
63
app/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
|
||||
<!-- Dashboard面板 -->
|
||||
|
||||
<!-- 页面上每个模块的模块名字-->
|
||||
<style name="TextModuleTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">@dimen/size_module_title</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/semibold</item>
|
||||
<!-- <item name="android:fontFamily">sans-serif</item> <!– 老版本 fallback –>-->
|
||||
</style>
|
||||
|
||||
<!-- CPU status 内容显示-->
|
||||
<style name="TextCPUContent" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textColor">@color/cpu_module_content_color</item>
|
||||
<item name="fontFamily">@font/semibold</item>
|
||||
<!-- <item name="android:fontFamily">sans-serif</item> <!– 老版本 fallback –>-->
|
||||
</style>
|
||||
|
||||
<!-- 模块通用内容显示-->
|
||||
<style name="TextContent" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/cpu_module_content_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
</style>
|
||||
|
||||
<!-- 模块大字号-->
|
||||
<style name="TextBig" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">21sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
|
||||
<!-- 首页弹窗内容副标题-->
|
||||
<style name="TextDialogSubTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
|
||||
</style>
|
||||
<!-- 首页弹窗内容的左边标题-->
|
||||
<style name="TextDialogLabel" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">@color/dialog_label_color</item>
|
||||
</style>
|
||||
|
||||
<!-- 首页弹窗内容的右边内容-->
|
||||
<style name="TextDialogContent" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
|
||||
</style>
|
||||
<!-- 首页弹窗Cancel-->
|
||||
<style name="TextBtnTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">19sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<!-- <item name="android:fontFamily">sans-serif</item> <!– 老版本 fallback –>-->
|
||||
</style>
|
||||
</resources>
|
||||
9
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.DevCheck" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.DevCheck" parent="Base.Theme.DevCheck" />
|
||||
</resources>
|
||||
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older than API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
19
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
@ -0,0 +1,17 @@
|
||||
package com.tools.device.devcheck
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
5
build.gradle.kts
Normal file
@ -0,0 +1,5 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
||||
23
gradle.properties
Normal file
@ -0,0 +1,23 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. For more details, visit
|
||||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
26
gradle/libs.versions.toml
Normal file
@ -0,0 +1,26 @@
|
||||
[versions]
|
||||
agp = "8.10.1"
|
||||
kotlin = "2.0.21"
|
||||
coreKtx = "1.17.0"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.3.0"
|
||||
espressoCore = "3.7.0"
|
||||
appcompat = "1.7.1"
|
||||
material = "1.12.0"
|
||||
activity = "1.10.1"
|
||||
constraintlayout = "2.2.1"
|
||||
|
||||
[libraries]
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Thu Aug 21 14:37:12 CST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
185
gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
89
gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
24
settings.gradle.kts
Normal file
@ -0,0 +1,24 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx.*")
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "DevCheck"
|
||||
include(":app")
|
||||
|
||||