Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
scanqrwhitecopy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
scanqrwhitecopy
Commits
658fc74b
Commit
658fc74b
authored
Jan 20, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
bcef19c1
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
865 additions
and
0 deletions
+865
-0
NotificationSendBean.kt
...in/java/com/base/scanqrclear/bean/NotificationSendBean.kt
+7
-0
MyNotificationManager.kt
...ase/scanqrclear/fcm/notification/MyNotificationManager.kt
+14
-0
NotificationUiUtil.kt
...m/base/scanqrclear/fcm/notification/NotificationUiUtil.kt
+120
-0
TimeUtils.kt
app/src/main/java/com/base/scanqrclear/utils/TimeUtils.kt
+59
-0
bg_0571ed_25.xml
app/src/main/res/drawable/bg_0571ed_25.xml
+5
-0
bg_ffffff_15.xml
app/src/main/res/drawable/bg_ffffff_15.xml
+5
-0
notification_common_large.xml
app/src/main/res/layout/notification_common_large.xml
+76
-0
notification_common_small.xml
app/src/main/res/layout/notification_common_small.xml
+59
-0
notification_constellation_big.xml
app/src/main/res/layout/notification_constellation_big.xml
+69
-0
notification_constellation_small.xml
app/src/main/res/layout/notification_constellation_small.xml
+42
-0
notification_weather_big.xml
app/src/main/res/layout/notification_weather_big.xml
+308
-0
notification_weather_small.xml
app/src/main/res/layout/notification_weather_small.xml
+96
-0
d_xingzuo.png
app/src/main/res/mipmap-xxhdpi/d_xingzuo.png
+0
-0
icon_smart.png
app/src/main/res/mipmap-xxhdpi/icon_smart.png
+0
-0
tishiicon.png
app/src/main/res/mipmap-xxhdpi/tishiicon.png
+0
-0
x_tianqibg.png
app/src/main/res/mipmap-xxhdpi/x_tianqibg.png
+0
-0
x_xingzuo.png
app/src/main/res/mipmap-xxhdpi/x_xingzuo.png
+0
-0
d_tiantibg.png
app/src/main/res/mipmap-xxxhdpi/d_tiantibg.png
+0
-0
strings.xml
app/src/main/res/values/strings.xml
+5
-0
No files found.
app/src/main/java/com/base/scanqrclear/bean/NotificationSendBean.kt
View file @
658fc74b
...
@@ -36,5 +36,12 @@ class NotificationSendBean(
...
@@ -36,5 +36,12 @@ class NotificationSendBean(
const
val
ACTION_ID_TEXT
=
"action_id_text"
const
val
ACTION_ID_TEXT
=
"action_id_text"
const
val
ACTION_ID_EMAIL
=
"action_id_email"
const
val
ACTION_ID_EMAIL
=
"action_id_email"
const
val
ACTION_ID_WEBSITE
=
"action_id_website"
const
val
ACTION_ID_WEBSITE
=
"action_id_website"
const
val
ACTION_ID_CLEAN_JUNK
=
"action_id_clean_junk"
const
val
ACTION_ID_WEATHER
=
"action_id_weather"
const
val
ACTION_ID_APP_PROCESS
=
"action_id_app_process"
const
val
ACTION_ID_WHATSAPP
=
"action_id_whatsapp"
const
val
ACTION_ID_SCREEN_SHORT
=
"action_id_screen_short"
const
val
ACTION_ID_SIMILAR
=
"action_id_similar"
const
val
ACTION_ID_CONSTELLATION
=
"action_id_constellation"
}
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqrclear/fcm/notification/MyNotificationManager.kt
View file @
658fc74b
...
@@ -4,10 +4,17 @@ import android.content.Context
...
@@ -4,10 +4,17 @@ import android.content.Context
import
com.base.scanqrclear.BuildConfig
import
com.base.scanqrclear.BuildConfig
import
com.base.scanqrclear.MyApplication
import
com.base.scanqrclear.MyApplication
import
com.base.scanqrclear.bean.NotificationSendBean
import
com.base.scanqrclear.bean.NotificationSendBean
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_APP_PROCESS
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_CLEAN_JUNK
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_CONSTELLATION
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_EMAIL
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_EMAIL
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SCAN
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SCAN
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SCREEN_SHORT
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SIMILAR
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_TEXT
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_TEXT
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WEATHER
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WEBSITE
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WEBSITE
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WHATSAPP
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WIFI
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WIFI
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.POPUP_WHERE_ALARM
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.POPUP_WHERE_ALARM
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.POPUP_WHERE_BATTERY
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.POPUP_WHERE_BATTERY
...
@@ -47,6 +54,13 @@ object MyNotificationManager {
...
@@ -47,6 +54,13 @@ object MyNotificationManager {
ACTION_ID_TEXT
,
ACTION_ID_TEXT
,
ACTION_ID_EMAIL
,
ACTION_ID_EMAIL
,
ACTION_ID_WEBSITE
,
ACTION_ID_WEBSITE
,
ACTION_ID_CLEAN_JUNK
,
ACTION_ID_WEATHER
,
ACTION_ID_APP_PROCESS
,
ACTION_ID_WHATSAPP
,
ACTION_ID_SCREEN_SHORT
,
ACTION_ID_SIMILAR
,
ACTION_ID_CONSTELLATION
,
)
)
private
var
actionIdList
=
arrayListOf
<
String
>()
private
var
actionIdList
=
arrayListOf
<
String
>()
...
...
app/src/main/java/com/base/scanqrclear/fcm/notification/NotificationUiUtil.kt
View file @
658fc74b
...
@@ -13,12 +13,23 @@ import androidx.core.graphics.drawable.IconCompat
...
@@ -13,12 +13,23 @@ import androidx.core.graphics.drawable.IconCompat
import
com.base.scanqrclear.MyApplication
import
com.base.scanqrclear.MyApplication
import
com.base.scanqrclear.R
import
com.base.scanqrclear.R
import
com.base.scanqrclear.bean.NotificationSendBean
import
com.base.scanqrclear.bean.NotificationSendBean
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_APP_PROCESS
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_CLEAN_JUNK
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_CONSTELLATION
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_EMAIL
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_EMAIL
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SCAN
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SCAN
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SCREEN_SHORT
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_SIMILAR
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_TEXT
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_TEXT
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WEATHER
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WEBSITE
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WEBSITE
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WHATSAPP
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WIFI
import
com.base.scanqrclear.bean.NotificationSendBean.Companion.ACTION_ID_WIFI
import
com.base.scanqrclear.bean.WeatherBean
import
com.base.scanqrclear.luma.WeatherUtils
import
com.base.scanqrclear.ui.start.StartActivity
import
com.base.scanqrclear.ui.start.StartActivity
import
com.base.scanqrclear.utils.TimeUtils.formatATime
import
com.base.scanqrclear.utils.TimeUtils.isDayOrNight
import
kotlin.random.Random
import
kotlin.random.Random
/**
/**
...
@@ -104,6 +115,113 @@ object NotificationUiUtil {
...
@@ -104,6 +115,113 @@ object NotificationUiUtil {
sendBean
.
smallRemoteViews
=
smallRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
}
ACTION_ID_CLEAN_JUNK
->
{
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
clean_junk_pop
))
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_large
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
clean_junk_pop
))
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_image
,
R
.
mipmap
.
icon_junk_scan1
)
sendBean
.
bigRemoteViews
=
bigRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
ACTION_ID_APP_PROCESS
->
{
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
app_process_pop
))
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_large
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
app_process_pop
))
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_image
,
R
.
mipmap
.
icon_app_process_1
)
sendBean
.
bigRemoteViews
=
bigRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
ACTION_ID_WHATSAPP
->
{
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
whatsapp_pop
))
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_large
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
whatsapp_pop
))
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_image
,
R
.
mipmap
.
icon_whatsapp_1
)
sendBean
.
bigRemoteViews
=
bigRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
ACTION_ID_SCREEN_SHORT
->
{
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
screen_pop
))
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_large
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
screen_pop
))
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_image
,
R
.
mipmap
.
icon_screenshot_1
)
sendBean
.
bigRemoteViews
=
bigRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
ACTION_ID_SIMILAR
->
{
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
similar_pop
))
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_common_large
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_content
,
MyApplication
.
appContext
.
getString
(
R
.
string
.
similar_pop
))
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_image
,
R
.
mipmap
.
icon_similar
)
sendBean
.
bigRemoteViews
=
bigRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
ACTION_ID_CONSTELLATION
->
{
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_constellation_small
)
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_constellation_big
)
sendBean
.
bigRemoteViews
=
bigRemoteViews
sendBean
.
smallRemoteViews
=
smallRemoteViews
}
ACTION_ID_WEATHER
->
{
val
weatherBean
:
WeatherBean
=
WeatherUtils
.
getWeatherEntity
()
?:
return
if
(
weatherBean
.
list
.
isEmpty
())
return
val
subBean
=
weatherBean
.
list
[
0
]
val
smallRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_weather_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_city
,
weatherBean
.
city
)
val
min
=
subBean
.
tempMin
.
toInt
()
val
max
=
subBean
.
tempMax
.
toInt
()
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_now
,
Random
.
nextInt
(
min
,
max
).
toString
())
val
icon
=
when
(
WeatherUtils
.
getWeatherType
(
subBean
.
iconDay
.
toInt
()))
{
"Sunny day"
->
R
.
mipmap
.
d_qing
"Cloudy day"
->
R
.
mipmap
.
d_yin
"Rainy day"
->
R
.
mipmap
.
d_dayu
"Snowy day"
->
R
.
mipmap
.
d_xiaxue
"Greasy day"
->
R
.
mipmap
.
d_wumaishachengbao
"Unknown"
->
R
.
mipmap
.
d_qing
else
->
R
.
mipmap
.
d_qing
}
smallRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather
,
icon
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_range
,
"$min℃/$max℃"
)
val
bigRemoteViews
=
RemoteViews
(
MyApplication
.
appContext
.
packageName
,
R
.
layout
.
notification_weather_big
)
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather_11h
,
icon
)
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather_14h
,
icon
)
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather_17h
,
icon
)
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather_20h
,
icon
)
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather_23h
,
icon
)
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_weather
,
icon
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_11h
,
Random
.
nextInt
(
min
,
max
).
toString
())
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_14h
,
Random
.
nextInt
(
min
,
max
).
toString
())
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_17h
,
Random
.
nextInt
(
min
,
max
).
toString
())
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_20h
,
Random
.
nextInt
(
min
,
max
).
toString
())
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_23h
,
Random
.
nextInt
(
min
,
max
).
toString
())
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_wendu_now
,
Random
.
nextInt
(
min
,
max
).
toString
())
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_day_desc
,
if
(
isDayOrNight
())
subBean
.
textDay
else
subBean
.
textNight
)
bigRemoteViews
.
setTextViewText
(
R
.
id
.
tv_weather_info
,
"$min℃/$max℃ ${formatATime()}"
)
}
}
}
val
intent
=
Intent
(
sendBean
.
context
,
StartActivity
::
class
.
java
)
val
intent
=
Intent
(
sendBean
.
context
,
StartActivity
::
class
.
java
)
...
@@ -171,4 +289,6 @@ object NotificationUiUtil {
...
@@ -171,4 +289,6 @@ object NotificationUiUtil {
notificationManager
.
notify
(
sendBean
.
notificationId
,
builder
.
build
())
notificationManager
.
notify
(
sendBean
.
notificationId
,
builder
.
build
())
}
}
}
}
\ No newline at end of file
app/src/main/java/com/base/scanqrclear/utils/TimeUtils.kt
0 → 100644
View file @
658fc74b
package
com.base.scanqrclear.utils
import
android.annotation.SuppressLint
import
java.text.SimpleDateFormat
import
java.util.Calendar
object
TimeUtils
{
fun
isDayOrNight
():
Boolean
{
val
calendar
:
Calendar
=
Calendar
.
getInstance
()
val
hour
:
Int
=
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)
// 假设早上6点到晚上6点是白天
return
if
(
hour
in
6
..
17
)
{
// "现在是白天。"
true
}
else
{
// "现在是晚上。"
false
}
}
@SuppressLint
(
"SimpleDateFormat"
)
fun
formatATime
():
String
{
val
calendar
=
Calendar
.
getInstance
()
// 格式化时间为 "AM 9:50" 格式
val
sdf
=
SimpleDateFormat
(
"a hh:mm"
)
return
sdf
.
format
(
calendar
.
time
)
}
fun
isTimeBetweenEightAndTenPM
():
Boolean
{
val
now
=
Calendar
.
getInstance
()
val
hour
=
now
[
Calendar
.
HOUR_OF_DAY
]
// 获取当前小时数(24小时制)
// 检查当前时间是否在 8 点到 22 点之间
return
hour
in
8
..
21
}
fun
isTimeBetweenWan17toWan23
():
Boolean
{
val
calendar
=
Calendar
.
getInstance
()
val
currentHour
=
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)
// 获取当前小时数(24小时制)
val
isEvening
=
currentHour
in
17
..
22
// Kotlin中的in运算符用于判断范围
return
if
(
isEvening
)
{
// 当前时间是晚上17点到23点之间
true
}
else
{
// 当前时间不是晚上17点到23点之间
false
}
}
@SuppressLint
(
"SimpleDateFormat"
)
fun
Long
.
formatTimeH
():
String
{
val
dateFormat
=
SimpleDateFormat
(
"yyyy-M-d H"
)
return
dateFormat
.
format
(
this
)
}
}
\ No newline at end of file
app/src/main/res/drawable/bg_0571ed_25.xml
0 → 100644
View file @
658fc74b
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#0571ED"
/>
<corners
android:radius=
"25dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_ffffff_15.xml
0 → 100644
View file @
658fc74b
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"15dp"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/notification_common_large.xml
0 → 100644
View file @
658fc74b
<?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=
"200dp"
android:background=
"@drawable/white_background"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:layout_marginTop=
"24dp"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/iv_image"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_smart"
/>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:text=
"@string/notification_clean_junk"
android:textColor=
"@color/color_181b1f"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:gravity=
"center"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginEnd=
"16dp"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:gravity=
"center"
android:background=
"@drawable/gradient"
android:text=
"@string/clean"
android:textColor=
"@color/white"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"33dp"
android:layout_alignParentStart=
"true"
android:src=
"@mipmap/img_guangbiao_tuisong"
/>
</RelativeLayout>
</LinearLayout>
<TextView
android:id=
"@+id/tv_mark"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:textSize=
"16sp"
android:textColor=
"@color/colorPrimary"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/notification_common_small.xml
0 → 100644
View file @
658fc74b
<?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=
"60dp"
android:gravity=
"center"
android:paddingTop=
"4dp"
android:paddingBottom=
"4dp"
android:paddingStart=
"8dp"
android:paddingEnd=
"12dp"
android:orientation=
"horizontal"
>
<LinearLayout
android:id=
"@+id/ll_content"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:layout_marginEnd=
"10dp"
android:gravity=
"center_vertical"
android:text=
"@string/notification_clean_junk"
android:textColor=
"@color/color_181b1f"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_btn"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"6dp"
android:paddingBottom=
"6dp"
android:paddingStart=
"14dp"
android:paddingEnd=
"14dp"
android:text=
"@string/clean"
android:textColor=
"@color/white"
android:textSize=
"12sp"
android:textStyle=
"bold"
android:background=
"@drawable/gradient"
/>
</LinearLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"12dp"
android:layout_alignParentEnd=
"true"
android:src=
"@mipmap/img_guangbiao_tuisong"
/>
<TextView
android:id=
"@+id/tv_mark"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
""
android:textSize=
"16sp"
android:textColor=
"@color/colorPrimary"
/>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/notification_constellation_big.xml
0 → 100644
View file @
658fc74b
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"52dp"
android:layout_height=
"52dp"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"20dp"
android:src=
"@mipmap/d_xingzuo"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginHorizontal=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_tittle_1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Check out your luck today!"
android:textColor=
"@color/black"
android:textSize=
"14sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
<TextView
android:id=
"@+id/tv_tittle_2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:textColor=
"#898989"
android:textSize=
"12sp"
android:visibility=
"gone"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/tv_btn"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginHorizontal=
"25dp"
android:layout_marginVertical=
"16dp"
android:background=
"@drawable/bg_0571ed_25"
android:gravity=
"center"
android:text=
"Clean"
android:textColor=
"@color/white"
android:textSize=
"15sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/notification_constellation_small.xml
0 → 100644
View file @
658fc74b
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:background=
"@drawable/bg_ffffff_15"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"15dp"
android:src=
"@mipmap/x_xingzuo"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginStart=
"7dp"
android:layout_marginEnd=
"40dp"
android:layout_weight=
"1"
android:textColor=
"@color/black"
android:textSize=
"14sp"
android:text=
"Check out your luck today!"
tools:ignore=
"HardcodedText"
/>
<TextView
android:id=
"@+id/tv_btn"
android:layout_width=
"69dp"
android:layout_height=
"34dp"
android:layout_gravity=
"center_vertical"
android:layout_marginEnd=
"13dp"
android:background=
"@drawable/bg_0571ed_18"
android:gravity=
"center"
android:text=
"View"
android:textColor=
"@color/white"
android:textSize=
"15sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/notification_weather_big.xml
0 → 100644
View file @
658fc74b
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"320dp"
android:background=
"@drawable/bg_ffffff_15"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"8dp"
android:background=
"@mipmap/d_tiantibg"
>
<RelativeLayout
android:id=
"@+id/ll"
android:layout_width=
"match_parent"
android:layout_height=
"140dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:layout_marginStart=
"12dp"
android:layout_marginTop=
"10dp"
android:textColor=
"@color/white"
tools:ignore=
"RelativeOverlap"
tools:text=
"Cheney"
/>
<TextView
android:id=
"@+id/tv_wendu_now"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentStart=
"true"
android:layout_centerVertical=
"true"
android:layout_marginStart=
"20dp"
android:textColor=
"@color/white"
android:textSize=
"40sp"
tools:text=
"20"
/>
<TextView
android:id=
"@+id/tv_c"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignTop=
"@id/tv_wendu_now"
android:layout_toEndOf=
"@id/tv_wendu_now"
android:text=
"℃"
android:textColor=
"@color/white"
android:textSize=
"18sp"
tools:ignore=
"HardcodedText"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignTop=
"@id/tv_wendu_now"
android:layout_alignBottom=
"@id/tv_wendu_now"
android:layout_marginStart=
"14dp"
android:layout_toEndOf=
"@id/tv_c"
android:orientation=
"vertical"
tools:ignore=
"RelativeOverlap"
>
<TextView
android:id=
"@+id/tv_day_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/white"
android:textSize=
"16sp"
tools:text=
"Clear"
/>
<TextView
android:id=
"@+id/tv_weather_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"9.5dp"
android:textColor=
"@color/white"
tools:text=
"19℃/36℃ AM 9:50"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_weather"
android:layout_width=
"57dp"
android:layout_height=
"57dp"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"8.5dp"
tools:ignore=
"ContentDescription"
tools:src=
"@mipmap/d_qing"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/v"
android:layout_width=
"match_parent"
android:layout_height=
"0.5dp"
android:layout_below=
"@id/ll"
android:layout_marginHorizontal=
"10dp"
android:background=
"@color/white"
android:importantForAccessibility=
"no"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/v"
android:orientation=
"horizontal"
>
<!--11h -->
<LinearLayout
android:id=
"@+id/ll_11h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginHorizontal=
"15dp"
android:layout_toStartOf=
"@id/ll_14h"
android:orientation=
"vertical"
tools:ignore=
"RelativeOverlap"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"11H"
android:textColor=
"@color/white"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_weather_11h"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:src=
"@mipmap/x_qing"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_wendu_11h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"13sp"
android:textColor=
"@color/white"
android:textSize=
"17sp"
tools:text=
"29°"
/>
</LinearLayout>
<!--14h -->
<LinearLayout
android:id=
"@+id/ll_14h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginHorizontal=
"15dp"
android:layout_toStartOf=
"@id/ll_17h"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"14H"
android:textColor=
"@color/white"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_weather_14h"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:src=
"@mipmap/x_qing"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_wendu_14h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"13sp"
android:textColor=
"@color/white"
android:textSize=
"17sp"
tools:text=
"29°"
/>
</LinearLayout>
<!--17h -->
<LinearLayout
android:id=
"@+id/ll_17h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_marginHorizontal=
"15dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"17H"
android:textColor=
"@color/white"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_weather_17h"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:src=
"@mipmap/x_qing"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_wendu_17h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"13sp"
android:textColor=
"@color/white"
android:textSize=
"17sp"
tools:text=
"29°"
/>
</LinearLayout>
<!--20h -->
<LinearLayout
android:id=
"@+id/ll_20h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginHorizontal=
"15dp"
android:layout_toEndOf=
"@id/ll_17h"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"20H"
android:textColor=
"@color/white"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_weather_20h"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:src=
"@mipmap/x_qing"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_wendu_20h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"13sp"
android:textColor=
"@color/white"
android:textSize=
"17sp"
tools:text=
"29°"
/>
</LinearLayout>
<!--23h -->
<LinearLayout
android:id=
"@+id/ll_23h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginHorizontal=
"15dp"
android:layout_toEndOf=
"@id/ll_20h"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"23H"
android:textColor=
"@color/white"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_weather_23h"
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"15dp"
android:src=
"@mipmap/x_qing"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_wendu_23h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"13sp"
android:textColor=
"@color/white"
android:textSize=
"17sp"
tools:text=
"29°"
/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/notification_weather_small.xml
0 → 100644
View file @
658fc74b
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:background=
"@drawable/bg_ffffff_15"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"5dp"
android:background=
"@mipmap/x_tianqibg"
tools:ignore=
"ContentDescription"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_wendu_now"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_gravity=
"center"
android:layout_marginStart=
"20dp"
android:textColor=
"@color/white"
android:textSize=
"30sp"
tools:text=
"20"
/>
<TextView
android:textSize=
"14sp"
android:id=
"@+id/tv_c"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignTop=
"@id/tv_wendu_now"
android:layout_toEndOf=
"@id/tv_wendu_now"
android:text=
"℃"
android:textColor=
"@color/white"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:id=
"@+id/iv_weather"
android:layout_width=
"36dp"
android:layout_height=
"36dp"
android:layout_alignTop=
"@id/tv_wendu_now"
android:layout_alignBottom=
"@id/tv_wendu_now"
android:layout_toEndOf=
"@id/tv_c"
android:src=
"@mipmap/d_qing"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"22dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:src=
"@mipmap/tishiicon"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_city"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"4dp"
android:textColor=
"@color/white"
android:textSize=
"13sp"
tools:text=
"Cheney"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_wendu_range"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/white"
android:textSize=
"15sp"
tools:text=
"19℃/36℃"
/>
</LinearLayout>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/d_xingzuo.png
0 → 100644
View file @
658fc74b
52.1 KB
app/src/main/res/mipmap-xxhdpi/icon_smart.png
0 → 100644
View file @
658fc74b
22.7 KB
app/src/main/res/mipmap-xxhdpi/tishiicon.png
0 → 100644
View file @
658fc74b
2.09 KB
app/src/main/res/mipmap-xxhdpi/x_tianqibg.png
0 → 100644
View file @
658fc74b
154 KB
app/src/main/res/mipmap-xxhdpi/x_xingzuo.png
0 → 100644
View file @
658fc74b
21.3 KB
app/src/main/res/mipmap-xxxhdpi/d_tiantibg.png
0 → 100644
View file @
658fc74b
901 KB
app/src/main/res/values/strings.xml
View file @
658fc74b
...
@@ -281,5 +281,10 @@
...
@@ -281,5 +281,10 @@
<string
name=
"device_ready"
>
Device Ready
</string>
<string
name=
"device_ready"
>
Device Ready
</string>
<string
name=
"loading_point"
>
loading...
</string>
<string
name=
"loading_point"
>
loading...
</string>
<string
name=
"files"
>
Files
</string>
<string
name=
"files"
>
Files
</string>
<string
name=
"clean_junk_pop"
>
Clean out junk files to free up space on your phone!
</string>
<string
name=
"app_process_pop"
>
app process management for smooth performance.
</string>
<string
name=
"whatsapp_pop"
>
Clear whatsapp file to free up space!
</string>
<string
name=
"screen_pop"
>
Clear screenshot clutter to free up space!
</string>
<string
name=
"similar_pop"
>
Clear similar file to free up space!
</string>
</resources>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment