Commit efe97210 authored by wanglei's avatar wanglei

首页ui替换

parent 10ca7fbd
Pipeline #1128 canceled with stages
# One Clean Master # One Clean Master
文件清理类的拆包 文件清理类的拆包
\ No newline at end of file
# vps
152.32.236.167 Administrator 9b@W@2Vg
# google-services.json
```json
{
"project_info": {
"project_number": "1066265509581",
"project_id": "one-clean-master",
"storage_bucket": "one-clean-master.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1066265509581:android:2956bee73f44b0ee347384",
"android_client_info": {
"package_name": "com.kcleank.utility.opt"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCtnhhhAD-jvzFFhPtlujDPD59HU_cuKpw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
```
...@@ -25,33 +25,33 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) : ...@@ -25,33 +25,33 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
RecyclerView.Adapter<AppFunctionAdapter.JJJ>() { RecyclerView.Adapter<AppFunctionAdapter.JJJ>() {
val list = arrayListOf( val list = arrayListOf(
Fun(JUNK_CLEANER, R.drawable.cleanjunk, "Clean junk regularly to free up space", "Clean Up"), Fun(JUNK_CLEANER, R.drawable.home_cleanjunk, "Clean junk regularly to free up space", "Clean Up"),
// Fun(VIRUS_SCAN, R.drawable.virus, "Scan your phone for viruses now to protect your security and pr", "Scan Now"), // Fun(VIRUS_SCAN, R.drawable.virus, "Scan your phone for viruses now to protect your security and pr", "Scan Now"),
Fun(PHOTO_COMPRESS, R.drawable.photo, "Compress photos to save space", "Compress"), Fun(PHOTO_COMPRESS, R.drawable.home_cleanjunk, "Compress photos to save space", "Compress"),
Fun(LARGE_FILE_CLEANER, R.drawable.large, "Clean large files to free up storage space", "Clean Up"), Fun(LARGE_FILE_CLEANER, R.drawable.home_cleanjunk, "Clean large files to free up storage space", "Clean Up"),
Fun(BATTERY_INFO, R.drawable.batteryinfo, "View battery usage and details", "Check Now"), Fun(BATTERY_INFO, R.drawable.home_cleanjunk, "View battery usage and details", "Check Now"),
Fun( Fun(
APP_MANAGER, APP_MANAGER,
R.drawable.appmanager, R.drawable.home_cleanjunk,
"Check apps size and uninstall some apps to release storage space", "Check apps size and uninstall some apps to release storage space",
"Check Now" "Check Now"
), ),
Fun( Fun(
SIMILAR_PHOTOS, SIMILAR_PHOTOS,
R.drawable.similar, R.drawable.home_cleanjunk,
"Check similar photos to release more space", "Check similar photos to release more space",
"Clean Up" "Clean Up"
), ),
Fun( Fun(
NOTIFICATION_CLEANER, NOTIFICATION_CLEANER,
R.drawable.notification, R.drawable.home_cleanjunk,
"Too many annoying notifications? Block and clean", "Too many annoying notifications? Block and clean",
"Check Now" "Check Now"
), ),
Fun(RECENT_APP_USAGE, R.drawable.recentapp, "Check and manage recently active apps", "View Now"), Fun(RECENT_APP_USAGE, R.drawable.home_cleanjunk, "Check and manage recently active apps", "View Now"),
Fun( Fun(
NETWORK_TRAFFIC, NETWORK_TRAFFIC,
R.drawable.network, R.drawable.home_cleanjunk,
"View network traffic usage and stop traffic-consuming apps", "View network traffic usage and stop traffic-consuming apps",
"View Now" "View Now"
) )
......
...@@ -135,68 +135,68 @@ object NotificationHelper { ...@@ -135,68 +135,68 @@ object NotificationHelper {
val remoteViews = RemoteViews(packageName, R.layout.notification_common_notify) val remoteViews = RemoteViews(packageName, R.layout.notification_common_notify)
when (actionId) { when (actionId) {
ID_JUNK_CLEAN_PUSH -> { ID_JUNK_CLEAN_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.cleanjunk) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_cleanjunk)
remoteViews.setTextViewText(R.id.tv_desc, "Clean up remaining junk files") remoteViews.setTextViewText(R.id.tv_desc, "Clean up remaining junk files")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up") remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
} }
ID_VIRUS_PUSH -> { ID_VIRUS_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.virus) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_cleanjunk)
remoteViews.setTextViewText(R.id.tv_desc, "Protect your device and privacy, scan for virus threats now!") remoteViews.setTextViewText(R.id.tv_desc, "Protect your device and privacy, scan for virus threats now!")
remoteViews.setTextViewText(R.id.tv_btn, "Scan") remoteViews.setTextViewText(R.id.tv_btn, "Scan")
} }
ID_BATTERY_OPTIMIZATION -> { ID_BATTERY_OPTIMIZATION -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.batteryinfo) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_batteryinfo)
val random = Random.nextInt(0, 50) val random = Random.nextInt(0, 50)
remoteViews.setTextViewText(R.id.tv_desc, "$random Apps are consuming photo power") remoteViews.setTextViewText(R.id.tv_desc, "$random Apps are consuming photo power")
remoteViews.setTextViewText(R.id.tv_btn, "Optimize") remoteViews.setTextViewText(R.id.tv_btn, "Optimize")
} }
ID_LARGE_FILE_PUSH -> { ID_LARGE_FILE_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.large) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_large)
remoteViews.setTextViewText(R.id.tv_desc, "Clean big files to free up storage space") remoteViews.setTextViewText(R.id.tv_desc, "Clean big files to free up storage space")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up") remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
} }
ID_PHOTO_COMPRESS -> { ID_PHOTO_COMPRESS -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.photo) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_photo)
remoteViews.setTextViewText(R.id.tv_desc, "Compress images to release more space") remoteViews.setTextViewText(R.id.tv_desc, "Compress images to release more space")
remoteViews.setTextViewText(R.id.tv_btn, "Compress") remoteViews.setTextViewText(R.id.tv_btn, "Compress")
} }
ID_APP_MANAGER -> { ID_APP_MANAGER -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.appmanager) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_appmanager)
remoteViews.setTextViewText(R.id.tv_desc, "Check apps size and uninstall junk apps to release storage space") remoteViews.setTextViewText(R.id.tv_desc, "Check apps size and uninstall junk apps to release storage space")
remoteViews.setTextViewText(R.id.tv_btn, "Manage") remoteViews.setTextViewText(R.id.tv_btn, "Manage")
} }
ID_NETWORK_TRAFFIC -> { ID_NETWORK_TRAFFIC -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.network) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_network)
remoteViews.setTextViewText(R.id.tv_desc, "View network traffic usage and stop traffic-consuming apps.") remoteViews.setTextViewText(R.id.tv_desc, "View network traffic usage and stop traffic-consuming apps.")
remoteViews.setTextViewText(R.id.tv_btn, "View") remoteViews.setTextViewText(R.id.tv_btn, "View")
} }
ID_CLEAN_NOTIFICATION -> { ID_CLEAN_NOTIFICATION -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.notification) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_notification)
remoteViews.setTextViewText(R.id.tv_desc, "Too many annoying notifications? Block and clean") remoteViews.setTextViewText(R.id.tv_desc, "Too many annoying notifications? Block and clean")
remoteViews.setTextViewText(R.id.tv_btn, "View") remoteViews.setTextViewText(R.id.tv_btn, "View")
} }
ID_RECENT_USE_APP -> { ID_RECENT_USE_APP -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.recentapp) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Check and manage recently active apps") remoteViews.setTextViewText(R.id.tv_desc, "Check and manage recently active apps")
remoteViews.setTextViewText(R.id.tv_btn, "Manage") remoteViews.setTextViewText(R.id.tv_btn, "Manage")
} }
ID_SIMILAR_IMAGE -> { ID_SIMILAR_IMAGE -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.similar) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_similar)
remoteViews.setTextViewText(R.id.tv_desc, "Check similar photos to release more space") remoteViews.setTextViewText(R.id.tv_desc, "Check similar photos to release more space")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up") remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
} }
ID_CLEAN_SPEAKER -> { ID_CLEAN_SPEAKER -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.speaker) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_speaker)
remoteViews.setTextViewText(R.id.tv_desc, "Clean the speaker dust and fix the low volume problem") remoteViews.setTextViewText(R.id.tv_desc, "Clean the speaker dust and fix the low volume problem")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up") remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
} }
...@@ -204,31 +204,31 @@ object NotificationHelper { ...@@ -204,31 +204,31 @@ object NotificationHelper {
//==================================下面是被动推送的情况=============================================== //==================================下面是被动推送的情况===============================================
ID_INSTALL_PACKAGE_PUSH -> { ID_INSTALL_PACKAGE_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.install) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Install successfully, scan for virus threats now!") remoteViews.setTextViewText(R.id.tv_desc, "Install successfully, scan for virus threats now!")
remoteViews.setTextViewText(R.id.tv_btn, "Scan") remoteViews.setTextViewText(R.id.tv_btn, "Scan")
} }
ID_UNINSTALL_PACKAGE_PUSH -> { ID_UNINSTALL_PACKAGE_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.uninstall) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Uninstalled successfully, clean residual files from your device") remoteViews.setTextViewText(R.id.tv_desc, "Uninstalled successfully, clean residual files from your device")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up") remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
} }
ID_CHARGE -> { ID_CHARGE -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.start) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "View phone battery consumption recently") remoteViews.setTextViewText(R.id.tv_desc, "View phone battery consumption recently")
remoteViews.setTextViewText(R.id.tv_btn, "View") remoteViews.setTextViewText(R.id.tv_btn, "View")
} }
ID_LOW_BATTERY_PUSH -> { ID_LOW_BATTERY_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.batter) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "The battery is $extra%, view the battery information") remoteViews.setTextViewText(R.id.tv_desc, "The battery is $extra%, view the battery information")
remoteViews.setTextViewText(R.id.tv_btn, "View") remoteViews.setTextViewText(R.id.tv_btn, "View")
} }
ID_PHONE_ACCELERATE -> { ID_PHONE_ACCELERATE -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.memory) remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Ram usage reached $extra%, optimize now!") remoteViews.setTextViewText(R.id.tv_desc, "Ram usage reached $extra%, optimize now!")
remoteViews.setTextViewText(R.id.tv_btn, "Optimize") remoteViews.setTextViewText(R.id.tv_btn, "Optimize")
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
android:layout_height="42dp" android:layout_height="42dp"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="9dp" android:layout_marginEnd="9dp"
android:src="@drawable/batteryinfo" /> android:src="@drawable/home_cleanjunk" />
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -27,5 +27,6 @@ ...@@ -27,5 +27,6 @@
<color name="color_f5f4ff">#F5F4FF</color> <color name="color_f5f4ff">#F5F4FF</color>
<color name="color_f7faff">#F7FAFF</color> <color name="color_f7faff">#F7FAFF</color>
<color name="color_3db9df">#3DB9DF</color> <color name="color_3db9df">#3DB9DF</color>
<color name="color_f3fcfa">#F3FCFA</color>
</resources> </resources>
\ No newline at end of file
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