commit d1bf601e74116e1ebf61614ccb25ba9a3935427f Author: litingting Date: Tue Aug 26 10:14:25 2025 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..e72c2c8 --- /dev/null +++ b/app/build.gradle.kts @@ -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") +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/app/src/androidTest/java/com/tools/device/devcheck/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/tools/device/devcheck/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..0add855 --- /dev/null +++ b/app/src/androidTest/java/com/tools/device/devcheck/ExampleInstrumentedTest.kt @@ -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) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..dd1bf61 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/base/BaseActivity.kt b/app/src/main/java/com/tools/device/devcheck/base/BaseActivity.kt new file mode 100644 index 0000000..652f4d0 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/base/BaseActivity.kt @@ -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 : 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() {} +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/base/BaseAdapter.kt b/app/src/main/java/com/tools/device/devcheck/base/BaseAdapter.kt new file mode 100644 index 0000000..809c852 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/base/BaseAdapter.kt @@ -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( + protected val mContext: Context +) : RecyclerView.Adapter>() { + + protected val data: MutableList = mutableListOf() + + fun addData(items: List?) { + items?.let { + val start = data.size + data.addAll(it) + notifyItemRangeInserted(start, it.size) + } + } + + fun setData(items: List?) { + data.clear() + items?.let { data.addAll(it) } + notifyDataSetChanged() + } + + + override fun getItemCount(): Int = data.size + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VHolder { + return VHolder(getViewBinding(parent)) + } + + override fun onBindViewHolder(holder: VHolder, position: Int) { + bindItem(holder, data[position]) + } + + + protected abstract fun getViewBinding(parent: ViewGroup): T + protected abstract fun bindItem(holder: VHolder, item: K) + + + class VHolder(val vb: V) : RecyclerView.ViewHolder(vb.root) +} diff --git a/app/src/main/java/com/tools/device/devcheck/base/BaseDialogFragment.kt b/app/src/main/java/com/tools/device/devcheck/base/BaseDialogFragment.kt new file mode 100644 index 0000000..f2bba58 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/base/BaseDialogFragment.kt @@ -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( + 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 + } +} + + diff --git a/app/src/main/java/com/tools/device/devcheck/base/BaseFragment.kt b/app/src/main/java/com/tools/device/devcheck/base/BaseFragment.kt new file mode 100644 index 0000000..f351eae --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/base/BaseFragment.kt @@ -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 : 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 // 避免内存泄漏 + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/custom/LabelValueCustomView.kt b/app/src/main/java/com/tools/device/devcheck/custom/LabelValueCustomView.kt new file mode 100644 index 0000000..7950729 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/custom/LabelValueCustomView.kt @@ -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() +} diff --git a/app/src/main/java/com/tools/device/devcheck/dashboard/CpuAdapter.kt b/app/src/main/java/com/tools/device/devcheck/dashboard/CpuAdapter.kt new file mode 100644 index 0000000..24e406e --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/dashboard/CpuAdapter.kt @@ -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(context) { + override fun getViewBinding(parent: ViewGroup): DashboardCpuAdapterBinding = + DashboardCpuAdapterBinding.inflate( + LayoutInflater.from(parent.context), + parent, + false + ) + + override fun bindItem( + holder: VHolder, + item: String + ) { + holder.vb.textCpuContent.text = item + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/dashboard/DashboardFragment.kt b/app/src/main/java/com/tools/device/devcheck/dashboard/DashboardFragment.kt new file mode 100644 index 0000000..6f47e43 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/dashboard/DashboardFragment.kt @@ -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() { + + 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, "") + } + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/dashboard/DialogBattery.kt b/app/src/main/java/com/tools/device/devcheck/dashboard/DialogBattery.kt new file mode 100644 index 0000000..ba8a534 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/dashboard/DialogBattery.kt @@ -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::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() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/dashboard/DialogDisplay.kt b/app/src/main/java/com/tools/device/devcheck/dashboard/DialogDisplay.kt new file mode 100644 index 0000000..74cf831 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/dashboard/DialogDisplay.kt @@ -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::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() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/dashboard/DialogNetwork.kt b/app/src/main/java/com/tools/device/devcheck/dashboard/DialogNetwork.kt new file mode 100644 index 0000000..dd1f093 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/dashboard/DialogNetwork.kt @@ -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::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() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/main/MainActivity.kt b/app/src/main/java/com/tools/device/devcheck/main/MainActivity.kt new file mode 100644 index 0000000..f0a07e6 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/main/MainActivity.kt @@ -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() { + 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() + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/tools/device/devcheck/main/ViewPagerAdapter.kt b/app/src/main/java/com/tools/device/devcheck/main/ViewPagerAdapter.kt new file mode 100644 index 0000000..ab702ab --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/main/ViewPagerAdapter.kt @@ -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 +) : FragmentStateAdapter(fragmentActivity) { + + override fun getItemCount(): Int = fragments.size + + override fun createFragment(position: Int): Fragment = fragments[position] +} diff --git a/app/src/main/java/com/tools/device/devcheck/utils/Helper.kt b/app/src/main/java/com/tools/device/devcheck/utils/Helper.kt new file mode 100644 index 0000000..2d70542 --- /dev/null +++ b/app/src/main/java/com/tools/device/devcheck/utils/Helper.kt @@ -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 + } +} \ No newline at end of file diff --git a/app/src/main/res/color/selector_color_main_tab_title.xml b/app/src/main/res/color/selector_color_main_tab_title.xml new file mode 100644 index 0000000..5c27e03 --- /dev/null +++ b/app/src/main/res/color/selector_color_main_tab_title.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dashboard_model_background.xml b/app/src/main/res/drawable/dashboard_model_background.xml new file mode 100644 index 0000000..66fa06b --- /dev/null +++ b/app/src/main/res/drawable/dashboard_model_background.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dashboard_model_background_left_bottom.xml b/app/src/main/res/drawable/dashboard_model_background_left_bottom.xml new file mode 100644 index 0000000..642fc80 --- /dev/null +++ b/app/src/main/res/drawable/dashboard_model_background_left_bottom.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dashboard_model_background_left_top.xml b/app/src/main/res/drawable/dashboard_model_background_left_top.xml new file mode 100644 index 0000000..f1d9820 --- /dev/null +++ b/app/src/main/res/drawable/dashboard_model_background_left_top.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dashboard_model_background_right_bottom.xml b/app/src/main/res/drawable/dashboard_model_background_right_bottom.xml new file mode 100644 index 0000000..7d13964 --- /dev/null +++ b/app/src/main/res/drawable/dashboard_model_background_right_bottom.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dashboard_model_background_right_top.xml b/app/src/main/res/drawable/dashboard_model_background_right_top.xml new file mode 100644 index 0000000..8c97946 --- /dev/null +++ b/app/src/main/res/drawable/dashboard_model_background_right_top.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dashboard_model_background_small.xml b/app/src/main/res/drawable/dashboard_model_background_small.xml new file mode 100644 index 0000000..cf3ccd2 --- /dev/null +++ b/app/src/main/res/drawable/dashboard_model_background_small.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/module_oval.xml b/app/src/main/res/drawable/module_oval.xml new file mode 100644 index 0000000..fbe4690 --- /dev/null +++ b/app/src/main/res/drawable/module_oval.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/app/src/main/res/drawable/tab_indicator.xml b/app/src/main/res/drawable/tab_indicator.xml new file mode 100644 index 0000000..3950e71 --- /dev/null +++ b/app/src/main/res/drawable/tab_indicator.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/font/semibold.ttf b/app/src/main/res/font/semibold.ttf new file mode 100644 index 0000000..23e4502 Binary files /dev/null and b/app/src/main/res/font/semibold.ttf differ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..fa936d0 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/common_dialog_item.xml b/app/src/main/res/layout/common_dialog_item.xml new file mode 100644 index 0000000..0fa933b --- /dev/null +++ b/app/src/main/res/layout/common_dialog_item.xml @@ -0,0 +1,38 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/custom_tab.xml b/app/src/main/res/layout/custom_tab.xml new file mode 100644 index 0000000..38381b1 --- /dev/null +++ b/app/src/main/res/layout/custom_tab.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dashboard_cpu_adapter.xml b/app/src/main/res/layout/dashboard_cpu_adapter.xml new file mode 100644 index 0000000..ace13d6 --- /dev/null +++ b/app/src/main/res/layout/dashboard_cpu_adapter.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dashboard_module_bottom.xml b/app/src/main/res/layout/dashboard_module_bottom.xml new file mode 100644 index 0000000..a840613 --- /dev/null +++ b/app/src/main/res/layout/dashboard_module_bottom.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dashboard_module_center.xml b/app/src/main/res/layout/dashboard_module_center.xml new file mode 100644 index 0000000..c824e63 --- /dev/null +++ b/app/src/main/res/layout/dashboard_module_center.xml @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dashboard_module_cpu.xml b/app/src/main/res/layout/dashboard_module_cpu.xml new file mode 100644 index 0000000..a097915 --- /dev/null +++ b/app/src/main/res/layout/dashboard_module_cpu.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_base.xml b/app/src/main/res/layout/dialog_base.xml new file mode 100644 index 0000000..5b2551d --- /dev/null +++ b/app/src/main/res/layout/dialog_base.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/dialog_battery.xml b/app/src/main/res/layout/dialog_battery.xml new file mode 100644 index 0000000..40cc0bd --- /dev/null +++ b/app/src/main/res/layout/dialog_battery.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_display.xml b/app/src/main/res/layout/dialog_display.xml new file mode 100644 index 0000000..9183718 --- /dev/null +++ b/app/src/main/res/layout/dialog_display.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_network.xml b/app/src/main/res/layout/dialog_network.xml new file mode 100644 index 0000000..2a58cdc --- /dev/null +++ b/app/src/main/res/layout/dialog_network.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml new file mode 100644 index 0000000..bbc7fcb --- /dev/null +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3d9df9a --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml new file mode 100644 index 0000000..1b98e90 --- /dev/null +++ b/app/src/main/res/values/attrs.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..107b501 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,15 @@ + + + #FF000000 + #FFFFFFFF + #1E8C29 + #C3C0C0 + #1E8C29 + #1E8C29 + #FFFFFF + #EDEDED + #1E8C29 + #444544 + #666666 + #757575 + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..667f2e4 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,32 @@ + + + 20sp + 15sp + 13sp + + + + + + + + 3dp + 3dp + 13dp + 2dp + + 8dp + 15dp + 8dp + 10dp + + + + 17dp + + 8dp + + 3dp + 7dp + 10dp + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..82fac05 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,72 @@ + + DevCheck + + Hello blank fragment + + Dashboard + Hardware + System + Battery + Network + Apps + Camera + Sensors + + + + CPU Status + CPU0:%s + %s:%s + + Battery + Battery level + Temperature + Status + Technology + Health + Voltage + Capacity(reported by system) + + + Network + Wi-Fi + IP address + Link speed + Signal strength + Mobile + Phone type + SIM + State + Operator + + + Apps + + Display + GPU + Max frequency + Resolution + Screen density + Screen size(estimated) + Aspect ratio + Frame rate + + + + + + RAM + Storage + + Tests + Tools + + Uptime: + Deep sleep: + + Cancel + Settings + + + + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..f7534ba --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..45f9970 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,9 @@ + + + + +