@@ -4,6 +4,12 @@ import org.json.JSONObject
44
55@Suppress(" unused" , " LocalVariableName" , " KotlinConstantConditions" , " FunctionName" )
66object IslandApi {
7+ /* *
8+ * 小米超级岛展开配置
9+ * @param BigIslandData 大岛数据
10+ * @param SmallIslandData 小岛数据
11+ * @param islandPriority 优先级
12+ * @param islandProperty 优先级*/
713 fun islandData (
814 BigIslandData : JSONObject ,
915 SmallIslandData : JSONObject ,
@@ -18,6 +24,23 @@ object IslandApi {
1824 return json
1925 }
2026
27+
28+ /* *
29+ * 小米超级岛初始化配置
30+ * @param bigIslandArea 岛展开区域
31+ * @param business 业务
32+ * @param dismissIsland 是否可关闭
33+ * @param expandedTime 展开时间
34+ * @param highlightColor 高亮颜色
35+ * @param islandOrder 是否展开
36+ * @param islandPriority 优先级
37+ * @param islandProperty 优先级
38+ * @param islandTimeout 超时时间
39+ * @param maxSize 是否最大尺寸
40+ * @param needCloseAnimation 是否需要关闭动画
41+ * @param shareData 分享数据
42+ * @param smallIslandArea 小岛展开区域
43+ * */
2144 fun IslandTemplate (
2245 bigIslandArea : JSONObject ? =null,
2346 business : String? =null,
@@ -60,16 +83,25 @@ object IslandApi {
6083 return json
6184 }
6285
86+ /* *
87+ * 小米超级岛未展开态区域
88+ * @param combinePicInfo 图片和进度信息
89+ * @param picInfo 图片信息*/
6390 fun SmallIslandArea (
64- combinePicInfo : JSONObject ? = null,
65- picInfo : JSONObject ,
91+ combinePicInfo : JSONObject ? = null,
92+ picInfo : JSONObject ? = null ,
6693 ): JSONObject {
6794 val json = JSONObject ()
6895 if (combinePicInfo != null ) { json.put(" combinePicInfo" , combinePicInfo) }
69- json.put(" picInfo" ,picInfo)
96+ picInfo. let { json.put(" picInfo" , it) }
7097 return json
7198 }
7299
100+ /* *
101+ * 未测试
102+ * 小米超级岛未展开态Data
103+ * @param pic 图片
104+ * */
73105 fun SmallIslandData (
74106 pic : String ,
75107 ): JSONObject {
@@ -78,7 +110,15 @@ object IslandApi {
78110 return json
79111 }
80112
81- fun timerInfo (
113+
114+ /* *
115+ * 小米超级岛时间信息
116+ * @param timerType 时间类型
117+ * @param timerTotal 总时间
118+ * @param timerWhen 剩余时间
119+ * @param timerSystemCurrent 系统时间
120+ * */
121+ fun TimerInfo (
82122 timerType : Int = -1,
83123 timerTotal : Long? = null,
84124 timerWhen : Long? = null,
@@ -99,7 +139,15 @@ object IslandApi {
99139 return timerInfo
100140 }
101141
102-
142+ /* *
143+ * 小米超级岛文字信息
144+ * @param content 内容
145+ * @param frontTitle 前置标题
146+ * @param showHighlightColor 是否显示高亮颜色
147+ * @param turnAnim 动画开关
148+ * @param isTitleDigit 是否数字
149+ * @param title 标题
150+ * */
103151 fun TextInfo (
104152 content : String? = null,
105153 frontTitle : String? = null,
@@ -119,6 +167,15 @@ object IslandApi {
119167
120168 }
121169
170+ /* *
171+ * 该接口未测试
172+ * 小米超级岛固定宽度信息
173+ * @param content 内容
174+ * @param digit 数字
175+ * @param timeInfo 时间信息
176+ * @param showHighlightColor 是否显示高亮颜色
177+ * @param turnAnim 动画开关
178+ * */
122179 fun SameWidthDigitInfo (
123180 content : String ,
124181 digit : String ,
@@ -134,7 +191,15 @@ object IslandApi {
134191 json.put(" turnAnim" ,turnAnim)
135192 return json
136193 }
137-
194+ /* *
195+ * 该接口未测试
196+ * 小米超级岛分享信息
197+ * @param content 内容
198+ * @param title 标题
199+ * @param pic 图片
200+ * @param shareContent 分享内容
201+ * @param sharePic 分享图片
202+ * */
138203 fun ShareData (
139204 content : String ,
140205 title : String ,
@@ -151,6 +216,11 @@ object IslandApi {
151216 return json
152217 }
153218
219+ /* *
220+ * 小米超级岛进度和文字信息
221+ * @param progressInfo 进度信息
222+ * @param textInfo 文字信息
223+ * */
154224 fun ProgressTextInfo (
155225 progressInfo : JSONObject ,
156226 textInfo : JSONObject ,
@@ -160,7 +230,17 @@ object IslandApi {
160230 json.put(" textInfo" ,textInfo)
161231 return json
162232 }
163-
233+ /* *
234+ * 只测试了pic图片
235+ * 小米超级岛图片信息
236+ * @param autoplay 是否自动播放
237+ * @param contentDescription 内容描述
238+ * @param effectColor 效果颜色
239+ * @param effectSrc 效果图片
240+ * @param loop 是否循环
241+ * @param number 未知
242+ * @param pic 图片
243+ * */
164244 fun PicInfo (
165245 autoplay : Boolean = false,
166246 contentDescription : String? = null,
@@ -183,6 +263,14 @@ object IslandApi {
183263 return json
184264 }
185265
266+ /* *
267+ * 小米超级岛进度信息
268+ * @param colorReach 进度颜色
269+ * @param colorUnReach 未完成进度颜色
270+ * @param isCCW 是否顺时针
271+ * @param progress 进度
272+ * */
273+
186274 fun ProgressInfo (
187275 colorReach : String ,
188276 colorUnReach : String ,
@@ -197,6 +285,14 @@ object IslandApi {
197285 return json
198286 }
199287
288+
289+ /* *
290+ * 该接口未测试
291+ * 小米超级岛固定宽度信息
292+ * @param content 内容
293+ * @param digit 数字
294+ * @param showHighlightColor 是否显示高亮颜色
295+ * @param turnAnim 动画开关*/
200296 fun FixedWidthDigitInfo (
201297 content : String ,
202298 digit : String ,
@@ -211,6 +307,13 @@ object IslandApi {
211307 return json
212308 }
213309
310+
311+ /* *
312+ * 小米超级岛图片进度信息
313+ * @param picInfo 图片信息
314+ * @param progressInfo 进度信息
315+ * @param smallPicInfo 小图片信息
316+ * */
214317 fun CombinePicInfo (
215318 picInfo : JSONObject ,
216319 progressInfo : JSONObject ,
@@ -244,7 +347,17 @@ object IslandApi {
244347 return json
245348 }
246349
247- fun BigIslandAreaToJson (
350+ /* *
351+ * 小米超级岛展开配置
352+ * @param fixedWidthDigitInfo 固定宽度信息
353+ * @param imageTextInfoLeft 左边图片和文字信息
354+ * @param imageTextInfoRight 右边图片和文字信息
355+ * @param picInfo 图片信息
356+ * @param progressTextInfo 进度和文字信息
357+ * @param sameWidthDigitInfo 同宽度信息
358+ * @param textInfo 文字信息
359+ * */
360+ fun BigIslandArea (
248361 fixedWidthDigitInfo : JSONObject ? = null,
249362 imageTextInfoLeft : JSONObject ? = null,
250363 imageTextInfoRight : JSONObject ? = null,
0 commit comments