除status,cpu接口完成
This commit is contained in:
parent
de5fab1158
commit
f8483bdbb2
@ -630,6 +630,30 @@ class CpuInfo {
|
|||||||
return sb.toString()
|
return sb.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getCpuText():String{//自定义衍生方法
|
||||||
|
val sb = StringBuilder()
|
||||||
|
val clusterInfo = getClusterInfo()
|
||||||
|
if (clusterInfo.bigCoreCount > 0) {
|
||||||
|
sb.append("大核: ${clusterInfo.bigCoreCount} 个, 最高频率: ${formatFrequency(clusterInfo.bigCoreFreq)}\n")
|
||||||
|
}
|
||||||
|
if (clusterInfo.midCoreCount > 0) {
|
||||||
|
sb.append("中核: ${clusterInfo.midCoreCount} 个, 最高频率: ${formatFrequency(clusterInfo.midCoreFreq)}\n")
|
||||||
|
}
|
||||||
|
if (clusterInfo.littleCoreCount > 0) {
|
||||||
|
sb.append("小核: ${clusterInfo.littleCoreCount} 个, 最高频率: ${formatFrequency(clusterInfo.littleCoreFreq)}\n")
|
||||||
|
}
|
||||||
|
return sb.toString()
|
||||||
|
}
|
||||||
|
//去重频率
|
||||||
|
fun getFrequencyText():String {//自定义衍生方法
|
||||||
|
return getCoreFrequencies()
|
||||||
|
.map { freq ->
|
||||||
|
"${formatFrequency(freq.minFreq.toULong() * 1000UL)}-${formatFrequency(freq.maxFreq.toULong() * 1000UL)}"
|
||||||
|
}
|
||||||
|
.distinct() // 自动去重
|
||||||
|
.joinToString("\n") // 每行一个
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 格式化频率显示
|
* 格式化频率显示
|
||||||
* @param freqHz 频率(Hz)
|
* @param freqHz 频率(Hz)
|
||||||
|
|||||||
@ -29,4 +29,12 @@ object SetNumberOrWordUtils {
|
|||||||
""
|
""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
将数字加1并转换为字符串
|
||||||
|
*/
|
||||||
|
fun convertToStringNormal(string: String): String {
|
||||||
|
|
||||||
|
return (Integer.parseInt(string) + 1).toString()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -2,11 +2,18 @@ package com.xyzshell.myphoneinfo.dashboard
|
|||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.xyzshell.andinfo.AndInfo
|
import com.xyzshell.andinfo.AndInfo
|
||||||
|
import com.xyzshell.andinfo.libs.cpu.models.Processor
|
||||||
import com.xyzshell.myphoneinfo.R
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.custom.SetNumberOrWordUtils.convertToStringNormal
|
||||||
import com.xyzshell.myphoneinfo.databinding.ActivityAnalysisBinding
|
import com.xyzshell.myphoneinfo.databinding.ActivityAnalysisBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemAnalysisBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemCpuAnalysisBinding
|
||||||
import com.xyzshell.myphoneinfo.dialog.DialogCpuInfo
|
import com.xyzshell.myphoneinfo.dialog.DialogCpuInfo
|
||||||
|
import kotlin.collections.component1
|
||||||
|
import kotlin.collections.component2
|
||||||
|
|
||||||
class AnalysisActivity : AppCompatActivity() {
|
class AnalysisActivity : AppCompatActivity() {
|
||||||
private lateinit var binding: ActivityAnalysisBinding
|
private lateinit var binding: ActivityAnalysisBinding
|
||||||
@ -31,25 +38,73 @@ class AnalysisActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initText() {
|
private fun initText() {
|
||||||
|
val cpu = AndInfo.instance.cpu
|
||||||
//processor
|
//processor
|
||||||
binding.proText1.textTitle.text=getString(R.string.hardware)
|
binding.proText1.textTitle.text=getString(R.string.hardware)
|
||||||
binding.proText1.textContent.text=AndInfo.instance.cpu.text()
|
binding.proText1.textContent.text=cpu.getProcessorName()
|
||||||
println(AndInfo.instance.cpu.text())
|
|
||||||
binding.proText2.textTitle.text=getString(R.string.manufacturer)
|
binding.proText2.textTitle.text=getString(R.string.manufacturer)
|
||||||
|
binding.proText2.textContent.text=cpu.getVendor()
|
||||||
binding.proText3.textTitle.text=getString(R.string.marketing_name)
|
binding.proText3.textTitle.text=getString(R.string.marketing_name)
|
||||||
|
binding.proText3.textContent.text=cpu.getProcessorName()
|
||||||
binding.proText4.textTitle.text=getString(R.string.process)
|
binding.proText4.textTitle.text=getString(R.string.process)
|
||||||
|
binding.proText4.textContent.text=cpu.getProcess()
|
||||||
binding.proText5.textTitle.text=getString(R.string.cores)
|
binding.proText5.textTitle.text=getString(R.string.cores)
|
||||||
|
binding.proText5.textContent.text=cpu.getCoreCount().toString()
|
||||||
binding.proText6.textTitle.text=getString(R.string.CPU)
|
binding.proText6.textTitle.text=getString(R.string.CPU)
|
||||||
|
binding.proText6.textContent.text=cpu.getAllArchitectures().joinToString()
|
||||||
binding.proText7.textTitle.text=getString(R.string.frequencies)
|
binding.proText7.textTitle.text=getString(R.string.frequencies)
|
||||||
|
binding.proText7.textContent.text=cpu.getFrequencyText()
|
||||||
binding.proText8.textTitle.text=getString(R.string.architecture)
|
binding.proText8.textTitle.text=getString(R.string.architecture)
|
||||||
|
binding.proText8.textContent.text=cpu.getArchitecture()
|
||||||
binding.proText9.textTitle.text=getString(R.string.ABI)
|
binding.proText9.textTitle.text=getString(R.string.ABI)
|
||||||
|
binding.proText9.textContent.text=cpu.getAbi()
|
||||||
binding.proText10.textTitle.text=getString(R.string.supported_ABls)
|
binding.proText10.textTitle.text=getString(R.string.supported_ABls)
|
||||||
|
binding.proText10.textContent.text=cpu.getSupportedAbis().joinToString()
|
||||||
binding.proText11.textTitle.text=getString(R.string.features)
|
binding.proText11.textTitle.text=getString(R.string.features)
|
||||||
//cluster1
|
binding.proText11.textContent.text=cpu.getCpuFeatures().joinToString()
|
||||||
binding.clu1Text1.textTitle.text=getString(R.string.type)
|
setCluster()
|
||||||
binding.clu1Text2.textTitle.text=getString(R.string.vendor)
|
|
||||||
binding.clu1Text3.textTitle.text=getString(R.string.cluster)
|
}
|
||||||
binding.clu1Text4.textTitle.text=getString(R.string.max_frequency)
|
|
||||||
binding.clu1Text5.textTitle.text=getString(R.string.min_frequency)
|
/**
|
||||||
|
* 设置集群信息*/
|
||||||
|
private fun setCluster() {
|
||||||
|
val groupedProcessors = mutableMapOf<UInt, MutableList<Processor>>()
|
||||||
|
//给簇分类
|
||||||
|
AndInfo.instance.cpu.processors.forEach { processor ->
|
||||||
|
val clusterId = processor.cluster.clusterId
|
||||||
|
val list = groupedProcessors.getOrPut(clusterId) { mutableListOf() }
|
||||||
|
list.add(processor)
|
||||||
|
}
|
||||||
|
groupedProcessors.forEach { (clusterId, processors) ->
|
||||||
|
println("集群 $clusterId: ${processors.size} 个处理器")
|
||||||
|
val itemView= LayoutInflater.from(this).inflate(R.layout.item_analysis,binding.llCluster,false)
|
||||||
|
val itemBinding = ItemAnalysisBinding.bind(itemView)
|
||||||
|
itemBinding.cluster1Title.text=getString(R.string.cluster)+convertToStringNormal(clusterId.toString())
|
||||||
|
val coresRangeList= mutableListOf<String>()
|
||||||
|
//获取簇范围
|
||||||
|
processors.forEach { processor ->
|
||||||
|
coresRangeList.add(processor.core.coreId.toString())
|
||||||
|
}
|
||||||
|
processors.forEach { processor ->
|
||||||
|
//设置每个cpu信息
|
||||||
|
val itemGroup= LayoutInflater.from(this).inflate(R.layout.item_cpu_analysis,itemBinding.clusterInfo,false)
|
||||||
|
val itemGroupBinding = ItemCpuAnalysisBinding.bind(itemGroup)
|
||||||
|
itemGroupBinding.cputitle.text="cpu ${processor.core.coreId}"
|
||||||
|
itemGroupBinding.clu1Text1.textTitle.text=getString(R.string.type)
|
||||||
|
itemGroupBinding.clu1Text1.textContent.text=processor.cluster.uarch.toString()
|
||||||
|
itemGroupBinding.clu1Text2.textTitle.text=getString(R.string.vendor)
|
||||||
|
itemGroupBinding.clu1Text2.textContent.text=processor.cluster.vendor.toString()
|
||||||
|
itemGroupBinding.clu1Text3.textTitle.text=getString(R.string.cluster)
|
||||||
|
itemGroupBinding.clu1Text3.textContent.text="$coresRangeList"
|
||||||
|
itemGroupBinding.clu1Text4.textTitle.text=getString(R.string.max_frequency)
|
||||||
|
itemGroupBinding.clu1Text4.textContent.text=processor.cluster.frequency.toString()+" MHz"
|
||||||
|
itemGroupBinding.clu1Text5.textTitle.text=getString(R.string.min_frequency)
|
||||||
|
itemBinding.clusterInfo.addView(itemGroup)
|
||||||
|
println(" CPU${processor.core.coreId}: ${processor.cluster.uarch}")
|
||||||
|
}
|
||||||
|
//添加到父容器
|
||||||
|
binding.llCluster.addView(itemView)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,11 +79,12 @@ class HardWareFragment : Fragment() {
|
|||||||
//硬件
|
//硬件
|
||||||
binding.text2.textTitle.text = getString(R.string.hardware)
|
binding.text2.textTitle.text = getString(R.string.hardware)
|
||||||
binding.text2.textContent.text=cpu.getProcessorName()
|
binding.text2.textContent.text=cpu.getProcessorName()
|
||||||
|
//核心数
|
||||||
binding.text3.textTitle.text = getString(R.string.cores)
|
binding.text3.textTitle.text = getString(R.string.cores)
|
||||||
binding.text3.textContent.text=cpu.cores.size.toString()
|
binding.text3.textContent.text=cpu.cores.size.toString()
|
||||||
//cpu内核详情
|
//cpu内核详情
|
||||||
binding.text4.textTitle.text = getString(R.string.CPU)
|
binding.text4.textTitle.text = getString(R.string.CPU)
|
||||||
binding.text4.textContent.text=cpu.getCpuText()
|
binding.text4.textContent.text=cpu.getAllArchitectures().joinToString()
|
||||||
//制程工艺
|
//制程工艺
|
||||||
binding.text5.textTitle.text = getString(R.string.process)
|
binding.text5.textTitle.text = getString(R.string.process)
|
||||||
binding.text5.textContent.text=cpu.getProcessInfo().process
|
binding.text5.textContent.text=cpu.getProcessInfo().process
|
||||||
@ -99,7 +100,6 @@ class HardWareFragment : Fragment() {
|
|||||||
//频率
|
//频率
|
||||||
binding.text9.textTitle.text = getString(R.string.frequencies)
|
binding.text9.textTitle.text = getString(R.string.frequencies)
|
||||||
binding.text9.textContent.text=cpu.getFrequencyText()
|
binding.text9.textContent.text=cpu.getFrequencyText()
|
||||||
println(cpu.getFrequencyText())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -125,16 +125,16 @@ class HardWareFragment : Fragment() {
|
|||||||
binding.gpuText8.textTitle.text=getString(R.string.vulkan_support)
|
binding.gpuText8.textTitle.text=getString(R.string.vulkan_support)
|
||||||
binding.gpuText9.textTitle.text=getString(R.string.vulkan_API)
|
binding.gpuText9.textTitle.text=getString(R.string.vulkan_API)
|
||||||
binding.open1.text=getString(R.string.opengl)
|
binding.open1.text=getString(R.string.opengl)
|
||||||
gpuInfo.eglInformation?.let { eglInfo ->
|
// gpuInfo.eglInformation?.let { eglInfo ->
|
||||||
eglInfo.eglExtensions?.let {
|
// eglInfo.eglExtensions?.let {
|
||||||
dialogExtension?.setContent(it.joinToString())
|
// dialogExtension?.setContent(it.joinToString())
|
||||||
}
|
// }
|
||||||
eglInfo.glInformation?.let{glInfo ->
|
// eglInfo.glInformation?.let{glInfo ->
|
||||||
binding.openItem1.text=glInfo.glVendor
|
// binding.openItem1.text=glInfo.glVendor
|
||||||
binding.openItem2.text=glInfo.glRenderer
|
// binding.openItem2.text=glInfo.glRenderer
|
||||||
binding.openItem3.text=glInfo.glVersion
|
// binding.openItem3.text=glInfo.glVersion
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//display
|
//display
|
||||||
val defaultDisplayInfo = AndInfo.instance.display.getDefaultDisplayInfo()
|
val defaultDisplayInfo = AndInfo.instance.display.getDefaultDisplayInfo()
|
||||||
if(defaultDisplayInfo!=null){
|
if(defaultDisplayInfo!=null){
|
||||||
|
|||||||
@ -3,11 +3,17 @@ package com.xyzshell.myphoneinfo.dialog
|
|||||||
import android.graphics.Typeface
|
import android.graphics.Typeface
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.SpannableString
|
import android.text.SpannableString
|
||||||
|
import android.text.style.ForegroundColorSpan
|
||||||
import android.text.style.StyleSpan
|
import android.text.style.StyleSpan
|
||||||
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import com.xyzshell.andinfo.AndInfo
|
||||||
import com.xyzshell.myphoneinfo.R
|
import com.xyzshell.myphoneinfo.R
|
||||||
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
import com.xyzshell.myphoneinfo.databinding.DialogCpuInfoBinding
|
import com.xyzshell.myphoneinfo.databinding.DialogCpuInfoBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemDialogCpuBinding
|
||||||
|
|
||||||
class DialogCpuInfo :BaseDialogFragment<DialogCpuInfoBinding>(DialogCpuInfoBinding::inflate){
|
class DialogCpuInfo :BaseDialogFragment<DialogCpuInfoBinding>(DialogCpuInfoBinding::inflate){
|
||||||
override fun getTitle(): String = resources.getString(R.string.proc_cpuinfo)
|
override fun getTitle(): String = resources.getString(R.string.proc_cpuinfo)
|
||||||
@ -18,16 +24,32 @@ class DialogCpuInfo :BaseDialogFragment<DialogCpuInfoBinding>(DialogCpuInfoBindi
|
|||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
binding.cpuTv01.text=setColonBoldText("Processor :AArch64 Processor rev 2(aarch64)")
|
val cpu = AndInfo.instance.cpu//cpu信息
|
||||||
binding.cpuTv02.text=setColonBoldText("processor :1")
|
cpu.processors.forEach { processor ->
|
||||||
binding.cpuTv03.text=setColonBoldText("BogoMIPS :3.84" )
|
val view=LayoutInflater.from(context).inflate(R.layout.item_dialog_cpu,binding.container,false)
|
||||||
binding.cpuTv04.text=setColonBoldText("Features :fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid")
|
val itemBinding= ItemDialogCpuBinding.bind(view)
|
||||||
binding.cpuTv05.text=setColonBoldText("CPU implementer :0×41")
|
|
||||||
binding.cpuTv06.text=setColonBoldText("CPU architecture :8")
|
itemBinding.cpuTv02.text=setColonBoldText("processor :${processor.core.coreId}")
|
||||||
binding.cpuTv07.text=setColonBoldText("CPU variant :0×0")
|
itemBinding.cpuTv03.text=setColonBoldText("BogoMIPS :" )
|
||||||
binding.cpuTv08.text=setColonBoldText("CPU part :0×d03")
|
itemBinding.cpuTv04.text=setColonBoldText("Features :${cpu.getCpuFeatures().joinToString(",")}")
|
||||||
binding.cpuTv09.text=setColonBoldText("CPU revision :4")
|
itemBinding.cpuTv05.text=setColonBoldText("CPU implementer :${processor.core.midr?.implementer}")
|
||||||
binding.hardwareTv.text=setColonBoldText("Hardware :vendor Kirin710")
|
itemBinding.cpuTv06.text=setColonBoldText("CPU architecture :${processor.core.midr?.architecture}")
|
||||||
|
itemBinding.cpuTv07.text=setColonBoldText("CPU variant :${processor.core.midr?.variant}")
|
||||||
|
itemBinding.cpuTv08.text=setColonBoldText("CPU part :${processor.core.midr?.primaryPartNumber}")
|
||||||
|
itemBinding.cpuTv09.text=setColonBoldText("CPU revision :${processor.core.midr?.revision}")
|
||||||
|
binding.container.addView(view)
|
||||||
|
}
|
||||||
|
binding.hardwareTv.text=setColonBoldText("Hardware :${cpu.getProcessorName()}")
|
||||||
|
// binding.cpuTv01.text=setColonBoldText("Processor :${cpu.getProcessorName()}")
|
||||||
|
// binding.cpuTv02.text=setColonBoldText("processor :1")
|
||||||
|
// binding.cpuTv03.text=setColonBoldText("BogoMIPS :3.84" )
|
||||||
|
// binding.cpuTv04.text=setColonBoldText("Features :fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid")
|
||||||
|
// binding.cpuTv05.text=setColonBoldText("CPU implementer :0×41")
|
||||||
|
// binding.cpuTv06.text=setColonBoldText("CPU architecture :8")
|
||||||
|
// binding.cpuTv07.text=setColonBoldText("CPU variant :0×0")
|
||||||
|
// binding.cpuTv08.text=setColonBoldText("CPU part :0×d03")
|
||||||
|
// binding.cpuTv09.text=setColonBoldText("CPU revision :4")
|
||||||
|
// binding.hardwareTv.text=setColonBoldText("Hardware :vendor Kirin710")
|
||||||
}
|
}
|
||||||
fun setColonBoldText( text: String) : SpannableString {
|
fun setColonBoldText( text: String) : SpannableString {
|
||||||
val colonIndex = text.indexOf(":")
|
val colonIndex = text.indexOf(":")
|
||||||
@ -40,6 +62,12 @@ class DialogCpuInfo :BaseDialogFragment<DialogCpuInfoBinding>(DialogCpuInfoBindi
|
|||||||
colonIndex,
|
colonIndex,
|
||||||
SpannableString.SPAN_INCLUSIVE_INCLUSIVE
|
SpannableString.SPAN_INCLUSIVE_INCLUSIVE
|
||||||
)
|
)
|
||||||
|
spannableString.setSpan(
|
||||||
|
ForegroundColorSpan(ContextCompat.getColor(context,R.color.left_color)),
|
||||||
|
0,
|
||||||
|
colonIndex,
|
||||||
|
SpannableString.SPAN_INCLUSIVE_EXCLUSIVE
|
||||||
|
)
|
||||||
return spannableString
|
return spannableString
|
||||||
} else {
|
} else {
|
||||||
return SpannableString(text)
|
return SpannableString(text)
|
||||||
|
|||||||
@ -33,10 +33,6 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
style="@style/TextHeavy20"/>
|
style="@style/TextHeavy20"/>
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="#BFBFBF"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
@ -171,46 +167,10 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/llCluster"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:orientation="vertical">
|
||||||
android:background="@drawable/dashboard_model_background"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingHorizontal="16dp"
|
|
||||||
android:paddingVertical="22dp"
|
|
||||||
android:visibility="visible">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cluster1Title"
|
|
||||||
style="@style/TextHeavy20"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/cluster_1"
|
|
||||||
tools:ignore="RelativeOverlap" />
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
style="@style/LeftContent"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:text="@string/cpu0"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/module_title_color"
|
|
||||||
tools:ignore="RelativeOverlap" />
|
|
||||||
<include
|
|
||||||
android:id="@+id/clu1_text1"
|
|
||||||
layout="@layout/common_text_style" />
|
|
||||||
<include
|
|
||||||
android:id="@+id/clu1_text2"
|
|
||||||
layout="@layout/common_text_style" />
|
|
||||||
<include
|
|
||||||
android:id="@+id/clu1_text3"
|
|
||||||
layout="@layout/common_text_style" />
|
|
||||||
<include
|
|
||||||
android:id="@+id/clu1_text4"
|
|
||||||
layout="@layout/common_text_style" />
|
|
||||||
<include
|
|
||||||
android:id="@+id/clu1_text5"
|
|
||||||
layout="@layout/common_text_style" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@ -16,277 +16,21 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv01"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Processor :AArch64 Processor rev 2(aarch64)"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv02"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="processor :0"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv03"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="BogoMIPS :3.84"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv04"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Features :fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv05"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU implementer :0×41"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv06"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU architecture :8"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv07"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU variant :0×0"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv08"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU part :0×d03"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv09"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU revision :4"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="50dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv11"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Processor :AArch64 Processor rev 2(aarch64)"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv12"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="processor :1"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv13"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="BogoMIPS :3.84"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv14"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Features :fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv15"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU implementer :0×41"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv16"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU architecture :8"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv17"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU variant :0×0"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv18"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU part :0×d03"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv19"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU revision :4"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="50dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv21"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Processor :AArch64 Processor rev 2(aarch64)"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv22"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="processor :2"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv23"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="BogoMIPS :3.84"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv24"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Features :fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv25"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU implementer :0×41"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv26"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU architecture :8"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv27"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU variant :0×0"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv28"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU part :0×d03"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/cpuTv29"
|
|
||||||
style="@style/TextDialogLabel"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="CPU revision :4"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textStyle="normal" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/hardwareTv"
|
android:id="@+id/hardwareTv"
|
||||||
style="@style/TextDialogLabel"
|
style="@style/LeftContent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:text="Hardware :vendor Kirin710"
|
android:text="Hardware :vendor Kirin710"
|
||||||
android:textSize="20sp"
|
android:textColor="@color/right_color"
|
||||||
android:textStyle="normal" />
|
android:textSize="18sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|||||||
30
myphoneinfo/src/main/res/layout/item_analysis.xml
Normal file
30
myphoneinfo/src/main/res/layout/item_analysis.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?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:tools="http://schemas.android.com/tools">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:background="@drawable/dashboard_model_background"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="22dp"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cluster1Title"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cluster"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/clusterInfo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
31
myphoneinfo/src/main/res/layout/item_cpu_analysis.xml
Normal file
31
myphoneinfo/src/main/res/layout/item_cpu_analysis.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cputitle"
|
||||||
|
style="@style/LeftContent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="@string/cpu0"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/module_title_color"
|
||||||
|
/>
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu1_text1"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu1_text2"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu1_text3"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu1_text4"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu1_text5"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
</LinearLayout>
|
||||||
92
myphoneinfo/src/main/res/layout/item_dialog_cpu.xml
Normal file
92
myphoneinfo/src/main/res/layout/item_dialog_cpu.xml
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<?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">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="50dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- <com.google.android.material.textview.MaterialTextView-->
|
||||||
|
<!-- android:id="@+id/cpuTv01"-->
|
||||||
|
<!-- style="@style/TextDialogLabel"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Processor :AArch64 Processor rev 2(aarch64)"-->
|
||||||
|
<!-- android:textSize="20sp"-->
|
||||||
|
<!-- android:textStyle="normal" />-->
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv02"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="processor :0"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color"/>
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv03"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="BogoMIPS :3.84"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv04"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Features :fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv05"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CPU implementer :0×41"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv06"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CPU architecture :8"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv07"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CPU variant :0×0"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv08"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CPU part :0×d03"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/cpuTv09"
|
||||||
|
style="@style/TextHeavy20"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="CPU revision :4"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/right_color" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
Loading…
Reference in New Issue
Block a user