添加base ui(未接接口版本
)
This commit is contained in:
parent
1c09303b5e
commit
97f5a58426
53
.idea/deploymentTargetSelector.xml
generated
53
.idea/deploymentTargetSelector.xml
generated
@ -1,53 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetSelector">
|
|
||||||
<selectionStates>
|
|
||||||
<SelectionState runConfigName="app">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
<DropdownSelection timestamp="2025-08-04T08:42:47.697960Z">
|
|
||||||
<Target type="DEFAULT_BOOT">
|
|
||||||
<handle>
|
|
||||||
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/mac/.android/avd/Pixel_3a_API_33_arm64-v8a.avd" />
|
|
||||||
</handle>
|
|
||||||
</Target>
|
|
||||||
</DropdownSelection>
|
|
||||||
<DialogSelection />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="mydev">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
<DropdownSelection timestamp="2025-08-16T10:30:19.858602Z">
|
|
||||||
<Target type="DEFAULT_BOOT">
|
|
||||||
<handle>
|
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=RF8N10DEVMK" />
|
|
||||||
</handle>
|
|
||||||
</Target>
|
|
||||||
</DropdownSelection>
|
|
||||||
<DialogSelection />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="MainActivity">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="PreviewMessageCard">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="InfoListPreview">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="myinfohook">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="app.myphoneinfo">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="myphoneinfo">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="GreetingPreview">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="MainActivity (1)">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
</selectionStates>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
17
.idea/misc.xml
generated
17
.idea/misc.xml
generated
@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectType">
|
|
||||||
<option name="id" value="Android" />
|
|
||||||
</component>
|
|
||||||
<component name="VisualizationToolProject">
|
|
||||||
<option name="state">
|
|
||||||
<ProjectState>
|
|
||||||
<option name="scale" value="0.16835016835016836" />
|
|
||||||
</ProjectState>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@ -37,9 +37,11 @@ material3Android = "1.3.2"
|
|||||||
lifecycleRuntimeKtx = "2.9.2"
|
lifecycleRuntimeKtx = "2.9.2"
|
||||||
composeBom = "2024.04.01"
|
composeBom = "2024.04.01"
|
||||||
koin = "4.1.0"
|
koin = "4.1.0"
|
||||||
|
activity = "1.10.1"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanistSystemuicontroller" }
|
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanistSystemuicontroller" }
|
||||||
|
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "adaptive" }
|
adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "adaptive" }
|
||||||
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
|
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
|
||||||
androidx-adaptive = { module = "androidx.compose.material3.adaptive:adaptive" }
|
androidx-adaptive = { module = "androidx.compose.material3.adaptive:adaptive" }
|
||||||
|
|||||||
6
myphoneinfo/.gitignore
vendored
6
myphoneinfo/.gitignore
vendored
@ -1 +1,7 @@
|
|||||||
/build
|
/build
|
||||||
|
/.idea/
|
||||||
|
*.iml
|
||||||
|
*.iws
|
||||||
|
*.ipr
|
||||||
|
.gradle/
|
||||||
|
local.properties
|
||||||
@ -47,6 +47,9 @@ android {
|
|||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
|
buildFeatures{
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion = "1.5.1"
|
kotlinCompilerExtensionVersion = "1.5.1"
|
||||||
}
|
}
|
||||||
@ -76,4 +79,13 @@ dependencies {
|
|||||||
androidTestImplementation(libs.androidx.ui.test.junit4)
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
||||||
debugImplementation(libs.androidx.ui.tooling)
|
debugImplementation(libs.androidx.ui.tooling)
|
||||||
debugImplementation(libs.androidx.ui.test.manifest)
|
debugImplementation(libs.androidx.ui.test.manifest)
|
||||||
|
implementation(libs.androidx.appcompat)
|
||||||
|
implementation(libs.material)
|
||||||
|
implementation(libs.androidx.activity)
|
||||||
|
implementation(libs.androidx.constraintlayout)
|
||||||
|
implementation(libs.androidx.navigation.fragment.ktx)
|
||||||
|
implementation(libs.androidx.navigation.ui.ktx)
|
||||||
|
implementation ("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
|
implementation ("androidx.gridlayout:gridlayout:1.0.0")
|
||||||
|
implementation ("com.google.android.material:material:1.12.0")
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
myphoneinfo/myphoneinfo
Normal file
BIN
myphoneinfo/myphoneinfo
Normal file
Binary file not shown.
@ -14,7 +14,38 @@
|
|||||||
android:theme="@style/Theme.MyAndriodInfo"
|
android:theme="@style/Theme.MyAndriodInfo"
|
||||||
tools:replace="android:name">
|
tools:replace="android:name">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".dashboard.SensorEachActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.TemperatureActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.CpuStatusActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.TouchActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.TestOtherActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.AnalysisActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.BlueToothActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.ToolsActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.TestActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/Theme.DevCheck" />
|
||||||
|
<activity
|
||||||
|
android:name=".dashboard.ColorsActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".main.MainScrollActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/Theme.MyAndriodInfo">
|
android:theme="@style/Theme.MyAndriodInfo">
|
||||||
|
|||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.adapter
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemAppListBinding
|
||||||
|
|
||||||
|
|
||||||
|
class AppListAdapter: RecyclerView.Adapter<AppListAdapter.ListViewHolder>() {
|
||||||
|
private lateinit var context: Context
|
||||||
|
private lateinit var listener: OnShowDialogListener
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): ListViewHolder {
|
||||||
|
context = parent.context
|
||||||
|
val binding= ItemAppListBinding.inflate(LayoutInflater.from(context), parent, false)
|
||||||
|
return ListViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(
|
||||||
|
holder: ListViewHolder,
|
||||||
|
position: Int
|
||||||
|
) {
|
||||||
|
holder.binding.view.setOnClickListener {
|
||||||
|
listener.onShowAppSelectDialog()
|
||||||
|
}
|
||||||
|
if(position==itemCount-1){
|
||||||
|
holder.binding.view2.visibility=View.VISIBLE
|
||||||
|
}else{
|
||||||
|
holder.binding.view2.visibility=View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun setOnclickListener(listener: OnShowDialogListener) {
|
||||||
|
this.listener = listener
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return 13
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListViewHolder(val binding: ItemAppListBinding): RecyclerView.ViewHolder(binding.root)
|
||||||
|
interface OnShowDialogListener {
|
||||||
|
fun onShowAppSelectDialog()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.adapter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemListCpuBinding
|
||||||
|
|
||||||
|
class CpuListAdapter: RecyclerView.Adapter<CpuListAdapter.ListViewHolder>() {
|
||||||
|
private lateinit var context: Context
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): ListViewHolder {
|
||||||
|
context = parent.context
|
||||||
|
val binding= ItemListCpuBinding.inflate(LayoutInflater.from(context), parent, false)
|
||||||
|
return ListViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(
|
||||||
|
holder: ListViewHolder,
|
||||||
|
position: Int
|
||||||
|
) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListViewHolder(val binding: ItemListCpuBinding): RecyclerView.ViewHolder(binding.root)
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.adapter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemListBinding
|
||||||
|
|
||||||
|
class ListAdapter: RecyclerView.Adapter<ListAdapter.ListViewHolder>() {
|
||||||
|
private lateinit var context: Context
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): ListViewHolder {
|
||||||
|
context = parent.context
|
||||||
|
val binding= ItemListBinding.inflate(LayoutInflater.from(context), parent, false)
|
||||||
|
return ListViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(
|
||||||
|
holder: ListViewHolder,
|
||||||
|
position: Int
|
||||||
|
) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListViewHolder(val binding: ItemListBinding): RecyclerView.ViewHolder(binding.root)
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.adapter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemCommonTempBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ItemListBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.TempDialogFragment
|
||||||
|
|
||||||
|
class TempAdapter: RecyclerView.Adapter<TempAdapter.ListViewHolder>() {
|
||||||
|
private lateinit var context: Context
|
||||||
|
private lateinit var listener: OnTempClickListener
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): ListViewHolder {
|
||||||
|
context = parent.context
|
||||||
|
val binding= ItemCommonTempBinding.inflate(LayoutInflater.from(context), parent, false)
|
||||||
|
return ListViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(
|
||||||
|
holder: ListViewHolder,
|
||||||
|
position: Int
|
||||||
|
) {
|
||||||
|
holder.binding.view.setOnClickListener {
|
||||||
|
listener.onTempClick(position)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
fun setListener(listener: OnTempClickListener){
|
||||||
|
this.listener = listener
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListViewHolder(val binding: ItemCommonTempBinding): RecyclerView.ViewHolder(binding.root)
|
||||||
|
}
|
||||||
|
interface OnTempClickListener {
|
||||||
|
fun onTempClick(position: Int)
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.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.xyzshell.myphoneinfo.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.xyzshell.myphoneinfo.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,113 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.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.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.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
|
||||||
|
|
||||||
|
abstract fun getIconRes(): Int?
|
||||||
|
|
||||||
|
open fun getDoubleBtn(): Boolean? = true
|
||||||
|
|
||||||
|
|
||||||
|
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 {iconRes ->
|
||||||
|
when (iconRes) {
|
||||||
|
1 -> baseBinding.imageIcon.setImageResource(R.mipmap.battery_ic) // 替换为实际的资源ID
|
||||||
|
2 -> baseBinding.imageIcon.setImageResource(R.mipmap.wifi)
|
||||||
|
3 -> baseBinding.imageIcon.setImageResource(R.mipmap.app_full_ic)
|
||||||
|
4 -> baseBinding.imageIcon.setImageResource(R.mipmap.display)
|
||||||
|
5 -> baseBinding.imageIcon.setImageResource(R.mipmap.blue_tooth_ic)
|
||||||
|
6 -> baseBinding.imageIcon.setImageResource(R.mipmap.mem_ic)
|
||||||
|
7-> baseBinding.imageIcon.setImageResource(R.mipmap.setting_ic)
|
||||||
|
8 -> baseBinding.imageIcon.setImageResource(R.mipmap.storyge)
|
||||||
|
9 -> baseBinding.imageIcon.setImageResource(R.mipmap.camera_ic)
|
||||||
|
10 -> baseBinding.imageIcon.setImageResource(R.mipmap.input_ic)
|
||||||
|
// 添加更多数字对应的图片...
|
||||||
|
else -> baseBinding.imageIcon.setImageResource(R.mipmap.main_logo)
|
||||||
|
}
|
||||||
|
baseBinding.imageIcon.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
if(getDoubleBtn() == true){
|
||||||
|
baseBinding.textCancel.visibility = View.VISIBLE
|
||||||
|
baseBinding.textSettings.visibility = View.VISIBLE
|
||||||
|
baseBinding.textOk.visibility = View.GONE
|
||||||
|
}else{
|
||||||
|
baseBinding.textCancel.visibility = View.GONE
|
||||||
|
baseBinding.textSettings.visibility = View.GONE
|
||||||
|
baseBinding.textOk.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
baseBinding.textCancel.setOnClickListener {
|
||||||
|
onPositiveClick()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
baseBinding.textSettings.setOnClickListener {
|
||||||
|
onNegativeClick()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
baseBinding.textOk.setOnClickListener {
|
||||||
|
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.xyzshell.myphoneinfo.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.xyzshell.myphoneinfo.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.xyzshell.myphoneinfo.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,66 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.custom
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Canvas
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.Paint
|
||||||
|
import android.graphics.RectF
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.View
|
||||||
|
import androidx.core.graphics.toColorInt
|
||||||
|
|
||||||
|
class SignalStrengthView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : View(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
|
private val barPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
|
||||||
|
style = Paint.Style.FILL
|
||||||
|
}
|
||||||
|
|
||||||
|
private val inactiveColor = "#eeeeee".toColorInt()
|
||||||
|
private val activeColor = "#1E8C29".toColorInt()
|
||||||
|
|
||||||
|
private var strengthLevel: Int = 0
|
||||||
|
private val maxBars = 5
|
||||||
|
|
||||||
|
// 设置信号强度 (0-5)
|
||||||
|
fun setStrength(level: Int) {
|
||||||
|
strengthLevel = level.coerceIn(0, maxBars)
|
||||||
|
invalidate() // 触发重绘
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前信号强度
|
||||||
|
fun getStrength(): Int = strengthLevel
|
||||||
|
|
||||||
|
override fun onDraw(canvas: Canvas) {
|
||||||
|
super.onDraw(canvas)
|
||||||
|
|
||||||
|
val width = width.toFloat()
|
||||||
|
val height = height.toFloat()
|
||||||
|
|
||||||
|
// 计算每个柱状条的宽度和间距
|
||||||
|
val barWidth = width / (maxBars * 2 - 1)
|
||||||
|
val spacing = barWidth/4
|
||||||
|
|
||||||
|
// 绘制5个柱状条
|
||||||
|
for (i in 0 until maxBars) {
|
||||||
|
// 确定柱状条的颜色
|
||||||
|
val color = if (i < strengthLevel) activeColor else inactiveColor
|
||||||
|
barPaint.color = color
|
||||||
|
|
||||||
|
// 计算柱状条的位置和高度
|
||||||
|
val left = i * (barWidth + spacing)
|
||||||
|
val barHeight = height * (i + 1) / maxBars
|
||||||
|
val top = height - barHeight
|
||||||
|
val right = left + barWidth
|
||||||
|
val bottom = height
|
||||||
|
|
||||||
|
// 绘制圆角矩形柱状条
|
||||||
|
val rect = RectF(left, top, right, bottom)
|
||||||
|
val cornerRadius = barWidth / 4
|
||||||
|
canvas.drawRoundRect(rect, cornerRadius, cornerRadius, barPaint)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityAnalysisBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogCpuInfo
|
||||||
|
|
||||||
|
class AnalysisActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityAnalysisBinding
|
||||||
|
private var dialogCpuInfo: DialogCpuInfo? = null
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityAnalysisBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
binding.timeShow.setOnClickListener {
|
||||||
|
startActivity(Intent(this, CpuStatusActivity::class.java))
|
||||||
|
}
|
||||||
|
binding.backBtn.setOnClickListener { finish() }
|
||||||
|
initText()
|
||||||
|
initShow()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initShow() {
|
||||||
|
binding.infoShow.setOnClickListener {
|
||||||
|
dialogCpuInfo = dialogCpuInfo ?: DialogCpuInfo()
|
||||||
|
dialogCpuInfo?.show(supportFragmentManager, "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initText() {
|
||||||
|
//processor
|
||||||
|
binding.proText1.textTitle.text=getString(R.string.hardware)
|
||||||
|
binding.proText2.textTitle.text=getString(R.string.manufacturer)
|
||||||
|
binding.proText3.textTitle.text=getString(R.string.marketing_name)
|
||||||
|
binding.proText4.textTitle.text=getString(R.string.process)
|
||||||
|
binding.proText5.textTitle.text=getString(R.string.cores)
|
||||||
|
binding.proText6.textTitle.text=getString(R.string.CPU)
|
||||||
|
binding.proText7.textTitle.text=getString(R.string.frequencies)
|
||||||
|
binding.proText8.textTitle.text=getString(R.string.architecture)
|
||||||
|
binding.proText9.textTitle.text=getString(R.string.ABI)
|
||||||
|
binding.proText10.textTitle.text=getString(R.string.supported_ABls)
|
||||||
|
binding.proText11.textTitle.text=getString(R.string.features)
|
||||||
|
//cluster1
|
||||||
|
binding.clu1Text1.textTitle.text=getString(R.string.type)
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.adapter.AppListAdapter
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentAppsBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.AppDialogFragment
|
||||||
|
|
||||||
|
class AppsFragment : Fragment(),AppListAdapter.OnShowDialogListener {
|
||||||
|
private lateinit var binding: FragmentAppsBinding
|
||||||
|
private lateinit var dialogFragment: AppDialogFragment
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
binding = FragmentAppsBinding.inflate(inflater, container, false)
|
||||||
|
val adapter= AppListAdapter()
|
||||||
|
adapter.setOnclickListener(this)
|
||||||
|
binding.recyclerView.adapter = adapter
|
||||||
|
binding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun newInstance() =
|
||||||
|
AppsFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onShowAppSelectDialog() {
|
||||||
|
dialogFragment = AppDialogFragment()
|
||||||
|
dialogFragment.show(requireActivity().supportFragmentManager, "AppDialogFragment")
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
|
||||||
|
class BatteryFragment : Fragment() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_battery, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance() =
|
||||||
|
BatteryFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.adapter.ListAdapter
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityBlueToothBinding
|
||||||
|
|
||||||
|
class BlueToothActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityBlueToothBinding
|
||||||
|
companion object{
|
||||||
|
val TITLE_KEY="title"
|
||||||
|
}
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityBlueToothBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
binding.recyclerView.adapter= ListAdapter()
|
||||||
|
binding.recyclerView.layoutManager= LinearLayoutManager(this)
|
||||||
|
binding.titleText.text=intent.getStringExtra(TITLE_KEY)
|
||||||
|
binding.backBtn.setOnClickListener { finish() }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentCameraBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogCameraMore
|
||||||
|
|
||||||
|
class CameraFragment : Fragment() {
|
||||||
|
private lateinit var binding:FragmentCameraBinding;
|
||||||
|
private var dialogCamera0: DialogCameraMore? = null
|
||||||
|
private var dialogCamera1: DialogCameraMore? = null
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
arguments?.let {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
binding = FragmentCameraBinding.inflate(inflater, container, false)
|
||||||
|
initText()
|
||||||
|
binding.rearMore.setOnClickListener {
|
||||||
|
dialogCamera0= dialogCamera0?:DialogCameraMore(0)
|
||||||
|
dialogCamera0?.show(childFragmentManager, "DialogCameraMore0")
|
||||||
|
}
|
||||||
|
binding.frontMore.setOnClickListener {
|
||||||
|
dialogCamera1= dialogCamera1?:DialogCameraMore(1)
|
||||||
|
dialogCamera1?.show(childFragmentManager, "DialogCameraMore1")
|
||||||
|
}
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initText() {
|
||||||
|
binding.rearCheck1.content.text=getString(R.string.optical_image_stabilization)
|
||||||
|
binding.rearCheck2.content.text=getString(R.string.flash)
|
||||||
|
binding.frontCheck1.content.text=getString(R.string.optical_image_stabilization)
|
||||||
|
binding.frontCheck2.content.text=getString(R.string.flash)
|
||||||
|
binding.videoCheck1.content.text=getString(R.string.hight_speed_video)
|
||||||
|
binding.videoCheck2.content.text=getString(R.string.video_stabilization)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun newInstance() =
|
||||||
|
CameraFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityColorsBinding
|
||||||
|
import androidx.core.graphics.toColorInt
|
||||||
|
|
||||||
|
class ColorsActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding:ActivityColorsBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding=ActivityColorsBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
val colorList = listOf("#D9D9D9","#FF6262","#C3FF62","#62FFC8","#46CEFF","#9946FF","#FFE062","#FF9C46","#FF46D7","#101010")
|
||||||
|
binding.colorPage1.continueL.setOnClickListener {
|
||||||
|
binding.colorPage1.continueL.visibility= View.GONE
|
||||||
|
binding.colorPage1.colorL.visibility= View.VISIBLE
|
||||||
|
}
|
||||||
|
val colorView=listOf(binding.colorPage1.color1,binding.colorPage1.color2,binding.colorPage1.color3,binding.colorPage1.color4,binding.colorPage1.color5,binding.colorPage1.color6,binding.colorPage1.color7,binding.colorPage1.color8,binding.colorPage1.color9)
|
||||||
|
for (i in 0 until colorList.size-1) {
|
||||||
|
colorView[i].setOnClickListener { v->
|
||||||
|
binding.colorPage1.root.visibility= View.GONE
|
||||||
|
binding.colorPage2.root.visibility= View.VISIBLE
|
||||||
|
binding.colorPage2.view.setBackgroundColor(colorList[i].toColorInt())
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseAdapter
|
||||||
|
import com.xyzshell.myphoneinfo.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,40 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.xyzshell.myphoneinfo.adapter.CpuListAdapter
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityCpuStatusBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.CustomPopView
|
||||||
|
|
||||||
|
|
||||||
|
class CpuStatusActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding : ActivityCpuStatusBinding
|
||||||
|
private lateinit var customPopView: CustomPopView
|
||||||
|
private lateinit var popSleepView: CustomPopView
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityCpuStatusBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
customPopView =CustomPopView(this,0,callback = {text->
|
||||||
|
binding.popText.text = text
|
||||||
|
})
|
||||||
|
popSleepView = CustomPopView(this,1,callback = {text->
|
||||||
|
|
||||||
|
})
|
||||||
|
binding.popClick.setOnClickListener {
|
||||||
|
customPopView.show(binding.topTitle)
|
||||||
|
}
|
||||||
|
binding.moreBtn.setOnClickListener {
|
||||||
|
popSleepView.show(binding.moreBtn)
|
||||||
|
}
|
||||||
|
binding.cpuList.adapter= CpuListAdapter()
|
||||||
|
binding.cpuList.layoutManager= LinearLayoutManager(this)
|
||||||
|
binding.backBtn.setOnClickListener { finish() }
|
||||||
|
}
|
||||||
|
override fun onDestroy() {
|
||||||
|
if (customPopView.isShowing()) {
|
||||||
|
customPopView.dismiss();
|
||||||
|
}
|
||||||
|
super.onDestroy()}
|
||||||
|
}
|
||||||
@ -0,0 +1,145 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentDashboardBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogAppInstall
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogBattery
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogDisplay
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogMemory
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogNetwork
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogOperating
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogStorage
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
private var dialogOperating: DialogOperating? = null
|
||||||
|
private var dialogAppInstall: DialogAppInstall? = null
|
||||||
|
private var dialogMemory: DialogMemory? = null
|
||||||
|
private var dialogStorage: DialogStorage? = 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.layoutCpu.showCpu.setOnClickListener {
|
||||||
|
startActivity(Intent(requireContext(), CpuStatusActivity::class.java))
|
||||||
|
}
|
||||||
|
binding.layoutCpu.moduleCpu.setOnClickListener {
|
||||||
|
startActivity(Intent(requireContext(), TemperatureActivity::class.java))
|
||||||
|
}
|
||||||
|
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, "")
|
||||||
|
}
|
||||||
|
relayoutApps.setOnClickListener {
|
||||||
|
dialogAppInstall = dialogAppInstall ?: DialogAppInstall()
|
||||||
|
dialogAppInstall?.show(parentFragmentManager, "")
|
||||||
|
}
|
||||||
|
relayoutRam.setOnClickListener {
|
||||||
|
dialogMemory = dialogMemory ?: DialogMemory()
|
||||||
|
dialogMemory?.show(parentFragmentManager, "")
|
||||||
|
}
|
||||||
|
relayoutStorage.setOnClickListener {
|
||||||
|
dialogStorage = dialogStorage ?: DialogStorage()
|
||||||
|
dialogStorage?.show(parentFragmentManager, "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.layoutBottom.run {
|
||||||
|
relayoutTools.setOnClickListener {
|
||||||
|
startActivity(Intent(requireContext(), ToolsActivity::class.java))
|
||||||
|
}
|
||||||
|
relayoutTests.setOnClickListener {
|
||||||
|
startActivity(Intent(requireContext(), TestActivity::class.java))
|
||||||
|
}
|
||||||
|
relayoutPhoneInfo.setOnClickListener {
|
||||||
|
dialogOperating = dialogOperating ?: DialogOperating()
|
||||||
|
dialogOperating?.show(parentFragmentManager, "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentHardWareBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogBlueTooth
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogDiskPart
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogExtension
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.DialogInput
|
||||||
|
|
||||||
|
class HardWareFragment : Fragment() {
|
||||||
|
private lateinit var binding: FragmentHardWareBinding
|
||||||
|
private var dialogBlueTooth: DialogBlueTooth? = null
|
||||||
|
private var dialogInput: DialogInput? = null
|
||||||
|
private var dialogExtension: DialogExtension? = null
|
||||||
|
private var dialogDiskPart: DialogDiskPart? = null
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
binding = FragmentHardWareBinding.inflate(inflater, container, false)
|
||||||
|
binding.cpuBtn.setOnClickListener {
|
||||||
|
var intent=Intent(requireContext(), AnalysisActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.pair1.setOnClickListener {
|
||||||
|
dialogBlueTooth= dialogBlueTooth?: DialogBlueTooth()
|
||||||
|
dialogBlueTooth?.show(childFragmentManager, "BlueTooth1")
|
||||||
|
}
|
||||||
|
binding.pair2.setOnClickListener {
|
||||||
|
dialogBlueTooth= dialogBlueTooth?: DialogBlueTooth()
|
||||||
|
dialogBlueTooth?.show(childFragmentManager, "BlueTooth2")
|
||||||
|
}
|
||||||
|
binding.othertext.setOnClickListener {
|
||||||
|
dialogInput=dialogInput?: DialogInput()
|
||||||
|
dialogInput?.show(childFragmentManager, "Input")
|
||||||
|
}
|
||||||
|
binding.extensionShow.setOnClickListener {
|
||||||
|
dialogExtension=dialogExtension?: DialogExtension()
|
||||||
|
dialogExtension?.show(childFragmentManager, "Extention")
|
||||||
|
}
|
||||||
|
binding.disktext.setOnClickListener {
|
||||||
|
dialogDiskPart=dialogDiskPart?: DialogDiskPart()
|
||||||
|
dialogDiskPart?.show(childFragmentManager, "DiskPart")
|
||||||
|
}
|
||||||
|
initText()
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initText() {
|
||||||
|
//processor
|
||||||
|
binding.text1.textTitle.text = getString(R.string.vendor)
|
||||||
|
binding.text1.textContent.text=getString(R.string.apps)
|
||||||
|
binding.text2.textTitle.text = getString(R.string.hardware)
|
||||||
|
binding.text3.textTitle.text = getString(R.string.cores)
|
||||||
|
binding.text4.textTitle.text = getString(R.string.CPU)
|
||||||
|
binding.text5.textTitle.text = getString(R.string.process)
|
||||||
|
binding.text6.textTitle.text = getString(R.string.architecture)
|
||||||
|
binding.text7.textTitle.text = getString(R.string.ABI)
|
||||||
|
binding.text8.textTitle.text = getString(R.string.supported_ABls)
|
||||||
|
binding.text9.textTitle.text = getString(R.string.frequencies)
|
||||||
|
|
||||||
|
//gpu
|
||||||
|
binding.cpuText1.textTitle.text = getString(R.string.vendor)
|
||||||
|
binding.cpuText1.textContent.text=getString(R.string.apps)
|
||||||
|
binding.cpuText2.textTitle.text = getString(R.string.gpu)
|
||||||
|
binding.cpuText3.textTitle.text=getString(R.string.max_frequency)
|
||||||
|
binding.cpuText4.textTitle.text=getString(R.string.architecture)
|
||||||
|
binding.cpuText5.textTitle.text=getString(R.string.cores)
|
||||||
|
binding.cpuText6.textTitle.text=getString(R.string.total_l2)
|
||||||
|
binding.cpuText7.textTitle.text=getString(R.string.bus_width)
|
||||||
|
binding.cpuText8.textTitle.text=getString(R.string.vulkan_support)
|
||||||
|
binding.cpuText9.textTitle.text=getString(R.string.vulkan_API)
|
||||||
|
|
||||||
|
//display
|
||||||
|
binding.disText1.textTitle.text=getString(R.string.resolution)
|
||||||
|
binding.disText2.textTitle.text=getString(R.string.screen_density)
|
||||||
|
binding.disText3.textTitle.text=getString(R.string.screen_density_d)
|
||||||
|
binding.disText4.textTitle.text=getString(R.string.screen_size_e)
|
||||||
|
binding.disText5.textTitle.text=getString(R.string.aspect_ratio)
|
||||||
|
binding.disText6.textTitle.text=getString(R.string.refresh_rate)
|
||||||
|
binding.disText7.textTitle.text=getString(R.string.wide_color_gamut)
|
||||||
|
binding.disText8.textTitle.text=getString(R.string.hdr_support)
|
||||||
|
|
||||||
|
//memory
|
||||||
|
binding.memText1.textTitle.text=getString(R.string.ram_size)
|
||||||
|
|
||||||
|
//storage
|
||||||
|
binding.storText1.textTitle.text=getString(R.string.filesystem)
|
||||||
|
binding.storText2.textTitle.text=getString(R.string.block_size)
|
||||||
|
|
||||||
|
//Audio
|
||||||
|
binding.check1.content.text=getString(R.string.low_audio)
|
||||||
|
binding.check2.content.text=getString(R.string.pro_audio)
|
||||||
|
binding.check3.content.text=getString(R.string.midl)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun newInstance() =
|
||||||
|
HardWareFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentNetworkBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.ShowLoadFragment
|
||||||
|
|
||||||
|
class NetworkFragment : Fragment() {
|
||||||
|
|
||||||
|
private var status=1//0:未连接,1:已连接
|
||||||
|
private lateinit var binding:FragmentNetworkBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
binding = FragmentNetworkBinding.inflate(inflater, container, false)
|
||||||
|
// binding.signalStrength.setStrength(4)
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
if(status==0){
|
||||||
|
binding.noConnect.visibility=View.VISIBLE
|
||||||
|
binding.connectData.visibility=View.GONE
|
||||||
|
binding.wifiDev1.text="Disconnected"
|
||||||
|
binding.wifiList.visibility=View.GONE
|
||||||
|
binding.llPubShow.visibility=View.GONE
|
||||||
|
}else{
|
||||||
|
binding.noConnect.visibility=View.GONE
|
||||||
|
binding.connectData.visibility=View.VISIBLE
|
||||||
|
binding.wifiDev1.text="Connected"
|
||||||
|
binding.wifiList.visibility=View.VISIBLE
|
||||||
|
binding.llPubShow.visibility=View.VISIBLE
|
||||||
|
}
|
||||||
|
binding.pubShow.setOnClickListener{
|
||||||
|
val tag = "showLoadFragment"
|
||||||
|
if (requireActivity().supportFragmentManager.findFragmentByTag(tag) == null) {
|
||||||
|
val showLoadFragment = ShowLoadFragment()
|
||||||
|
showLoadFragment.show(requireActivity().supportFragmentManager, tag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun newInstance() =
|
||||||
|
NetworkFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivitySensorEachBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.CustomPopView
|
||||||
|
|
||||||
|
class SensorEachActivity : AppCompatActivity() {
|
||||||
|
companion object{
|
||||||
|
const val TOP_TITLE = "title"
|
||||||
|
}
|
||||||
|
private lateinit var customPopView: CustomPopView
|
||||||
|
private lateinit var binding: ActivitySensorEachBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivitySensorEachBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
val stringExtra = intent.getStringExtra(TOP_TITLE)
|
||||||
|
binding.title.text = stringExtra
|
||||||
|
binding.imgBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
customPopView =CustomPopView(this,4,callback = {text->
|
||||||
|
|
||||||
|
})
|
||||||
|
binding.imageTool.setOnClickListener {
|
||||||
|
customPopView.show(binding.imageTool)
|
||||||
|
}
|
||||||
|
initText()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initText() {
|
||||||
|
binding.infoText1.textTitle.text = getString(R.string.manufacturer)
|
||||||
|
binding.infoText2.textTitle.text = getString(R.string.model)
|
||||||
|
binding.infoText3.textTitle.text = getString(R.string.resolution)
|
||||||
|
binding.infoText4.textTitle.text = getString(R.string.maximum_range)
|
||||||
|
binding.infoText5.textTitle.text = getString(R.string.power)
|
||||||
|
binding.infoText6.textTitle.text = getString(R.string.wakeup_sensor)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,140 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentSensorsBinding
|
||||||
|
|
||||||
|
class SensorsFragment : Fragment() {
|
||||||
|
private lateinit var binding: FragmentSensorsBinding
|
||||||
|
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
binding = FragmentSensorsBinding.inflate(inflater, container, false)
|
||||||
|
initView()
|
||||||
|
binding.sensor1.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), TemperatureActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor2.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.accelerometer))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor3.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.magnetic_field))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor4.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.orientation))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor5.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.light))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor6.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.proximity))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor7.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.gravity))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor8.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.linear_acceleration))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor9.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.rotation_vector))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.sensor10.root.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), SensorEachActivity::class.java)
|
||||||
|
intent.putExtra(SensorEachActivity.TOP_TITLE, getString(R.string.step_counter))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
binding.sensor1.sensorName.text=getString(R.string.temperatures)
|
||||||
|
binding.sensor2.sensorName.text=getString(R.string.accelerometer)
|
||||||
|
binding.sensor3.sensorName.text=getString(R.string.magnetic_field)
|
||||||
|
binding.sensor4.sensorName.text=getString(R.string.orientation)
|
||||||
|
binding.sensor5.sensorName.text=getString(R.string.light)
|
||||||
|
binding.sensor6.sensorName.text=getString(R.string.proximity)
|
||||||
|
binding.sensor7.sensorName.text=getString(R.string.gravity)
|
||||||
|
binding.sensor8.sensorName.text=getString(R.string.linear_acceleration)
|
||||||
|
binding.sensor9.sensorName.text=getString(R.string.rotation_vector)
|
||||||
|
binding.sensor10.sensorName.text=getString(R.string.step_counter)
|
||||||
|
|
||||||
|
binding.hallText1.textTitle.text=getString(R.string.manufacturer)
|
||||||
|
binding.hallText2.textTitle.text=getString(R.string.type)
|
||||||
|
binding.hallText3.textTitle.text=getString(R.string.resolution)
|
||||||
|
binding.hallText4.textTitle.text=getString(R.string.maximum_range)
|
||||||
|
binding.hallText5.textTitle.text=getString(R.string.power)
|
||||||
|
binding.hallText6.textTitle.text=getString(R.string.wakeup_sensor)
|
||||||
|
|
||||||
|
binding.signText1.textTitle.text=getString(R.string.manufacturer)
|
||||||
|
binding.signText2.textTitle.text=getString(R.string.type)
|
||||||
|
binding.signText3.textTitle.text=getString(R.string.resolution)
|
||||||
|
binding.signText4.textTitle.text=getString(R.string.maximum_range)
|
||||||
|
binding.signText5.textTitle.text=getString(R.string.power)
|
||||||
|
binding.signText6.textTitle.text=getString(R.string.wakeup_sensor)
|
||||||
|
|
||||||
|
binding.geoText1.textTitle.text=getString(R.string.manufacturer)
|
||||||
|
binding.geoText2.textTitle.text=getString(R.string.type)
|
||||||
|
binding.geoText3.textTitle.text=getString(R.string.resolution)
|
||||||
|
binding.geoText4.textTitle.text=getString(R.string.maximum_range)
|
||||||
|
binding.geoText5.textTitle.text=getString(R.string.power)
|
||||||
|
binding.geoText6.textTitle.text=getString(R.string.wakeup_sensor)
|
||||||
|
|
||||||
|
binding.rpcText1.textTitle.text=getString(R.string.manufacturer)
|
||||||
|
binding.rpcText2.textTitle.text=getString(R.string.type)
|
||||||
|
binding.rpcText3.textTitle.text=getString(R.string.resolution)
|
||||||
|
binding.rpcText4.textTitle.text=getString(R.string.maximum_range)
|
||||||
|
binding.rpcText5.textTitle.text=getString(R.string.power)
|
||||||
|
binding.rpcText6.textTitle.text=getString(R.string.wakeup_sensor)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment SensorsFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
@JvmStatic
|
||||||
|
fun newInstance() =
|
||||||
|
SensorsFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
|
||||||
|
class SystemShowFragment : Fragment() {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View? {
|
||||||
|
return inflater.inflate(R.layout.fragment_system_show, container, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun newInstance() =
|
||||||
|
SystemShowFragment().apply {
|
||||||
|
arguments = Bundle().apply {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.Gravity
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.adapter.OnTempClickListener
|
||||||
|
import com.xyzshell.myphoneinfo.adapter.TempAdapter
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityTemperatureBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.CustomPopView
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.TempDialogFragment
|
||||||
|
|
||||||
|
class TemperatureActivity : AppCompatActivity(),OnTempClickListener {
|
||||||
|
private lateinit var binding: ActivityTemperatureBinding
|
||||||
|
private lateinit var customPopView: CustomPopView
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityTemperatureBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
binding.imageBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
val tempAdapter = TempAdapter()
|
||||||
|
tempAdapter.setListener(this)
|
||||||
|
binding.rvTemperature.adapter = tempAdapter
|
||||||
|
binding.rvTemperature.layoutManager =LinearLayoutManager(this)
|
||||||
|
customPopView =CustomPopView(this,3,callback = {text->
|
||||||
|
|
||||||
|
})
|
||||||
|
binding.imageTool.setOnClickListener {
|
||||||
|
customPopView.show(binding.imageTool)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTempClick(position: Int) {
|
||||||
|
val tempDialog = TempDialogFragment()
|
||||||
|
tempDialog.show(supportFragmentManager, "tempDialog")
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityTestBinding
|
||||||
|
|
||||||
|
class TestActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityTestBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityTestBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
initView()
|
||||||
|
initClick()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initClick() {
|
||||||
|
binding.backBtn.setOnClickListener { finish() }
|
||||||
|
binding.toolItem1.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.flashlight))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem2.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.vibration))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem3.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.buttons))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem4.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TouchActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem5.root.setOnClickListener {
|
||||||
|
intent = Intent(this, ColorsActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem6.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.backlight))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem7.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.light_sensor))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem8.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.proximity))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.toolItem9.root.setOnClickListener {
|
||||||
|
intent = Intent(this, TestOtherActivity::class.java)
|
||||||
|
intent.putExtra(TestOtherActivity.TYPE_KEY, getString(R.string.accelerometer))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
binding.toolItem1.ivIcon.setImageResource(R.mipmap.flash)
|
||||||
|
binding.toolItem1.tvLabel.text = getString(R.string.flashlight)
|
||||||
|
binding.toolItem1.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem2.ivIcon.setImageResource(R.mipmap.vibration)
|
||||||
|
binding.toolItem2.tvLabel.text = getString(R.string.vibration)
|
||||||
|
binding.toolItem2.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem3.ivIcon.setImageResource(R.mipmap.button)
|
||||||
|
binding.toolItem3.tvLabel.text = getString(R.string.buttons)
|
||||||
|
binding.toolItem3.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem4.ivIcon.setImageResource(R.mipmap.multi)
|
||||||
|
binding.toolItem4.tvLabel.text = getString(R.string.multitouch)
|
||||||
|
binding.toolItem4.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem5.ivIcon.setImageResource(R.mipmap.display)
|
||||||
|
binding.toolItem5.tvLabel.text = getString(R.string.displays)
|
||||||
|
binding.toolItem5.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem6.ivIcon.setImageResource(R.mipmap.back)
|
||||||
|
binding.toolItem6.tvLabel.text = getString(R.string.backlight)
|
||||||
|
binding.toolItem6.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem7.ivIcon.setImageResource(R.mipmap.light)
|
||||||
|
binding.toolItem7.tvLabel.text = getString(R.string.light_sensor)
|
||||||
|
binding.toolItem7.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem8.ivIcon.setImageResource(R.mipmap.proxi)
|
||||||
|
binding.toolItem8.tvLabel.text = getString(R.string.proximity)
|
||||||
|
binding.toolItem8.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
|
||||||
|
binding.toolItem9.ivIcon.setImageResource(R.mipmap.acceler)
|
||||||
|
binding.toolItem9.tvLabel.text = getString(R.string.accelerometer)
|
||||||
|
binding.toolItem9.ivEnd.setImageResource(R.mipmap.vector)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityTestOtherBinding
|
||||||
|
|
||||||
|
class TestOtherActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityTestOtherBinding
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
var TYPE_KEY = "type"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityTestOtherBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
binding.back.setOnClickListener { finish() }
|
||||||
|
when (intent.getStringExtra(TYPE_KEY)) {
|
||||||
|
getString(R.string.flashlight) -> {
|
||||||
|
binding.title.text = getString(R.string.flashlight)
|
||||||
|
binding.icon.setImageResource(R.mipmap.big_icon_1)
|
||||||
|
}
|
||||||
|
|
||||||
|
getString(R.string.vibration) -> {
|
||||||
|
binding.title.text = getString(R.string.vibration)
|
||||||
|
binding.icon.setImageResource(R.mipmap.big_icon_2)
|
||||||
|
}
|
||||||
|
|
||||||
|
getString(R.string.buttons) -> {
|
||||||
|
binding.title.text = getString(R.string.buttons)
|
||||||
|
binding.icon.setImageResource(R.mipmap.big_icon_3)
|
||||||
|
binding.button.visibility = View.VISIBLE
|
||||||
|
binding.titleDialog.text=getString(R.string.did_you_get_feedback)
|
||||||
|
}
|
||||||
|
|
||||||
|
getString(R.string.backlight) -> {
|
||||||
|
binding.title.text = getString(R.string.backlight)
|
||||||
|
binding.icon.setImageResource(R.mipmap.big_icon_4)
|
||||||
|
binding.backLight.visibility = View.VISIBLE
|
||||||
|
binding.titleDialog.text=getString(R.string.did_you_get_feedback)
|
||||||
|
}
|
||||||
|
getString(R.string.light_sensor)->{
|
||||||
|
binding.title.text = getString(R.string.light_sensor)
|
||||||
|
binding.icon.visibility = View.GONE
|
||||||
|
binding.sensor.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
getString(R.string.proximity)->{
|
||||||
|
binding.title.text = getString(R.string.proximity)
|
||||||
|
binding.icon.visibility = View.GONE
|
||||||
|
binding.proximity.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
getString(R.string.accelerometer)->{
|
||||||
|
binding.title.text = getString(R.string.accelerometer)
|
||||||
|
binding.icon.visibility = View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityToolsBinding
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
|
||||||
|
class ToolsActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityToolsBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityToolsBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
binding.toolItem1.ivIcon.setImageResource(R.mipmap.key)
|
||||||
|
binding.toolItem1.tvLabel.text=getString(R.string.root_check)
|
||||||
|
binding.noDevice.visibility=View.GONE
|
||||||
|
|
||||||
|
binding.toolItem2.ivIcon.setImageResource(R.mipmap.blue_tooth)
|
||||||
|
binding.toolItem2.tvLabel.text=getString(R.string.bluetooth)
|
||||||
|
binding.llBlue.visibility=View.GONE
|
||||||
|
|
||||||
|
|
||||||
|
binding.toolItem3.ivIcon.setImageResource(R.mipmap.cpu)
|
||||||
|
binding.toolItem3.tvLabel.text=getString(R.string.cpu_analysis)
|
||||||
|
initView()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
binding.toolItem1.root.setOnClickListener {
|
||||||
|
var isExpand = binding.noDevice.isVisible
|
||||||
|
if(isExpand){
|
||||||
|
binding.noDevice.visibility=View.GONE
|
||||||
|
}else{
|
||||||
|
binding.noDevice.visibility=View.VISIBLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.toolItem2.root.setOnClickListener {
|
||||||
|
var isExpand = binding.llBlue.isVisible
|
||||||
|
if(isExpand){
|
||||||
|
binding.llBlue.visibility=View.GONE
|
||||||
|
}else{
|
||||||
|
binding.llBlue.visibility=View.VISIBLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.llPair.setOnClickListener {
|
||||||
|
intent=Intent(this, BlueToothActivity::class.java)
|
||||||
|
intent.putExtra(BlueToothActivity.TITLE_KEY, getString(R.string.paired_devices))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.llNear.setOnClickListener {
|
||||||
|
intent=Intent(this, BlueToothActivity::class.java)
|
||||||
|
intent.putExtra(BlueToothActivity.TITLE_KEY, getString(R.string.nearby_devices))
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.tool3.setOnClickListener {
|
||||||
|
intent=Intent(this, AnalysisActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dashboard
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityTouchBinding
|
||||||
|
|
||||||
|
class TouchActivity : AppCompatActivity() {
|
||||||
|
private lateinit var binding: ActivityTouchBinding
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityTouchBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
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 com.xyzshell.myphoneinfo.databinding.DialogAppClickBinding
|
||||||
|
|
||||||
|
class AppDialogFragment : DialogFragment() {
|
||||||
|
|
||||||
|
private var _binding: DialogAppClickBinding? = null
|
||||||
|
private val baseBinding get() = _binding!!
|
||||||
|
|
||||||
|
|
||||||
|
open fun onPositiveClick() {}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
_binding = DialogAppClickBinding.inflate(inflater, container, false)
|
||||||
|
return baseBinding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
baseBinding.textCancel.setOnClickListener {
|
||||||
|
onPositiveClick()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.PopupWindow
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.PopupLayoutBinding
|
||||||
|
import androidx.core.graphics.drawable.toDrawable
|
||||||
|
|
||||||
|
class CustomPopView(context: Context, type: Int, private val callback: (String) -> Unit) {
|
||||||
|
private val context: Context = context
|
||||||
|
private val type: Int = type
|
||||||
|
private lateinit var popupWindow: PopupWindow
|
||||||
|
private lateinit var binding: PopupLayoutBinding
|
||||||
|
|
||||||
|
init {
|
||||||
|
initPopupWindow()
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("ServiceCast")
|
||||||
|
private fun initPopupWindow() {
|
||||||
|
// 初始化布局
|
||||||
|
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||||
|
binding = PopupLayoutBinding.inflate(inflater)
|
||||||
|
|
||||||
|
// 设置PopupWindow
|
||||||
|
popupWindow = PopupWindow(
|
||||||
|
binding.root,
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
|
||||||
|
// 设置背景和动画
|
||||||
|
popupWindow.setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
|
||||||
|
popupWindow.animationStyle = R.style.PopupAnimation
|
||||||
|
|
||||||
|
setType()
|
||||||
|
binding.llMore1.setOnClickListener {
|
||||||
|
if (binding.textMore1.text.toString() == context.getString(R.string.metric_units)) {
|
||||||
|
binding.textMore1.text = context.getString(R.string.imper_units)
|
||||||
|
} else {
|
||||||
|
binding.textMore1.text = context.getString(R.string.metric_units)
|
||||||
|
}
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
binding.popSleep.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
callback.invoke(binding.textSleep.text.toString())
|
||||||
|
if (binding.textSleep.text.toString() == context.getString(R.string.hide_deep_sleep)) {
|
||||||
|
binding.textSleep.text = context.getString(R.string.show_deep_sleep)
|
||||||
|
} else {
|
||||||
|
binding.textSleep.text = context.getString(R.string.hide_deep_sleep)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.textMore2.setOnClickListener {}
|
||||||
|
binding.textMore3.setOnClickListener {}
|
||||||
|
binding.textMore4.setOnClickListener {}
|
||||||
|
binding.textMore5.setOnClickListener {}
|
||||||
|
binding.textMore6.setOnClickListener {}
|
||||||
|
binding.text1.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
callback.invoke(binding.text1.text.toString())
|
||||||
|
}
|
||||||
|
binding.text2.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
callback.invoke(binding.text2.text.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setType() {//0:簇1或簇2 1:隐藏深度休眠 2:主页更多 3:公制单位和重置 4:公制单位
|
||||||
|
when (type) {
|
||||||
|
0 -> {
|
||||||
|
binding.popCluster.visibility = View.VISIBLE
|
||||||
|
binding.popSleep.visibility = View.GONE
|
||||||
|
binding.popMore.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
|
1 -> {
|
||||||
|
binding.popCluster.visibility = View.GONE
|
||||||
|
binding.popSleep.visibility = View.VISIBLE
|
||||||
|
binding.popMore.visibility = View.GONE
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
2 -> {
|
||||||
|
binding.popCluster.visibility = View.GONE
|
||||||
|
binding.popSleep.visibility = View.GONE
|
||||||
|
binding.popMore.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
|
3 -> {
|
||||||
|
binding.popCluster.visibility = View.GONE
|
||||||
|
binding.popSleep.visibility = View.GONE
|
||||||
|
binding.popMore.visibility = View.VISIBLE
|
||||||
|
binding.llHide.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
|
4 -> {
|
||||||
|
binding.popCluster.visibility = View.GONE
|
||||||
|
binding.popSleep.visibility = View.GONE
|
||||||
|
binding.popMore.visibility = View.VISIBLE
|
||||||
|
binding.llMore2.visibility = View.GONE
|
||||||
|
binding.llHide.visibility = View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示PopView
|
||||||
|
fun show(anchorView: View) {
|
||||||
|
if (::popupWindow.isInitialized && !popupWindow.isShowing) {
|
||||||
|
popupWindow.showAsDropDown(anchorView)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在指定位置显示
|
||||||
|
fun showAtLocation(parent: View, gravity: Int, x: Int, y: Int) {
|
||||||
|
if (::popupWindow.isInitialized && !popupWindow.isShowing) {
|
||||||
|
popupWindow.showAtLocation(parent, gravity, x, y)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 隐藏PopView
|
||||||
|
fun dismiss() {
|
||||||
|
if (::popupWindow.isInitialized && popupWindow.isShowing) {
|
||||||
|
popupWindow.dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置PopView内容
|
||||||
|
fun setContent(text: String) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断是否正在显示
|
||||||
|
fun isShowing(): Boolean {
|
||||||
|
return ::popupWindow.isInitialized && popupWindow.isShowing
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogAppInstallBinding
|
||||||
|
|
||||||
|
class DialogAppInstall :BaseDialogFragment<DialogAppInstallBinding>(DialogAppInstallBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.installed_apps)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int=3
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogBatteryBinding
|
||||||
|
|
||||||
|
class DialogBattery :BaseDialogFragment<DialogBatteryBinding>(DialogBatteryBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.battery)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =1
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogBlueToothBinding
|
||||||
|
|
||||||
|
class DialogBlueTooth :BaseDialogFragment<DialogBlueToothBinding>(DialogBlueToothBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.bluetooth)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int=5
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.graphics.Typeface
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.SpannableString
|
||||||
|
import android.text.style.StyleSpan
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogCameraMoreBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogCpuInfoBinding
|
||||||
|
|
||||||
|
class DialogCameraMore(private val type:Int) :BaseDialogFragment<DialogCameraMoreBinding>(DialogCameraMoreBinding::inflate){
|
||||||
|
override fun getTitle(): String = if(type==0){
|
||||||
|
resources.getString(R.string.rear_camera_1)}
|
||||||
|
else{
|
||||||
|
resources.getString(R.string.front_camera_1)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =9
|
||||||
|
|
||||||
|
override fun getDoubleBtn(): Boolean? = false
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.graphics.Typeface
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.SpannableString
|
||||||
|
import android.text.style.StyleSpan
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogCpuInfoBinding
|
||||||
|
|
||||||
|
class DialogCpuInfo :BaseDialogFragment<DialogCpuInfoBinding>(DialogCpuInfoBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.proc_cpuinfo)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =6
|
||||||
|
|
||||||
|
override fun getDoubleBtn(): Boolean? = false
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
binding.cpuTv01.text=setColonBoldText("Processor :AArch64 Processor rev 2(aarch64)")
|
||||||
|
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 {
|
||||||
|
val colonIndex = text.indexOf(":")
|
||||||
|
if (colonIndex != -1) {
|
||||||
|
val spannableString = SpannableString(text)
|
||||||
|
// 将冒号之前的部分设置为加粗
|
||||||
|
spannableString.setSpan(
|
||||||
|
StyleSpan(Typeface.BOLD),
|
||||||
|
0,
|
||||||
|
colonIndex,
|
||||||
|
SpannableString.SPAN_INCLUSIVE_INCLUSIVE
|
||||||
|
)
|
||||||
|
return spannableString
|
||||||
|
} else {
|
||||||
|
return SpannableString(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogDiskPartBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogExtentionBinding
|
||||||
|
|
||||||
|
class DialogDiskPart :BaseDialogFragment<DialogDiskPartBinding>(DialogDiskPartBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.disk_partitions)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =8
|
||||||
|
|
||||||
|
override fun getDoubleBtn(): Boolean? = false
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogDisplayBinding
|
||||||
|
|
||||||
|
class DialogDisplay :BaseDialogFragment<DialogDisplayBinding>(DialogDisplayBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.display)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int=4
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogExtentionBinding
|
||||||
|
|
||||||
|
class DialogExtension :BaseDialogFragment<DialogExtentionBinding>(DialogExtentionBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.extensions)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =6
|
||||||
|
|
||||||
|
override fun getDoubleBtn(): Boolean? = false
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.graphics.Typeface
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.SpannableString
|
||||||
|
import android.text.style.StyleSpan
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogCpuInfoBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogInputBinding
|
||||||
|
|
||||||
|
class DialogInput :BaseDialogFragment<DialogInputBinding>(DialogInputBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.input_devices)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =10
|
||||||
|
|
||||||
|
override fun getDoubleBtn(): Boolean? = false
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
binding.text1.textTitle.text = "input_mt_wrapper"
|
||||||
|
binding.text1.textContent.text = "Input Device 1:\n" +
|
||||||
|
"input_mt_wrapper\n" +
|
||||||
|
"Descriptor:\n" +
|
||||||
|
"a988c03908bee014d816\n" +
|
||||||
|
"71ffdd909090304130b5\n" +
|
||||||
|
"Generation: 14\n" +
|
||||||
|
"Location: built-in\n" +
|
||||||
|
"Keyboard Type:\n" +
|
||||||
|
"non-alphabetic\n" +
|
||||||
|
"Has Vibrator: false\n" +
|
||||||
|
"Has mic: false\n" +
|
||||||
|
"Sources: 0x1103\n" +
|
||||||
|
"(keyboard touchscreen)\n" +
|
||||||
|
"AXISX:\n" +
|
||||||
|
"source=0x1002 min=0.0\n" +
|
||||||
|
"max=719.0 flat=0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0\n" +
|
||||||
|
"AXISY:\n" +
|
||||||
|
"source=0x1002 min=0.0\n" +
|
||||||
|
"max=1559.0 flat=0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0\n" +
|
||||||
|
"AXIS PRESSURE:\n" +
|
||||||
|
"source-0x1002 min=0.0\n" +
|
||||||
|
"max=1.0 flat=0.0 fuzz=0.0\n" +
|
||||||
|
"resolution=0.0\n" +
|
||||||
|
"AXIS_SIZE:\n" +
|
||||||
|
"source=0x1002 min=0.0\n" +
|
||||||
|
"max=1.0 flat=0.0 fuzz=0.0\n" +
|
||||||
|
"resolution=0.0\n" +
|
||||||
|
"AXIS TOUCH_MAJOR:\n" +
|
||||||
|
"source=0x1002 min=0.0\n" +
|
||||||
|
"max=1718.1385 flat=0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0\n" +
|
||||||
|
"AXISTOUCH_MINOR:\n" +
|
||||||
|
"source=0x1002 min=0.0\n" +
|
||||||
|
"max=1718.1385 flat=0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0\n" +
|
||||||
|
"AXIS TOOL MAJOR:\n" +
|
||||||
|
"source=0×1002 min=0.0\n" +
|
||||||
|
"max=1718.1385 flat=0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0\n" +
|
||||||
|
"AXIS TOOL MINOR:\n" +
|
||||||
|
"source=0x1002 min=0.0\n" +
|
||||||
|
"max=1718.1385 flat-0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0\n" +
|
||||||
|
"AXIS_ORIENTATION:\n" +
|
||||||
|
"source=0x1002\n" +
|
||||||
|
"min=-1.5707964\n" +
|
||||||
|
"max=1.5707964 flat=0.0\n" +
|
||||||
|
"fuzz=0.0 resolution=0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogMemoryBinding
|
||||||
|
|
||||||
|
class DialogMemory :BaseDialogFragment<DialogMemoryBinding>(DialogMemoryBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.memory)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int=6
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogNetworkBinding
|
||||||
|
|
||||||
|
class DialogNetwork :BaseDialogFragment<DialogNetworkBinding>(DialogNetworkBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.network)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int=2
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogOperatingBinding
|
||||||
|
|
||||||
|
class DialogOperating :BaseDialogFragment<DialogOperatingBinding>(DialogOperatingBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.operating_system)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =7
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseDialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogStorageBinding
|
||||||
|
|
||||||
|
class DialogStorage :BaseDialogFragment<DialogStorageBinding>(DialogStorageBinding::inflate){
|
||||||
|
override fun getTitle(): String = resources.getString(R.string.storage)
|
||||||
|
|
||||||
|
override fun getIconRes(): Int? =8
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNegativeClick() {
|
||||||
|
super.onNegativeClick()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPositiveClick() {
|
||||||
|
super.onPositiveClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
import android.app.Dialog
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.graphics.drawable.toDrawable
|
||||||
|
import androidx.fragment.app.DialogFragment
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.FragmentShowLoadBinding
|
||||||
|
|
||||||
|
class ShowLoadFragment : DialogFragment() {
|
||||||
|
private lateinit var binding:FragmentShowLoadBinding
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
binding = FragmentShowLoadBinding.inflate(inflater, container, false)
|
||||||
|
binding.ok.setOnClickListener{
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
return binding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
|
val dialog=super.onCreateDialog(savedInstanceState)
|
||||||
|
// 设置宽度匹配父容器
|
||||||
|
dialog.window?.apply {
|
||||||
|
setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
|
setBackgroundDrawable(Color.TRANSPARENT.toDrawable())
|
||||||
|
}
|
||||||
|
return dialog
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.dialog
|
||||||
|
|
||||||
|
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 com.xyzshell.myphoneinfo.databinding.DialogAppClickBinding
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.DialogTempBinding
|
||||||
|
|
||||||
|
class TempDialogFragment : DialogFragment() {
|
||||||
|
|
||||||
|
private var _binding: DialogTempBinding? = null
|
||||||
|
private val baseBinding get() = _binding!!
|
||||||
|
|
||||||
|
|
||||||
|
open fun onPositiveClick() {}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
_binding = DialogTempBinding.inflate(inflater, container, false)
|
||||||
|
return baseBinding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
baseBinding.textCancel.setOnClickListener {
|
||||||
|
onPositiveClick()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
baseBinding.imgTemp1.isSelected = true
|
||||||
|
baseBinding.imgTemp1.setOnClickListener {
|
||||||
|
baseBinding.imgTemp1.isSelected = true
|
||||||
|
baseBinding.imgTemp2.isSelected = false
|
||||||
|
}
|
||||||
|
baseBinding.imgTemp2.setOnClickListener {
|
||||||
|
baseBinding.imgTemp2.isSelected = true
|
||||||
|
baseBinding.imgTemp1.isSelected = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,133 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.main
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
import com.xyzshell.myphoneinfo.R
|
||||||
|
|
||||||
|
import com.xyzshell.myphoneinfo.base.BaseActivity
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.AppsFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.BatteryFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.CameraFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.DashboardFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.HardWareFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.NetworkFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.SensorsFragment
|
||||||
|
import com.xyzshell.myphoneinfo.dashboard.SystemShowFragment
|
||||||
|
import com.xyzshell.myphoneinfo.databinding.ActivityMainBinding
|
||||||
|
import com.xyzshell.myphoneinfo.dialog.CustomPopView
|
||||||
|
|
||||||
|
class MainScrollActivity : BaseActivity<ActivityMainBinding>() {
|
||||||
|
override fun inflateBinding(inflater: LayoutInflater): ActivityMainBinding =
|
||||||
|
ActivityMainBinding.inflate(inflater)
|
||||||
|
private lateinit var customPopView: CustomPopView
|
||||||
|
override fun initView() {
|
||||||
|
super.initView()
|
||||||
|
binding.run {
|
||||||
|
|
||||||
|
val stringArray = resources.getStringArray(R.array.tab_title)
|
||||||
|
TabLayoutMediator(tablelayout, viewpager3.apply {
|
||||||
|
adapter = ViewPagerAdapter(
|
||||||
|
this@MainScrollActivity, listOf(
|
||||||
|
DashboardFragment.newInstance(),
|
||||||
|
HardWareFragment.newInstance(),
|
||||||
|
SystemShowFragment.newInstance(),
|
||||||
|
BatteryFragment.newInstance(),
|
||||||
|
NetworkFragment.newInstance(),
|
||||||
|
AppsFragment.newInstance(),
|
||||||
|
CameraFragment.newInstance(),
|
||||||
|
SensorsFragment.newInstance()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
offscreenPageLimit = 1
|
||||||
|
registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||||
|
override fun onPageSelected(position: Int) {
|
||||||
|
super.onPageSelected(position)
|
||||||
|
updateButtonVisibility(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()
|
||||||
|
}
|
||||||
|
customPopView =CustomPopView(this,2,callback = {text->
|
||||||
|
|
||||||
|
})
|
||||||
|
binding.imageTool.setOnClickListener {
|
||||||
|
customPopView.show(binding.imageTool)
|
||||||
|
}
|
||||||
|
binding.searchIcon.setOnClickListener {
|
||||||
|
binding.textAppName.visibility= View.GONE
|
||||||
|
binding.imageTool.visibility= View.GONE
|
||||||
|
binding.searchIcon.visibility= View.GONE
|
||||||
|
binding.searchLayout.visibility= View.VISIBLE
|
||||||
|
}
|
||||||
|
binding.searchClose.setOnClickListener {
|
||||||
|
binding.textAppName.visibility= View.VISIBLE
|
||||||
|
binding.imageTool.visibility= View.VISIBLE
|
||||||
|
binding.searchIcon.visibility= View.VISIBLE
|
||||||
|
binding.searchLayout.visibility= View.GONE
|
||||||
|
}
|
||||||
|
initButtons()
|
||||||
|
}
|
||||||
|
private fun updateButtonVisibility(currentPosition: Int) {
|
||||||
|
if (currentPosition == 5) {
|
||||||
|
// 在 AppsFragment 时显示特殊按钮
|
||||||
|
binding.searchIcon.visibility = View.VISIBLE
|
||||||
|
binding.llBottom.visibility= View.VISIBLE
|
||||||
|
} else {
|
||||||
|
// 在其他 Fragment 时隐藏特殊按钮
|
||||||
|
binding.searchIcon.visibility = View.GONE
|
||||||
|
binding.llBottom.visibility= View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private fun initButtons() {
|
||||||
|
switchTab(0)
|
||||||
|
binding.llUser.setOnClickListener { switchTab(0) }
|
||||||
|
binding.llSystem.setOnClickListener { switchTab(1) }
|
||||||
|
binding.llAll.setOnClickListener { switchTab(2) }
|
||||||
|
}
|
||||||
|
private fun switchTab(n: Int) {
|
||||||
|
when(n){
|
||||||
|
0->{
|
||||||
|
binding.back1.visibility = View.VISIBLE
|
||||||
|
binding.back2.visibility = View.INVISIBLE
|
||||||
|
binding.back3.visibility = View.INVISIBLE
|
||||||
|
binding.imgUser.isSelected = true
|
||||||
|
binding.imgSystem.isSelected = false
|
||||||
|
binding.imgAll.isSelected = false
|
||||||
|
// binding.tvTitle.text=getString(R.string.user_apps)+"("+30+")"
|
||||||
|
}
|
||||||
|
1->{
|
||||||
|
binding.back1.visibility = View.INVISIBLE
|
||||||
|
binding.back2.visibility = View.VISIBLE
|
||||||
|
binding.back3.visibility = View.INVISIBLE
|
||||||
|
binding.imgUser.isSelected = false
|
||||||
|
binding.imgSystem.isSelected = true
|
||||||
|
binding.imgAll.isSelected = false
|
||||||
|
// binding.tvTitle.text=getString(R.string.system_apps)+"("+30+")"
|
||||||
|
}
|
||||||
|
2->{
|
||||||
|
binding.back1.visibility = View.INVISIBLE
|
||||||
|
binding.back2.visibility = View.INVISIBLE
|
||||||
|
binding.back3.visibility = View.VISIBLE
|
||||||
|
binding.imgUser.isSelected = false
|
||||||
|
binding.imgSystem.isSelected = false
|
||||||
|
binding.imgAll.isSelected = true
|
||||||
|
// binding.tvTitle.text=getString(R.string.installed_apps)+"("+30+")"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
super.initData()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.xyzshell.myphoneinfo.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]
|
||||||
|
}
|
||||||
15
myphoneinfo/src/main/res/anim/popup_enter.xml
Normal file
15
myphoneinfo/src/main/res/anim/popup_enter.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<scale
|
||||||
|
android:fromXScale="0.8"
|
||||||
|
android:toXScale="1.0"
|
||||||
|
android:fromYScale="0.8"
|
||||||
|
android:toYScale="1.0"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%"
|
||||||
|
android:duration="200" />
|
||||||
|
<alpha
|
||||||
|
android:fromAlpha="0.0"
|
||||||
|
android:toAlpha="1.0"
|
||||||
|
android:duration="200" />
|
||||||
|
</set>
|
||||||
15
myphoneinfo/src/main/res/anim/popup_exit.xml
Normal file
15
myphoneinfo/src/main/res/anim/popup_exit.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<scale
|
||||||
|
android:fromXScale="1.0"
|
||||||
|
android:toXScale="0.8"
|
||||||
|
android:fromYScale="1.0"
|
||||||
|
android:toYScale="0.8"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%"
|
||||||
|
android:duration="200" />
|
||||||
|
<alpha
|
||||||
|
android:fromAlpha="1.0"
|
||||||
|
android:toAlpha="0.0"
|
||||||
|
android:duration="200" />
|
||||||
|
</set>
|
||||||
5
myphoneinfo/src/main/res/drawable/all_ic_sel.xml
Normal file
5
myphoneinfo/src/main/res/drawable/all_ic_sel.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/all_true" android:state_selected="true"/>
|
||||||
|
<item android:drawable="@mipmap/all_false"/>
|
||||||
|
</selector>
|
||||||
5
myphoneinfo/src/main/res/drawable/attention_bg.xml
Normal file
5
myphoneinfo/src/main/res/drawable/attention_bg.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?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="#3B948A"/>
|
||||||
|
</shape>
|
||||||
@ -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="10dp"/>
|
||||||
|
|
||||||
|
</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>
|
||||||
@ -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:topLeftRadius="10dp" android:topRightRadius="10dp"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
@ -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:topLeftRadius="@dimen/dashboard_model_background_corners" android:bottomLeftRadius="@dimen/dashboard_model_background_corners"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
@ -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:topRightRadius="@dimen/dashboard_model_background_corners" android:bottomRightRadius="@dimen/dashboard_model_background_corners"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
5
myphoneinfo/src/main/res/drawable/green_rec.xml
Normal file
5
myphoneinfo/src/main/res/drawable/green_rec.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<solid android:color="#31766E"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
6
myphoneinfo/src/main/res/drawable/hard_bg.xml
Normal file
6
myphoneinfo/src/main/res/drawable/hard_bg.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="19dp"/>
|
||||||
|
<solid android:color="@color/module_title_color"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
@ -1,170 +1,74 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
|
android:width="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="108">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path
|
<path android:fillColor="#3DDC84"
|
||||||
android:fillColor="#3DDC84"
|
|
||||||
android:pathData="M0,0h108v108h-108z"/>
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M9,0L9,108"
|
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||||
android:pathData="M19,0L19,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M29,0L29,108"
|
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||||
android:pathData="M39,0L39,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M49,0L49,108"
|
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||||
android:pathData="M59,0L59,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M69,0L69,108"
|
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||||
android:pathData="M79,0L79,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M89,0L89,108"
|
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||||
android:pathData="M99,0L99,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M0,9L108,9"
|
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||||
android:pathData="M0,19L108,19"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M0,29L108,29"
|
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" 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>
|
</vector>
|
||||||
|
|||||||
6
myphoneinfo/src/main/res/drawable/is_working_btn.xml
Normal file
6
myphoneinfo/src/main/res/drawable/is_working_btn.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<stroke android:width="1dp" android:color="@color/module_title_color"/>
|
||||||
|
<corners android:radius="7dp"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
8
myphoneinfo/src/main/res/drawable/module_oval.xml
Normal file
8
myphoneinfo/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>
|
||||||
5
myphoneinfo/src/main/res/drawable/popup_background.xml
Normal file
5
myphoneinfo/src/main/res/drawable/popup_background.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?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/white"/>
|
||||||
|
</shape>
|
||||||
36
myphoneinfo/src/main/res/drawable/progress_bg.xml
Normal file
36
myphoneinfo/src/main/res/drawable/progress_bg.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:id="@android:id/background"
|
||||||
|
android:bottom="0dp"
|
||||||
|
android:top="0dp">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<solid android:color="#AAD7D2" />
|
||||||
|
<!-- 明确设置高度 -->
|
||||||
|
<size android:height="10dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:id="@android:id/progress"
|
||||||
|
android:bottom="0dp"
|
||||||
|
android:top="0dp">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<size android:height="10dp" />
|
||||||
|
<gradient
|
||||||
|
android:angle="0"
|
||||||
|
android:centerColor="#3B948A"
|
||||||
|
android:endColor="#3B948A"
|
||||||
|
android:startColor="#3B948A" />
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
5
myphoneinfo/src/main/res/drawable/progress_oval.xml
Normal file
5
myphoneinfo/src/main/res/drawable/progress_oval.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<solid android:color="#3B948A"/>
|
||||||
|
</shape>
|
||||||
5
myphoneinfo/src/main/res/drawable/radius_sel.xml
Normal file
5
myphoneinfo/src/main/res/drawable/radius_sel.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/radius_green" android:state_selected="true"/>
|
||||||
|
<item android:drawable="@mipmap/radius_black" />
|
||||||
|
</selector>
|
||||||
5
myphoneinfo/src/main/res/drawable/system_ic_sel.xml
Normal file
5
myphoneinfo/src/main/res/drawable/system_ic_sel.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/system_true" android:state_selected="true"/>
|
||||||
|
<item android:drawable="@mipmap/system_false"/>
|
||||||
|
</selector>
|
||||||
7
myphoneinfo/src/main/res/drawable/tab_indicator.xml
Normal file
7
myphoneinfo/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>
|
||||||
7
myphoneinfo/src/main/res/drawable/top_radius_bg.xml
Normal file
7
myphoneinfo/src/main/res/drawable/top_radius_bg.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">
|
||||||
|
<stroke android:width="1dp" android:color="#40000000"/>
|
||||||
|
<corners android:topRightRadius="10dp" android:topLeftRadius="10dp"/>
|
||||||
|
<solid android:color="@color/white"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
5
myphoneinfo/src/main/res/drawable/user_ic_sel.xml
Normal file
5
myphoneinfo/src/main/res/drawable/user_ic_sel.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@mipmap/user_true" android:state_selected="true"/>
|
||||||
|
<item android:drawable="@mipmap/user_false"/>
|
||||||
|
</selector>
|
||||||
BIN
myphoneinfo/src/main/res/font/arimo.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/arimo.ttf
Normal file
Binary file not shown.
BIN
myphoneinfo/src/main/res/font/bowl_byone.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/bowl_byone.ttf
Normal file
Binary file not shown.
BIN
myphoneinfo/src/main/res/font/candal.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/candal.ttf
Normal file
Binary file not shown.
BIN
myphoneinfo/src/main/res/font/semibold.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/semibold.ttf
Normal file
Binary file not shown.
251
myphoneinfo/src/main/res/layout/activity_analysis.xml
Normal file
251
myphoneinfo/src/main/res/layout/activity_analysis.xml
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/background_color"
|
||||||
|
tools:context=".dashboard.AnalysisActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back_btn"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
android:layout_margin="10dp"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cpu_analysis"
|
||||||
|
android:textStyle="bold"
|
||||||
|
style="@style/TextDeviceBig"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:background="@color/background_color"
|
||||||
|
android:layout_height="0dp">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="@dimen/dashboard_fragment_padding_horizontal">
|
||||||
|
<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/titlePro"
|
||||||
|
style="@style/TextDeviceBig"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/processor"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text1"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text2"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text3"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text4"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text5"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text6"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text7"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text8"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text9"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text10"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/pro_text11"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llprocShow"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/info1"
|
||||||
|
style="@style/TextContentLeft"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/proc_cpuinfo"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/infoShow"
|
||||||
|
style="@style/TextButteryRight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
|
||||||
|
android:text="@string/show"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llTimesShow"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/time1"
|
||||||
|
style="@style/TextContentLeft"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cpu_times"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/timeShow"
|
||||||
|
style="@style/TextButteryRight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:text="@string/show"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<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/TextDeviceBig"
|
||||||
|
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/TextSecondaryTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="@string/cpu0"
|
||||||
|
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
|
||||||
|
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/cluster2Title"
|
||||||
|
style="@style/TextDeviceBig"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cluster_2"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="@string/cpu0"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu2_text1"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu2_text2"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu2_text3"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu2_text4"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
<include
|
||||||
|
android:id="@+id/clu2_text5"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
66
myphoneinfo/src/main/res/layout/activity_blue_tooth.xml
Normal file
66
myphoneinfo/src/main/res/layout/activity_blue_tooth.xml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#EDEDED"
|
||||||
|
tools:context=".dashboard.BlueToothActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back_btn"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
/>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="1dp"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/setting"
|
||||||
|
android:padding="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/paired_devices"
|
||||||
|
style="@style/TextDeviceBig"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginVertical="12dp"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
50
myphoneinfo/src/main/res/layout/activity_colors.xml
Normal file
50
myphoneinfo/src/main/res/layout/activity_colors.xml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".dashboard.ColorsActivity">
|
||||||
|
<include layout="@layout/color_page_1" android:id="@+id/color_page_1"/>
|
||||||
|
<include layout="@layout/color_page_2" android:id="@+id/color_page_2" android:visibility="gone"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/does_everything"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginBottom="28dp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="18dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDialogSubTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/yes"
|
||||||
|
android:paddingVertical="7dp"
|
||||||
|
android:paddingHorizontal="42dp"
|
||||||
|
android:background="@drawable/is_working_btn" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDialogSubTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/no"
|
||||||
|
android:paddingVertical="7dp"
|
||||||
|
android:paddingHorizontal="42dp"
|
||||||
|
android:layout_marginStart="72dp"
|
||||||
|
android:background="@drawable/is_working_btn" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
119
myphoneinfo/src/main/res/layout/activity_cpu_status.xml
Normal file
119
myphoneinfo/src/main/res/layout/activity_cpu_status.xml
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#EDEDED"
|
||||||
|
tools:context=".dashboard.CpuStatusActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topTitle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back_btn"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cpu_status"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
style="@style/TextTool25"/>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:src="@mipmap/edit_line"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/more_btn"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="23dp"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:src="@mipmap/more_point"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="30dp"
|
||||||
|
android:paddingVertical="13dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/pop_click"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/pop_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextDialogLabel"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/first_cluster"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="15dp"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:layout_marginStart="38dp"
|
||||||
|
android:src="@mipmap/open_pop"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="1dp"/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/reset"
|
||||||
|
android:textStyle="bold"
|
||||||
|
style="@style/TextDialogLabel"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/dashboard_model_background"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginHorizontal="8dp">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cpu_time_in_state"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:layout_marginStart="19dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
style="@style/TextBtnTitle"/>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:id="@+id/cpu_list"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
255
myphoneinfo/src/main/res/layout/activity_main.xml
Normal file
255
myphoneinfo/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
<?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.MainScrollActivity">
|
||||||
|
|
||||||
|
<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/main_logo" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/text_app_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="55dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:gravity="center"
|
||||||
|
style="@style/TextTitleBig"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:text="@string/app_name" />
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/search_icon"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:src="@mipmap/search_icon"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_toStartOf="@+id/image_tool"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image_tool"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignTop="@id/text_app_name"
|
||||||
|
android:layout_alignBottom="@id/text_app_name"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:paddingHorizontal="7dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:src="@mipmap/more_point"/>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/search_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_toEndOf="@+id/image_sidebar"
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:background="#B3B3B3" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:src="@mipmap/search_icon"
|
||||||
|
app:tint="#B3B3B3"
|
||||||
|
android:layout_marginEnd="20dp"/>
|
||||||
|
<EditText
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:inputType="text"
|
||||||
|
/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/search_close"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingVertical="9dp"
|
||||||
|
android:src="@mipmap/main_close"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
</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/module_title_color"
|
||||||
|
app:tabIndicatorFullWidth="true"
|
||||||
|
app:tabIndicatorHeight="@dimen/tab_indicator_height"
|
||||||
|
app:tabMaxWidth="100dp"
|
||||||
|
app:tabMinWidth="100dp"
|
||||||
|
app:tabMode="scrollable"
|
||||||
|
app:tabRippleColor="@null"
|
||||||
|
app:tabSelectedTextColor="@color/module_title_color"
|
||||||
|
app:tabTextColor="@color/main_tab_unselected"
|
||||||
|
app:tabTextAppearance="@style/NoCapsTabTextAppearance"/>
|
||||||
|
|
||||||
|
|
||||||
|
</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" />
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llBottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="20dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/llUser"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:paddingVertical="13dp"
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
android:id="@+id/back1"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:background="@drawable/progress_oval"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imgUser"
|
||||||
|
android:layout_width="26dp"
|
||||||
|
android:layout_height="26dp"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/back1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/back1"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:src="@drawable/user_ic_sel" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/tvUser"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="15sp"
|
||||||
|
style="@style/TextCheck"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/back1"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/back1"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/back1"
|
||||||
|
android:text="@string/user"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/llSystem"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:paddingVertical="13dp"
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
android:id="@+id/back2"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:background="@drawable/progress_oval"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imgSystem"
|
||||||
|
android:layout_width="26dp"
|
||||||
|
android:layout_height="26dp"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/back2"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/back2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:src="@drawable/system_ic_sel" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/tvSystem"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="15sp"
|
||||||
|
style="@style/TextCheck"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/back2"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/back2"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/back2"
|
||||||
|
android:text="@string/system"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/llAll"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:paddingVertical="13dp"
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
android:id="@+id/back3"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:background="@drawable/progress_oval"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imgAll"
|
||||||
|
android:layout_width="26dp"
|
||||||
|
android:layout_height="26dp"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/back3"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/back3"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:src="@drawable/all_ic_sel" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/tvAll"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="15sp"
|
||||||
|
style="@style/TextCheck"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/back3"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/back3"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/back3"
|
||||||
|
android:text="@string/all"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
137
myphoneinfo/src/main/res/layout/activity_sensor_each.xml
Normal file
137
myphoneinfo/src/main/res/layout/activity_sensor_each.xml
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".dashboard.SensorEachActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginVertical="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/accelerometer"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
style="@style/TextTool25"/>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image_tool"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="7dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:src="@mipmap/more_point"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:background="@color/background_color"
|
||||||
|
android:layout_height="0dp">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="@dimen/dashboard_fragment_padding_horizontal">
|
||||||
|
<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:padding="15dp"
|
||||||
|
android:visibility="visible">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDeviceBig"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/st_li3dh"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="260dp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<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:padding="15dp"
|
||||||
|
android:visibility="visible">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/titleDis"
|
||||||
|
style="@style/TextDeviceBig"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/info"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/infoText1"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/infoText2"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/infoText3"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/infoText4"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/infoText5"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/infoText6"
|
||||||
|
layout="@layout/common_text_style" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout></androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
65
myphoneinfo/src/main/res/layout/activity_temperature.xml
Normal file
65
myphoneinfo/src/main/res/layout/activity_temperature.xml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/background_color"
|
||||||
|
tools:context=".dashboard.TemperatureActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginVertical="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image_back"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/temperatures"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
style="@style/TextTool25"/>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image_tool"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="7dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:src="@mipmap/more_point"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_temperature"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13dp"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
75
myphoneinfo/src/main/res/layout/activity_test.xml
Normal file
75
myphoneinfo/src/main/res/layout/activity_test.xml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#EDEDED"
|
||||||
|
tools:context=".dashboard.TestActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back_btn"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
android:layout_margin="10dp"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/tests"
|
||||||
|
style="@style/TextDeviceBig"/>
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="1dp"/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/reset"
|
||||||
|
style="@style/TextTool21"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:background="@drawable/dashboard_model_background"
|
||||||
|
android:layout_marginTop="16dp">
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_1"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_2"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_3"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_4"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_5"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_6"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_7"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_8"/>
|
||||||
|
<include layout="@layout/common_test_item" android:id="@+id/tool_item_9"/>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
294
myphoneinfo/src/main/res/layout/activity_test_other.xml
Normal file
294
myphoneinfo/src/main/res/layout/activity_test_other.xml
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#EDEDED"
|
||||||
|
tools:context=".dashboard.TestOtherActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/back"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/flashlight"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
style="@style/TextTool25"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/big_icon_4"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:visibility="visible"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/press_each"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/icon"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/backLight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/icon"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seekbar"
|
||||||
|
android:layout_width="282dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:max="10"
|
||||||
|
android:maxHeight="10dp"
|
||||||
|
android:minHeight="10dp"
|
||||||
|
android:thumbOffset="0dp"
|
||||||
|
android:padding="0dp"
|
||||||
|
android:progress="2"
|
||||||
|
android:progressDrawable="@drawable/progress_bg"
|
||||||
|
android:thumb="@drawable/progress_oval" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/slide_to_adjust"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:layout_marginTop="18dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/sensor"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="47dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/bigTextSensor"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="313.0 lx"
|
||||||
|
android:textStyle="normal"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textSize="59sp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Min:"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/sensorMin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="184.0 lx"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Avg:"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/sensorAvg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="184.0 lx"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Max:"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/sensorMax"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="184.0 lx"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/proximity"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="47dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/bigTextProximity"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="5.0 cm"
|
||||||
|
android:textStyle="normal"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textSize="59sp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/status_1"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/proximityText1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Far"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/proximityText2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/cover_the_top"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingVertical="15dp"
|
||||||
|
android:elevation="10dp"
|
||||||
|
android:background="@drawable/top_radius_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="25dp">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title_dialog"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/is_it_working"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/right_color"
|
||||||
|
android:layout_marginBottom="28dp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDialogSubTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/yes"
|
||||||
|
android:paddingVertical="7dp"
|
||||||
|
android:paddingHorizontal="42dp"
|
||||||
|
android:background="@drawable/is_working_btn" />
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDialogSubTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/no"
|
||||||
|
android:paddingVertical="7dp"
|
||||||
|
android:paddingHorizontal="42dp"
|
||||||
|
android:background="@drawable/is_working_btn" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
133
myphoneinfo/src/main/res/layout/activity_tools.xml
Normal file
133
myphoneinfo/src/main/res/layout/activity_tools.xml
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#EDEDED"
|
||||||
|
tools:context=".dashboard.ToolsActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBack"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@mipmap/go_back"
|
||||||
|
android:padding="13dp"
|
||||||
|
android:layout_margin="10dp"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/tools"
|
||||||
|
style="@style/TextDeviceBig"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#BFBFBF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/tool1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/dashboard_model_background"
|
||||||
|
android:layout_marginTop="16dp">
|
||||||
|
<include layout="@layout/common_tool_item" android:id="@+id/tool_item_1"/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/noDevice"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/device_is_not"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:paddingBottom="48dp"
|
||||||
|
style="@style/TextTool25"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/tool2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tool1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/dashboard_model_background"
|
||||||
|
android:layout_marginTop="12dp">
|
||||||
|
<include layout="@layout/common_tool_item" android:id="@+id/tool_item_2"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llBlue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llPair"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginStart="76dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/tvPair"
|
||||||
|
style="@style/TextTool21"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="@string/paired_devices" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="11dp"
|
||||||
|
android:layout_height="17dp"
|
||||||
|
android:layout_marginStart="52dp"
|
||||||
|
android:src="@mipmap/go_on"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/llNear"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginStart="76dp"
|
||||||
|
android:layout_marginTop="17dp"
|
||||||
|
android:paddingBottom="27dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/tvNear"
|
||||||
|
style="@style/TextTool21"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="@string/nearby_devices" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="11dp"
|
||||||
|
android:layout_height="17dp"
|
||||||
|
android:layout_marginStart="45dp"
|
||||||
|
android:src="@mipmap/go_on"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/tool3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tool2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/dashboard_model_background"
|
||||||
|
android:layout_marginTop="12dp">
|
||||||
|
<include layout="@layout/common_tool_item" android:id="@+id/tool_item_3"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
72
myphoneinfo/src/main/res/layout/activity_touch.xml
Normal file
72
myphoneinfo/src/main/res/layout/activity_touch.xml
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?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:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#101010"
|
||||||
|
tools:context=".dashboard.TouchActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/number_of_touches"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="8"
|
||||||
|
android:textAlignment="center"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/is_it_working"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginBottom="28dp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="18dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDialogSubTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/yes"
|
||||||
|
android:paddingVertical="7dp"
|
||||||
|
android:paddingHorizontal="42dp"
|
||||||
|
android:background="@drawable/is_working_btn" />
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
style="@style/TextDialogSubTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/no"
|
||||||
|
android:paddingVertical="7dp"
|
||||||
|
android:paddingHorizontal="42dp"
|
||||||
|
android:layout_marginStart="72dp"
|
||||||
|
android:background="@drawable/is_working_btn" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
146
myphoneinfo/src/main/res/layout/color_page_1.xml
Normal file
146
myphoneinfo/src/main/res/layout/color_page_1.xml
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/colorL"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#101010"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/number_of_touches"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="8"
|
||||||
|
android:textAlignment="center"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingHorizontal="36dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color1"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:src="@mipmap/color1"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color2"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:src="@mipmap/color2"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingHorizontal="36dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color3"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:src="@mipmap/color3"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color4"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:src="@mipmap/color4"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingHorizontal="36dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color5"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:src="@mipmap/color5"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color6"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:src="@mipmap/color6"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingHorizontal="36dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color7"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:src="@mipmap/color7"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color8"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:src="@mipmap/color8"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/color9"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:src="@mipmap/color9"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/continueL"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingHorizontal="36dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:background="#101010">
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:text="@string/screen_will_change"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/TextSecondaryTitle"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:layout_marginTop="17dp"
|
||||||
|
android:text="@string/tap_to_continue"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
7
myphoneinfo/src/main/res/layout/color_page_2.xml
Normal file
7
myphoneinfo/src/main/res/layout/color_page_2.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:id="@+id/view"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
25
myphoneinfo/src/main/res/layout/common_check_style.xml
Normal file
25
myphoneinfo/src/main/res/layout/common_check_style.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="23dp"
|
||||||
|
android:layout_height="23dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:src="@mipmap/check_false" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/content"
|
||||||
|
style="@style/TextCheck"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:text="@string/apps"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
</LinearLayout>
|
||||||
27
myphoneinfo/src/main/res/layout/common_check_style1.xml
Normal file
27
myphoneinfo/src/main/res/layout/common_check_style1.xml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="17dp"
|
||||||
|
android:layout_height="17dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:src="@mipmap/per_no" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/content"
|
||||||
|
style="@style/TextCheck"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:text="@string/apps"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textColor="#E75757"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:ignore="RelativeOverlap" />
|
||||||
|
</LinearLayout>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user