更新dashbord ui
@ -88,4 +88,5 @@ dependencies {
|
||||
implementation ("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||
implementation ("androidx.gridlayout:gridlayout:1.0.0")
|
||||
implementation ("com.google.android.material:material:1.12.0")
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:allowBackup="true"
|
||||
@ -16,6 +17,9 @@
|
||||
<activity
|
||||
android:name=".dashboard.SensorEachActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".dashboard.TemperatureActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@ -127,6 +127,10 @@ class DashboardFragment : BaseFragment<FragmentDashboardBinding>() {
|
||||
dialogStorage?.show(parentFragmentManager, "")
|
||||
}
|
||||
}
|
||||
binding.layoutTop.root.setOnClickListener {
|
||||
dialogOperating = dialogOperating ?: DialogOperating()
|
||||
dialogOperating?.show(parentFragmentManager, "")
|
||||
}
|
||||
binding.layoutBottom.run {
|
||||
relayoutTools.setOnClickListener {
|
||||
startActivity(Intent(requireContext(), ToolsActivity::class.java))
|
||||
@ -134,10 +138,6 @@ class DashboardFragment : BaseFragment<FragmentDashboardBinding>() {
|
||||
relayoutTests.setOnClickListener {
|
||||
startActivity(Intent(requireContext(), TestActivity::class.java))
|
||||
}
|
||||
relayoutPhoneInfo.setOnClickListener {
|
||||
dialogOperating = dialogOperating ?: DialogOperating()
|
||||
dialogOperating?.show(parentFragmentManager, "")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
package com.xyzshell.myphoneinfo.dialog
|
||||
|
||||
import android.animation.Animator
|
||||
import android.animation.AnimatorListenerAdapter
|
||||
import android.animation.ObjectAnimator
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import com.xyzshell.myphoneinfo.R
|
||||
|
||||
import com.xyzshell.myphoneinfo.databinding.ActivitySlideInPopViewBinding
|
||||
|
||||
class SlideInPopView(context: Context) : Dialog(context) {
|
||||
|
||||
private lateinit var binding: ActivitySlideInPopViewBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// 设置无标题
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||
|
||||
binding = ActivitySlideInPopViewBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
// 设置Dialog属性
|
||||
window?.apply {
|
||||
// 设置位置为左侧
|
||||
setGravity(Gravity.START)
|
||||
|
||||
// 设置宽高
|
||||
val displayMetrics = context.resources.displayMetrics
|
||||
var width1 = (displayMetrics.widthPixels * 0.7).toInt() // 70%屏幕宽度
|
||||
attributes = attributes?.apply {
|
||||
width = width1
|
||||
height = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
|
||||
// 设置动画
|
||||
windowAnimations = R.style.SlideInLeftAnimation
|
||||
}
|
||||
|
||||
// 设置背景透明
|
||||
setBackgroundDrawableResource(android.R.color.transparent)
|
||||
}
|
||||
|
||||
// 设置点击外部可以关闭
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
setupViews()
|
||||
openSidebar() // 打开时显示侧边栏
|
||||
}
|
||||
|
||||
private fun setupViews() {
|
||||
// 侧边栏内的关闭按钮(如果有的话)
|
||||
// binding.btnClose.setOnClickListener { dismiss() }
|
||||
|
||||
// 初始化侧边栏位置
|
||||
binding.root.post {
|
||||
binding.popupContent.translationX = -binding.popupContent.width.toFloat()
|
||||
openSidebar()
|
||||
}
|
||||
}
|
||||
|
||||
private fun openSidebar() {
|
||||
val animator = ObjectAnimator.ofFloat(
|
||||
binding.popupContent,
|
||||
"translationX",
|
||||
-binding.popupContent.width.toFloat(),
|
||||
0f
|
||||
)
|
||||
animator.duration = 300
|
||||
animator.start()
|
||||
}
|
||||
|
||||
private fun closeSidebar(callback: () -> Unit = {}) {
|
||||
val animator = ObjectAnimator.ofFloat(
|
||||
binding.popupContent,
|
||||
"translationX",
|
||||
0f,
|
||||
-binding.popupContent.width.toFloat()
|
||||
)
|
||||
animator.duration = 300
|
||||
animator.addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
animator.start()
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
closeSidebar {
|
||||
super.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
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
|
||||
@ -16,12 +15,11 @@ 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
|
||||
import com.xyzshell.myphoneinfo.dialog.SlideInPopView
|
||||
|
||||
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 {
|
||||
@ -44,7 +42,6 @@ class MainScrollActivity : BaseActivity<ActivityMainBinding>() {
|
||||
registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
super.onPageSelected(position)
|
||||
updateButtonVisibility(position)
|
||||
}
|
||||
})
|
||||
}) { tab, position ->
|
||||
@ -57,75 +54,14 @@ class MainScrollActivity : BaseActivity<ActivityMainBinding>() {
|
||||
// }
|
||||
}.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+")"
|
||||
}
|
||||
val sidebarDialog = SlideInPopView(this)
|
||||
sidebarDialog.show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
}
|
||||
|
||||
8
myphoneinfo/src/main/res/anim/slide_in_left.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="-100%"
|
||||
android:toXDelta="0%" />
|
||||
</set>
|
||||
8
myphoneinfo/src/main/res/anim/slide_out_left.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="0%"
|
||||
android:toXDelta="-100%" />
|
||||
</set>
|
||||
@ -1,10 +0,0 @@
|
||||
<?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>
|
||||
@ -1,10 +0,0 @@
|
||||
<?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>
|
||||
@ -2,9 +2,6 @@
|
||||
<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"/>
|
||||
<corners android:radius="@dimen/dashboard_model_background_corners"/>
|
||||
|
||||
</shape>
|
||||
@ -1,10 +0,0 @@
|
||||
<?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>
|
||||
@ -1,10 +0,0 @@
|
||||
<?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>
|
||||
@ -1,7 +0,0 @@
|
||||
<?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>
|
||||
@ -1,7 +0,0 @@
|
||||
<?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>
|
||||
@ -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/dash_color"/>
|
||||
<corners android:radius="10dp"/>
|
||||
|
||||
</shape>
|
||||
@ -2,6 +2,6 @@
|
||||
<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"/>
|
||||
<corners android:radius="@dimen/dashboard_model_background_corners"/>
|
||||
|
||||
</shape>
|
||||
BIN
myphoneinfo/src/main/res/font/alimama_heiti.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/pingfang_bold.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/pingfang_heavy_0.ttf
Normal file
BIN
myphoneinfo/src/main/res/font/pingfang_regular.ttf
Normal file
@ -22,84 +22,24 @@
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_sidebar"
|
||||
android:id="@+id/image_tool"
|
||||
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" />
|
||||
android:paddingHorizontal="15dp"
|
||||
android:src="@mipmap/more_point" />
|
||||
|
||||
<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"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/image_tool"
|
||||
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>
|
||||
|
||||
|
||||
@ -129,127 +69,4 @@
|
||||
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>
|
||||
|
||||
156
myphoneinfo/src/main/res/layout/activity_slide_in_pop_view.xml
Normal file
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/popup_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/popup_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/slide_left"
|
||||
android:orientation="vertical"
|
||||
android:elevation="5dp"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:visibility="visible"
|
||||
android:paddingVertical="@dimen/each_item_padding_horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/llMore1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/slide_item_background"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@mipmap/more_1_icon"/>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textMore1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextDialogLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/metric_units"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/llMore2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/slide_item_background"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@mipmap/more_2_icon"/>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textMore2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextDialogLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/reset_"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/llHide"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/llMore3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/slide_item_background"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@mipmap/more_3_icon"/>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textMore3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextDialogLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/export"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/llMore4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/slide_item_background"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@mipmap/more_4_icon"/>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textMore4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextDialogLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/share"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/llMore5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/slide_item_background"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@mipmap/more_5_icon"/>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textMore5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextDialogLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/faq"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/llMore6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/slide_item_background"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_vertical"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@mipmap/more_6_icon"/>
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textMore6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextDialogLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/about"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -1,162 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:layout_marginTop="@dimen/dashboard_model_padding_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/relayout_tests"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_left_both"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_tools"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/test_ic" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
style="@style/TextWhite"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:textSize="21sp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="normal"
|
||||
android:text="@string/test"
|
||||
android:layout_marginStart="@dimen/dashboard_model_padding_horizontal"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="1dp"/>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/get_more"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/relayout_tools"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_tool_background"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_tests"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_tests">
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/tool_ic" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
style="@style/TextWhite"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/tools"
|
||||
android:textSize="21sp"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="@dimen/dashboard_model_padding_horizontal"
|
||||
android:textStyle="normal"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="1dp"/>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/get_more"/>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_phone_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_tests">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/phone_logo"
|
||||
style="@style/TextDeviceLogo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OPPO"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/im_menu"
|
||||
android:layout_toEndOf="@id/phone_logo"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextBig"
|
||||
android:id="@+id/tv_phone_brand"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
android:textSize="28sp"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_api_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:textStyle="bold"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_uptime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/uptime"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextContent"
|
||||
android:id="@+id/tv_phone_deep_sleep"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/deep_sleep"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_menu"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
@ -11,48 +11,88 @@
|
||||
android:id="@+id/relayout_battery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_background_left_top"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/each_item_padding_horizontal"
|
||||
android:paddingVertical="@dimen/each_item_padding_horizontal"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<ImageView
|
||||
android:id="@+id/icon_battery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/battery_ic" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/icon_battery"
|
||||
android:layout_marginStart="@dimen/each_item_padding_horizontal"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_battery"
|
||||
style="@style/TextWhite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/battery"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/battery_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_storage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_network"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_battery"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/battery"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_battery">
|
||||
<ImageView
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignTop="@id/title_battery"
|
||||
android:layout_alignBottom="@id/title_battery"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_battery"
|
||||
android:id="@+id/icon_storage"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_battery"
|
||||
android:src="@mipmap/battery_ic" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/battery_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/stroke_bg" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_battery"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_battery"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
android:layout_toEndOf="@+id/icon_storage"
|
||||
android:layout_marginStart="@dimen/each_item_padding_horizontal"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_storage"
|
||||
style="@style/TextWhite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/storage"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/storage_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -60,31 +100,32 @@
|
||||
android:id="@+id/relayout_network"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_right_top"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_battery"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_battery">
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/relayout_ram"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_ram">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_network"
|
||||
style="@style/TextModuleTitle"
|
||||
style="@style/TextWhite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/network"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/title_network"
|
||||
android:layout_alignBottom="@id/title_network"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
android:src="@mipmap/top_grey_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_network"
|
||||
@ -106,37 +147,142 @@
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_apps"
|
||||
android:id="@+id/relayout_ram"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:layout_marginTop="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@+id/relayout_network"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_storage">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_ram"
|
||||
style="@style/TextWhite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/ram"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/title_ram"
|
||||
android:layout_alignBottom="@id/title_ram"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/top_grey_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_ram"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_ram"
|
||||
android:src="@mipmap/radius_bg" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/ram_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_ram"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_ram"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_display"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_small"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_display"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_battery">
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_apps"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_network"
|
||||
>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_display"
|
||||
style="@style/TextWhite"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/display"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/title_display"
|
||||
android:layout_alignBottom="@id/title_display"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/top_grey_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_display"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_display"
|
||||
android:src="@mipmap/display_ic" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/display_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_display"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_display"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_apps"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_display"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_display">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_apps"
|
||||
style="@style/TextModuleTitle"
|
||||
style="@style/TextWhite"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/apps"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/title_apps"
|
||||
android:layout_alignBottom="@id/title_apps"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
android:src="@mipmap/top_grey_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_apps"
|
||||
@ -159,156 +305,7 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_display"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_small"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_apps"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_apps">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_display"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/display"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignTop="@id/title_display"
|
||||
android:layout_alignBottom="@id/title_display"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_display"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_display"
|
||||
android:src="@mipmap/display_ic" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/display_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_display"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_display"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_ram"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_left_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/relayout_storage"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_apps">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_ram"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/ram"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignTop="@id/title_ram"
|
||||
android:layout_alignBottom="@id/title_ram"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_ram"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_ram"
|
||||
android:src="@mipmap/radius_bg" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/ram_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_ram"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_ram"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relayout_storage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/common_module_interval_small"
|
||||
android:background="@drawable/dashboard_model_background_right_bottom"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/relayout_ram"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/relayout_ram">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_storage"
|
||||
style="@style/TextModuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:text="@string/storage"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_alignTop="@id/title_storage"
|
||||
android:layout_alignBottom="@id/title_storage"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/item_point" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_storage"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_below="@id/title_storage"
|
||||
android:src="@mipmap/stroke_bg" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/storage_content"
|
||||
style="@style/TextContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/icon_storage"
|
||||
android:layout_marginStart="@dimen/dashboard_icon_content_interval"
|
||||
android:layout_toEndOf="@id/icon_storage"
|
||||
android:text="@string/apps"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -5,6 +5,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dashboard_model_padding_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
@ -17,22 +18,23 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/title_cpu"
|
||||
style="@style/TextModuleTitle"
|
||||
style="@style/TextWhite"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dashboard_model_title_padding_vertical"
|
||||
android:textSize="16sp"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/cpu_status"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/title_cpu"
|
||||
android:layout_alignBottom="@id/title_cpu"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:src="@mipmap/item_point" />
|
||||
android:src="@mipmap/top_grey_more" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_cpu"
|
||||
@ -50,18 +52,19 @@
|
||||
android:id="@+id/module_cpu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:layout_marginTop="@dimen/dashboard_model_padding_horizontal"
|
||||
android:background="@drawable/dashboard_model_background"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/end_im"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/item_point"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/top_grey_more"
|
||||
android:paddingHorizontal="5dp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -70,6 +73,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cpu_0"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/text_cpu1"
|
||||
@ -81,6 +85,7 @@
|
||||
style="@style/TextContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/cpu_1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
|
||||
90
myphoneinfo/src/main/res/layout/dashboard_module_top.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginTop="@dimen/common_module_interval_medium"
|
||||
android:layout_marginBottom="@dimen/common_module_interval_medium"
|
||||
android:background="@drawable/dashboard_top_background"
|
||||
android:paddingHorizontal="@dimen/dashboard_model_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_model_padding_vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/relayout_tests">
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/phone_logo"
|
||||
style="@style/TextDeviceLogo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OPPO"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/im_menu"
|
||||
android:layout_toEndOf="@id/phone_logo"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextYellow"
|
||||
android:id="@+id/tv_phone_brand"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
android:textSize="28sp"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextWhite"
|
||||
android:id="@+id/tv_phone_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextWhiteNormal"
|
||||
android:id="@+id/tv_phone_api_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:textStyle="bold"
|
||||
android:text="Xiaomi Mi"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextWhiteNormal"
|
||||
android:id="@+id/tv_phone_uptime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/uptime"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextWhiteNormal"
|
||||
android:id="@+id/tv_phone_deep_sleep"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/deep_sleep"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/top_white_more" />
|
||||
</RelativeLayout>
|
||||
@ -20,15 +20,17 @@
|
||||
android:paddingHorizontal="@dimen/dashboard_fragment_padding_horizontal"
|
||||
android:paddingVertical="@dimen/dashboard_fragment_padding_vertical">
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_cpu"
|
||||
layout="@layout/dashboard_module_cpu" />
|
||||
android:id="@+id/layout_top"
|
||||
layout="@layout/dashboard_module_top" />
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_center"
|
||||
layout="@layout/dashboard_module_center" />
|
||||
<include
|
||||
android:id="@+id/layout_cpu"
|
||||
layout="@layout/dashboard_module_cpu" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_bottom"
|
||||
|
||||
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 880 B |
|
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 689 B |
BIN
myphoneinfo/src/main/res/mipmap-xhdpi/get_more.png
Normal file
|
After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 700 B |
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 705 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 732 B |
|
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 800 B |
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 670 B |
BIN
myphoneinfo/src/main/res/mipmap-xhdpi/top_grey_more.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
myphoneinfo/src/main/res/mipmap-xhdpi/top_white_more.png
Normal file
|
After Width: | Height: | Size: 273 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 793 B |
@ -6,7 +6,7 @@
|
||||
<color name="main_tab_unselected">#7F7F7F</color>
|
||||
<color name="main_tab_selected">#1E8C29</color>
|
||||
<color name="forground_color">#FFFFFF</color>
|
||||
<color name="background_color">#EDEDED</color>
|
||||
<color name="background_color">#f4f4f4</color>
|
||||
<color name="module_title_color">#3B948A</color>
|
||||
<color name="left_color">#626262</color>
|
||||
<color name="right_color">#757575</color>
|
||||
@ -15,4 +15,9 @@
|
||||
<color name="dialog_value_color">#757575</color>
|
||||
<color name="tem_right_color">#2B2B2B</color>
|
||||
<color name="temp_color">#B1B1B1</color>
|
||||
|
||||
<!-- 二编-->
|
||||
<color name="slide_left">#F8F8F8</color>
|
||||
<color name="dash_color">#76B4AD</color>
|
||||
<color name="yellow_color">#FFD54F</color>
|
||||
</resources>
|
||||
@ -15,9 +15,9 @@
|
||||
<dimen name="dashboard_model_background_corners">10dp</dimen>
|
||||
<dimen name="dashboard_model_background_corners_small">0dp</dimen>
|
||||
|
||||
<dimen name="dashboard_fragment_padding_horizontal">8dp</dimen>
|
||||
<dimen name="dashboard_fragment_padding_vertical">15dp</dimen>
|
||||
<dimen name="dashboard_model_padding_horizontal">8dp</dimen>
|
||||
<dimen name="dashboard_fragment_padding_horizontal">16dp</dimen>
|
||||
<dimen name="dashboard_fragment_padding_vertical">8dp</dimen>
|
||||
<dimen name="dashboard_model_padding_horizontal">10dp</dimen>
|
||||
<dimen name="dashboard_model_padding_vertical">10dp</dimen>
|
||||
|
||||
|
||||
@ -26,7 +26,10 @@
|
||||
|
||||
<dimen name="dashboard_cpu_content_item_padding_vertical">8dp</dimen>
|
||||
|
||||
<dimen name="common_module_interval_small">5dp</dimen>
|
||||
<dimen name="common_module_interval_small">10dp</dimen>
|
||||
<dimen name="common_module_interval_medium">7dp</dimen>
|
||||
<dimen name="common_module_interval_large">10dp</dimen>
|
||||
|
||||
<dimen name="each_item_padding_vertical">14dp</dimen>
|
||||
<dimen name="each_item_padding_horizontal">16dp</dimen>
|
||||
</resources>
|
||||
@ -6,19 +6,14 @@
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
<!-- 超大字号-->
|
||||
<style name="TextTitleBig">
|
||||
<item name="android:textSize">30sp</item>
|
||||
<item name="fontFamily">@font/candal</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
</style>
|
||||
|
||||
<!-- Dashboard面板 -->
|
||||
|
||||
<!-- 页面上每个模块的模块名字-->
|
||||
<style name="TextModuleTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">@dimen/size_module_title</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_regular</item>
|
||||
</style>
|
||||
|
||||
<!-- CPU status 内容显示-->
|
||||
@ -26,14 +21,14 @@
|
||||
<item name="android:textSize">23sp</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<!-- <item name="android:fontFamily">sans-serif</item> <!– 老版本 fallback –>-->
|
||||
</style>
|
||||
|
||||
<!-- 模块通用内容显示-->
|
||||
<style name="TextContent" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
@ -43,7 +38,7 @@
|
||||
<style name="TextBig" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">21sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
@ -52,14 +47,14 @@
|
||||
<style name="TextDialogSubTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
|
||||
</style>
|
||||
<!-- 首页弹窗内容的左边标题-->
|
||||
<style name="TextDialogLabel" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/dialog_label_color</item>
|
||||
</style>
|
||||
@ -67,7 +62,7 @@
|
||||
<!-- 首页弹窗内容的右边内容-->
|
||||
<style name="TextDialogContent" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
|
||||
@ -75,7 +70,7 @@
|
||||
<!-- 首页弹窗Cancel-->
|
||||
<style name="TextBtnTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">19sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<!-- <item name="android:fontFamily">sans-serif</item> <!– 老版本 fallback –>-->
|
||||
@ -84,7 +79,7 @@
|
||||
<!--右边内容字体-->
|
||||
<style name="TextContentRight" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">19sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textColor">@color/right_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
@ -92,7 +87,7 @@
|
||||
<!-- 左边内容字体-->
|
||||
<style name="TextContentLeft" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">19sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/left_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
@ -100,7 +95,7 @@
|
||||
<!-- 判断框字体-->
|
||||
<style name="TextCheck" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">19sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/check_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
@ -108,21 +103,21 @@
|
||||
<!-- Dialog标题-->
|
||||
<style name="TextDialog" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">21sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
<!--小字体-->
|
||||
<style name="TextContentSmall" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
</style>
|
||||
<!-- 超大字号-->
|
||||
<style name="TextMaxBig" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">48sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
<item name="android:textStyle">bold</item>
|
||||
@ -130,7 +125,7 @@
|
||||
<!-- systemDevice标题-->
|
||||
<style name="TextDeviceBig" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">26sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
<item name="android:textStyle">normal</item>
|
||||
@ -139,7 +134,7 @@
|
||||
<style name="TextDeviceLogo">
|
||||
<item name="android:textSize">21sp</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="fontFamily">@font/bowl_byone</item>
|
||||
<item name="fontFamily">@font/pingfang_bold</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
@ -147,7 +142,7 @@
|
||||
<style name="TextBatteryLogo">
|
||||
<item name="android:textSize">44sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/bowl_byone</item>
|
||||
<item name="fontFamily">@font/pingfang_bold</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
@ -155,26 +150,26 @@
|
||||
<style name="TextSize37">
|
||||
<item name="android:textSize">37sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
</style>
|
||||
<!-- size28-->
|
||||
<style name="TextSize28">
|
||||
<item name="android:textSize">28sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
</style>
|
||||
<!-- system副标题-->
|
||||
<style name="TextSecondaryTitle" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<!-- <item name="android:fontFamily">sans-serif</item> <!– 老版本 fallback –>-->
|
||||
</style>
|
||||
<!-- 电量右边字体-->
|
||||
<style name="TextButteryRight" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">19sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<!-- <item name="fontFamily">@font/semibold</item>-->
|
||||
@ -182,7 +177,7 @@
|
||||
<!-- wifi右边字体-->
|
||||
<style name="TextWifiRight" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">30sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
</style>
|
||||
@ -190,13 +185,13 @@
|
||||
<style name="TextTool21">
|
||||
<item name="android:textSize">21sp</item>
|
||||
<item name="android:textColor">@color/dialog_value_color</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
<!-- 工具大字体-->
|
||||
<style name="TextTool25" >
|
||||
<item name="android:textSize">25sp</item>
|
||||
<item name="fontFamily">@font/arimo</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
@ -210,4 +205,35 @@
|
||||
<item name="android:windowIsFloating">false</item> <!-- 使对话框全屏显示 -->
|
||||
<item name="android:windowSoftInputMode">stateAlwaysHidden</item> <!-- 隐藏软键盘 -->
|
||||
</style>
|
||||
<!-- 二编自定义 Text的样式 -->
|
||||
<!-- 自定义 侧边栏 的样式 -->
|
||||
<style name="SlideInLeftAnimation">
|
||||
<item name="android:windowEnterAnimation">@anim/slide_in_left</item>
|
||||
<item name="android:windowExitAnimation">@anim/slide_out_left</item>
|
||||
</style>
|
||||
<!-- 首页标题appname-->
|
||||
<style name="TextTitleBig">
|
||||
<item name="android:textSize">22sp</item>
|
||||
<item name="fontFamily">@font/alimama_heiti</item>
|
||||
<item name="android:textColor">@color/module_title_color</item>
|
||||
</style>
|
||||
<!-- 首页机型标题-->
|
||||
<style name="TextYellow">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/yellow_color</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
</style>
|
||||
<!-- 首页内容-->
|
||||
<style name="TextWhite">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="fontFamily">@font/pingfang_heavy_0</item>
|
||||
</style>
|
||||
<!-- 首页内容标准-->
|
||||
<style name="TextWhiteNormal">
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="fontFamily">@font/pingfang_regular</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||