Commit 6b92f136 authored by wanglei's avatar wanglei

[拆包]修改首页

parent e21675e6
...@@ -20,6 +20,7 @@ class FeatureBean( ...@@ -20,6 +20,7 @@ class FeatureBean(
const val LARGE_FILE_CLEAN = "large_file_clean" const val LARGE_FILE_CLEAN = "large_file_clean"
const val PHOTO_COMPRESSION = "photo_compression" const val PHOTO_COMPRESSION = "photo_compression"
const val SIMILAR_PHOTOS = "similar_photos" const val SIMILAR_PHOTOS = "similar_photos"
const val VIDEO_CLEAN = "video_clean"
const val RECOVERY_PHOTOS = "recovery_photos" const val RECOVERY_PHOTOS = "recovery_photos"
const val RECOVERY_VIDEOS = "recovery_videos" const val RECOVERY_VIDEOS = "recovery_videos"
......
...@@ -6,10 +6,9 @@ import android.view.ViewGroup ...@@ -6,10 +6,9 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView.ViewHolder import androidx.recyclerview.widget.RecyclerView.ViewHolder
import com.base.appzxhy.R import com.base.appzxhy.R
import com.base.appzxhy.bean.FeatureBean import com.base.appzxhy.bean.FeatureBean
import com.base.appzxhy.bean.FeatureBean.Companion.ANTIVIRUS
import com.base.appzxhy.bean.FeatureBean.Companion.JUNK_CLEAN
import com.base.appzxhy.databinding.ItemFeatureSpan12Binding import com.base.appzxhy.databinding.ItemFeatureSpan12Binding
import com.base.appzxhy.databinding.ItemFeatureSpan1Binding import com.base.appzxhy.databinding.ItemFeatureSpan1Binding
import com.base.appzxhy.databinding.ItemFeatureSpan2Binding
import com.base.appzxhy.utils.Utils.inflate import com.base.appzxhy.utils.Utils.inflate
import com.chad.library.adapter4.BaseQuickAdapter import com.chad.library.adapter4.BaseQuickAdapter
...@@ -19,41 +18,39 @@ class FeatureItemAdapter : BaseQuickAdapter<FeatureBean, FeatureItemAdapter.Koko ...@@ -19,41 +18,39 @@ class FeatureItemAdapter : BaseQuickAdapter<FeatureBean, FeatureItemAdapter.Koko
var itemClick: ((bean: FeatureBean) -> Unit)? = null var itemClick: ((bean: FeatureBean) -> Unit)? = null
override fun onBindViewHolder(holder: Koko8888, position: Int, item: FeatureBean?) { override fun onBindViewHolder(holder: Koko8888, position: Int, item: FeatureBean?) {
item ?: return item ?: return
val context = holder.itemView.context val context = holder.itemView.context
when(item.span){
if (item.todayUsed) { 1->{
val binding = ItemFeatureSpan1Binding.bind(holder.itemView) val binding = ItemFeatureSpan2Binding.bind(holder.itemView)
binding.ivIcon.setImageResource(item.icon) binding.ivIcon.setImageResource(item.icon)
binding.tvName.text = context.getString(item.titleRes) binding.tvName.text = context.getString(item.titleRes)
binding.tvContent.text = context.getString(item.content) binding.root.setOnClickListener {
binding.ll.setBackgroundColor(item.color) itemClick?.invoke(item)
binding.root.setOnClickListener { }
itemClick?.invoke(item)
} }
} else { 2->{
val binding = ItemFeatureSpan12Binding.bind(holder.itemView) val binding = ItemFeatureSpan1Binding.bind(holder.itemView)
binding.ivIcon.setImageResource(item.icon) binding.ivIcon.setImageResource(item.icon)
binding.tvName.text = context.getString(item.titleRes) binding.tvName.text = context.getString(item.titleRes)
binding.tvContent.text = context.getString(item.content) binding.root.setOnClickListener {
binding.ll.setBackgroundColor(item.color) itemClick?.invoke(item)
binding.root.setOnClickListener { }
itemClick?.invoke(item)
} }
} }
} }
override fun getItemViewType(position: Int, list: List<FeatureBean>): Int { override fun getItemViewType(position: Int, list: List<FeatureBean>): Int {
val bean = list[position] val bean = list[position]
return if (!bean.todayUsed && (bean.key == JUNK_CLEAN || bean.key == ANTIVIRUS)) 0 else 1 return bean.span
} }
override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): Koko8888 { override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): Koko8888 {
val layout = if (viewType == 0) R.layout.item_feature_span1_2 else R.layout.item_feature_span1 val layout = if (viewType == 1) R.layout.item_feature_span2 else R.layout.item_feature_span1
return Koko8888(layout.inflate(parent)) return Koko8888(layout.inflate(parent))
} }
} }
\ No newline at end of file
package com.base.appzxhy.ui.main package com.base.appzxhy.ui.main
import android.animation.ObjectAnimator
import android.animation.ValueAnimator
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.ActivityManager import android.app.ActivityManager
import android.content.Context
import android.view.View
import android.view.animation.LinearInterpolator
import androidx.core.content.ContextCompat.getSystemService import androidx.core.content.ContextCompat.getSystemService
import androidx.core.graphics.toColorInt
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.GridLayoutManager
import com.base.appzxhy.R import com.base.appzxhy.R
import com.base.appzxhy.base.BaseFragment import com.base.appzxhy.base.BaseFragment
import com.base.appzxhy.base.jumpAction import com.base.appzxhy.base.jumpAction
...@@ -23,19 +17,18 @@ import com.base.appzxhy.bean.FeatureBean.Companion.PHOTO_COMPRESSION ...@@ -23,19 +17,18 @@ import com.base.appzxhy.bean.FeatureBean.Companion.PHOTO_COMPRESSION
import com.base.appzxhy.bean.FeatureBean.Companion.SCREENSHOT_CLEAN import com.base.appzxhy.bean.FeatureBean.Companion.SCREENSHOT_CLEAN
import com.base.appzxhy.bean.FeatureBean.Companion.SETTINGS import com.base.appzxhy.bean.FeatureBean.Companion.SETTINGS
import com.base.appzxhy.bean.FeatureBean.Companion.SIMILAR_PHOTOS import com.base.appzxhy.bean.FeatureBean.Companion.SIMILAR_PHOTOS
import com.base.appzxhy.bean.FeatureBean.Companion.getFunctionTodayUsed import com.base.appzxhy.bean.FeatureBean.Companion.VIDEO_CLEAN
import com.base.appzxhy.databinding.FragmentHomeBinding import com.base.appzxhy.databinding.FragmentHome3Binding
import com.base.appzxhy.ui.dialog.permissionStorageJump import com.base.appzxhy.ui.dialog.permissionStorageJump
import com.base.appzxhy.ui.malware.MalwareDialog import com.base.appzxhy.ui.malware.MalwareDialog
import com.base.appzxhy.ui.set.SettingActivity import com.base.appzxhy.ui.set.SettingActivity
import com.base.appzxhy.utils.MyAnimationUtils import com.base.appzxhy.utils.KotlinExt.toFormatSize
import com.base.appzxhy.utils.Utils import com.base.appzxhy.utils.Utils
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
class HomeFragment : BaseFragment<FragmentHome3Binding>(FragmentHome3Binding::inflate) {
class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::inflate) {
private val adapter = FeatureItemAdapter() private val adapter = FeatureItemAdapter()
...@@ -45,59 +38,45 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl ...@@ -45,59 +38,45 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
FeatureBean( FeatureBean(
JUNK_CLEAN, JUNK_CLEAN,
R.string.clean_junk, R.string.clean_junk,
R.drawable.icon_clean, R.drawable.icon_clean_h,
R.string.make_your_phone_clean,
"#FFF7F2".toColorInt()
),
FeatureBean(
ANTIVIRUS,
R.string.antivirus,
R.drawable.icon_antivirus,
R.string.mobile_antivirus_protection,
"#F2FFF7".toColorInt()
),
FeatureBean(
SCREENSHOT_CLEAN,
R.string.screenshot_clean,
R.drawable.icon_screenshot,
R.string.clear_phone_screenshot,
"#FFFCF2".toColorInt()
), ),
FeatureBean( FeatureBean(
LARGE_FILE_CLEAN, BATTERY_INFO,
R.string.large_file_clean, R.string.battery_info,
R.drawable.icon_large_file_clean, R.drawable.icon_battery_h,
R.string.clear_large_files_on_the_phone,
"#F2FFF7".toColorInt()
), ),
FeatureBean( FeatureBean(
SIMILAR_PHOTOS, SIMILAR_PHOTOS,
R.string.similar_photos, R.string.similar_photos,
R.drawable.icon_similar, R.drawable.icon_similar_h,
R.string.clear_similar_pictures_on_the_phone,
"#FBF7FF".toColorInt()
), ),
FeatureBean( FeatureBean(
PHOTO_COMPRESSION, VIDEO_CLEAN,
R.string.image_compression, R.string.video_clean,
R.drawable.icon_compression, R.drawable.icon_similar_h,
R.string.compress_mobile_phone_images,
"#FFF7F2".toColorInt()
), ),
FeatureBean( FeatureBean(
BATTERY_INFO, PHOTO_COMPRESSION,
R.string.battery_info, R.string.photo_compression,
R.drawable.icon_battery, R.drawable.icon_compression_h,
R.string.view_battery_information, ).apply {
"#F2FFF7".toColorInt() span = 2
), },
FeatureBean( FeatureBean(
SETTINGS, SCREENSHOT_CLEAN,
R.string.settings, R.string.screenshot_clean,
R.drawable.icon_set, R.drawable.icon_screenshot_h,
R.string.show_all_settings, ).apply {
"#FBF7FF".toColorInt() span = 2
), },
FeatureBean(
LARGE_FILE_CLEAN,
R.string.large_file_clean,
R.drawable.icon_file_h,
).apply {
span = 2
},
) )
} }
...@@ -106,17 +85,22 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl ...@@ -106,17 +85,22 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
(requireActivity() as MainActivity).insetsCallBack = { insets -> (requireActivity() as MainActivity).insetsCallBack = { insets ->
binding.flTop.setPadding(0, insets.top, 0, 0) binding.flTop.setPadding(0, insets.top, 0, 0)
} }
val layoutManager = GridLayoutManager(requireContext(), 2)
layoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
val span = featureList[position].span
return span
}
}
binding.rv.layoutManager = layoutManager
binding.rv.adapter = adapter binding.rv.adapter = adapter
startAnimation() adapter.submitList(featureList)
} }
override fun initListener() { override fun initListener() {
super.initListener() super.initListener()
binding.tvClean.setOnClickListener {
(requireActivity() as MainActivity).permissionStorageJump(JUNK_CLEAN)
}
binding.flClean.setOnClickListener { binding.flClean.setOnClickListener {
(requireActivity() as MainActivity).permissionStorageJump(JUNK_CLEAN) (requireActivity() as MainActivity).permissionStorageJump(JUNK_CLEAN)
} }
...@@ -152,43 +136,10 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl ...@@ -152,43 +136,10 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
} }
} }
binding.ivUp.setOnClickListener {
val lastChild = binding.nestedScrollView.getChildAt(binding.nestedScrollView.childCount - 1)
binding.nestedScrollView.smoothScrollTo(0, lastChild.bottom)
}
}
private fun startAnimation() {
MyAnimationUtils.rotation(binding.ivYuan, 2000)
binding.tvJunkFile.alpha = 0f
ValueAnimator.ofFloat(0f, 1f).apply {
this.duration = 1000
this.startDelay = 1200
addUpdateListener { animation ->
val value = animation.animatedValue as Float
binding.tvJunkFile.alpha = value
}
start()
}
val top = requireActivity().resources.getDimension(R.dimen.dp_6)
ObjectAnimator.ofFloat(
binding.ivUp,
View.TRANSLATION_Y,
0f,
top
).apply {
duration = 1000
interpolator = LinearInterpolator()
repeatCount = ObjectAnimator.INFINITE
repeatMode = ValueAnimator.REVERSE
start()
}
} }
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
private fun initData() { private fun initData() {
lifecycleScope.launch(Dispatchers.IO) { lifecycleScope.launch(Dispatchers.IO) {
...@@ -208,25 +159,17 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl ...@@ -208,25 +159,17 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
val percentM = (100 * availMem / totalMem).toInt() val percentM = (100 * availMem / totalMem).toInt()
launch(Dispatchers.Main) { launch(Dispatchers.Main) {
binding.tvMemoryPercent.text = "$percentM%" binding.tvUsed.text = usedStorageSize.toFormatSize(1)
binding.progressBarMemory.setProgress(100 - percentM, true) binding.tvTotal.text = "/" + usedStorageSize.toFormatSize(1)
binding.circleProgress.setProgressWithAnimation(percent.toFloat(), duration = 1000L, startDelay = 200L)
binding.tvStoragePercent.text = "$percent%"
binding.progressBarStorage.setProgress(100 - percent, true)
} }
} }
} }
override fun onResumeOneShoot() { override fun onResumeOneShoot() {
super.onResumeOneShoot() super.onResumeOneShoot()
changeListTodayUsed()
initData() initData()
} }
@SuppressLint("NotifyDataSetChanged")
fun changeListTodayUsed() {
featureList[0].todayUsed = getFunctionTodayUsed(JUNK_CLEAN)
featureList[1].todayUsed = getFunctionTodayUsed(ANTIVIRUS)
adapter.submitList(featureList)
}
} }
...@@ -8,7 +8,6 @@ import androidx.lifecycle.lifecycleScope ...@@ -8,7 +8,6 @@ import androidx.lifecycle.lifecycleScope
import com.base.appzxhy.R import com.base.appzxhy.R
import com.base.appzxhy.SpConstObject.mainPageCount import com.base.appzxhy.SpConstObject.mainPageCount
import com.base.appzxhy.base.BaseActivity import com.base.appzxhy.base.BaseActivity
import com.base.appzxhy.bean.FeatureBean.Companion.ANTIVIRUS
import com.base.appzxhy.bean.FeatureBean.Companion.JUNK_CLEAN import com.base.appzxhy.bean.FeatureBean.Companion.JUNK_CLEAN
import com.base.appzxhy.bean.config.AdConfigBean import com.base.appzxhy.bean.config.AdConfigBean
import com.base.appzxhy.business.ads.AdsMgr import com.base.appzxhy.business.ads.AdsMgr
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:endColor="#0456ED"
android:startColor="#68D2FF" />
</shape>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadiusRatio="3" android:innerRadiusRatio="3"
android:shape="ring" android:shape="ring"
android:thicknessRatio="8" android:thicknessRatio="18"
android:useLevel="false"> android:useLevel="false">
<solid android:color="#E7F1FD" /> <solid android:color="#80FFFFFF" />
</shape> </shape>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
android:layout_width="64dp" android:layout_width="64dp"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:src="@mipmap/logo" android:src="@mipmap/logo_corners"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -68,11 +68,11 @@ ...@@ -68,11 +68,11 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:background="@drawable/bg_enable_no_50" android:background="#F2F3F6"
android:paddingVertical="10dp" android:paddingVertical="10dp"
android:text="@string/exit" android:text="@string/exit"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/colorPrimary" android:textColor="#85909D"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/tvCleanNow" app:layout_constraintEnd_toStartOf="@id/tvCleanNow"
...@@ -84,10 +84,10 @@ ...@@ -84,10 +84,10 @@
android:id="@+id/tvCleanNow" android:id="@+id/tvCleanNow"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="@dimen/dp_8"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:background="@drawable/bg_btn_50" android:background="@drawable/bg_68d2ff_0456ed"
android:paddingVertical="10dp" android:paddingVertical="10dp"
android:text="@string/clean_now" android:text="@string/clean_now"
android:textAlignment="center" android:textAlignment="center"
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical">
tools:context=".ui.main.Home2Fragment">
<FrameLayout <FrameLayout
android:id="@+id/flTop" android:id="@+id/flTop"
...@@ -48,7 +47,7 @@ ...@@ -48,7 +47,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_ring_e7f1fd" /> android:background="@drawable/bg_ring_home" />
<com.mikhaellopez.circularprogressbar.CircularProgressBar <com.mikhaellopez.circularprogressbar.CircularProgressBar
android:id="@+id/circleProgress" android:id="@+id/circleProgress"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.main.Home3Fragment"> android:orientation="vertical">
<!-- TODO: Update blank fragment layout --> <androidx.appcompat.widget.AppCompatImageView
<TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="@dimen/dp_400"
android:text="@string/hello_blank_fragment" /> android:background="@drawable/qingli_bg"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout> <FrameLayout
\ No newline at end of file android:id="@+id/flTop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_16"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="@dimen/sp_19"
android:textStyle="bold" />
</FrameLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/flTop">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/dp_10">
<FrameLayout
android:id="@+id/flClean"
android:layout_width="@dimen/dp_250"
android:layout_height="@dimen/dp_250"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-10dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_ring_home" />
<com.mikhaellopez.circularprogressbar.CircularProgressBar
android:id="@+id/circleProgress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/dp_28"
app:cpb_background_progressbar_color="#CCFFFFFF"
app:cpb_background_progressbar_width="@dimen/dp_8"
app:cpb_progress_direction="to_right"
app:cpb_progress_max="100"
app:cpb_progressbar_color="@color/white"
app:cpb_progressbar_width="@dimen/dp_8"
app:cpb_round_border="true"
tools:cpb_progress="50" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_20">
<TextView
android:id="@+id/tvUsed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:text="0.0 GB"
android:textColor="#F22C25"
android:textSize="@dimen/sp_18"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tvTotal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" / 0.0GB"
android:textColor="#999999"
android:textSize="@dimen/sp_18"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:text="@string/CLEAN"
android:textColor="@color/white"
android:textSize="@dimen/sp_18"
android:textStyle="bold" />
</LinearLayout>
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:paddingHorizontal="@dimen/dp_8" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_70" android:layout_height="@dimen/dp_70"
android:layout_marginHorizontal="@dimen/dp_16" android:layout_marginHorizontal="@dimen/dp_8"
android:layout_marginVertical="6dp" android:layout_marginVertical="@dimen/dp_6"
app:cardCornerRadius="@dimen/dp_8" app:cardCornerRadius="@dimen/dp_8"
app:cardElevation="0dp"> app:cardElevation="0dp">
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
android:foreground="?attr/selectableItemBackground" android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
tools:background="#FFF7F2"> tools:background="@drawable/bg_ffffff_8">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivIcon" android:id="@+id/ivIcon"
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#999999" android:textColor="#999999"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:visibility="gone"
tools:text="Make your phone clean" /> tools:text="Make your phone clean" />
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="6dp" android:layout_marginHorizontal="@dimen/dp_6"
android:layout_marginVertical="12dp" android:layout_marginVertical="@dimen/dp_6"
android:background="@drawable/bg_f8f9fa_15" android:orientation="vertical"
android:orientation="vertical"> app:cardBackgroundColor="@color/white"
app:cardCornerRadius="@dimen/dp_12">
<androidx.appcompat.widget.AppCompatImageView <LinearLayout
android:id="@+id/iv_icon" android:layout_width="match_parent"
android:layout_width="@dimen/dp_30"
android:layout_height="@dimen/dp_30"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dp"
android:src="@drawable/h_junkclean" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:foreground="?attr/selectableItemBackground"
android:layout_marginTop="16dp" android:orientation="vertical">
android:layout_marginBottom="15dp"
android:gravity="center" <androidx.appcompat.widget.AppCompatImageView
android:text="@string/app_name" android:id="@+id/ivIcon"
android:textColor="@color/black" android:layout_width="@dimen/dp_50"
android:textSize="16sp" /> android:layout_height="@dimen/dp_50"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_20" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="15dp"
android:gravity="center"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</LinearLayout> </androidx.cardview.widget.CardView>
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="transparent">#00000000</color> <color name="transparent">#00000000</color>
<color name="colorPrimary">#2DD29E</color> <color name="colorPrimary">#0456ed</color>
<color name="colorDisEnable">#F0FFFA</color> <color name="colorDisEnable">#F0FFFA</color>
<color name="color_66000000">#66000000</color> <color name="color_66000000">#66000000</color>
......
...@@ -61,4 +61,12 @@ ...@@ -61,4 +61,12 @@
<dimen name="dp_130">130dp</dimen> <dimen name="dp_130">130dp</dimen>
<dimen name="dp_42">42dp</dimen> <dimen name="dp_42">42dp</dimen>
<dimen name="dp_316">316dp</dimen> <dimen name="dp_316">316dp</dimen>
<dimen name="dp_400">400dp</dimen>
<dimen name="sp_19">19sp</dimen>
<dimen name="dp_188">188dp</dimen>
<dimen name="dp_200">200dp</dimen>
<dimen name="dp_115">115dp</dimen>
<dimen name="dp_220">220dp</dimen>
<dimen name="dp_250">250dp</dimen>
<dimen name="dp_28">28dp</dimen>
</resources> </resources>
\ No newline at end of file
...@@ -233,6 +233,7 @@ Please rest assured that we will handle your information in strict accordance wi ...@@ -233,6 +233,7 @@ Please rest assured that we will handle your information in strict accordance wi
<string name="ads_are_about_to_be_shown_s">Ads are about to be shown(%1$ss)</string> <string name="ads_are_about_to_be_shown_s">Ads are about to be shown(%1$ss)</string>
<string name="issue">%1$s issue</string> <string name="issue">%1$s issue</string>
<string name="by_continuing_">By continuing you are agreeing to the\u0020</string> <string name="by_continuing_">By continuing you are agreeing to the\u0020</string>
<string name="video_clean">Video Clean</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment