├── .gitignore ├── .using ├── Createlite@Tujian@SnakerBar.lua ├── LICENSE ├── README.md ├── guanyu ├── main.lua ├── mluafloatingbutton.lua └── res │ ├── back.png │ ├── open.png │ └── photo.png ├── guidang └── main.lua ├── icon.png ├── imports.lua ├── init.lua ├── layout.aly ├── libs ├── RomUtil.dex ├── Tujian.dex └── oat │ └── arm │ ├── RomUtil.odex │ ├── RomUtil.vdex │ ├── Tujian.odex │ └── Tujian.vdex ├── main.lua ├── muk.lua ├── res ├── chahua.png ├── compass.png ├── hei.png ├── right.png ├── true.png └── zahui.png ├── welcome.png ├── welcome └── main.lua └── zahui ├── main.lua └── res ├── archive.png ├── bing.png ├── chahua.png ├── compass.png ├── desktop.png ├── icon.png ├── info.png ├── more.png ├── qr.png ├── right.png ├── setting.png ├── text.png ├── upload.png └── zahui.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Lua sources 2 | luac.out 3 | 4 | # luarocks build files 5 | *.src.rock 6 | *.zip 7 | *.tar.gz 8 | 9 | # Object files 10 | *.o 11 | *.os 12 | *.ko 13 | *.obj 14 | *.elf 15 | 16 | # Precompiled Headers 17 | *.gch 18 | *.pch 19 | 20 | # Libraries 21 | *.lib 22 | *.a 23 | *.la 24 | *.lo 25 | *.def 26 | *.exp 27 | 28 | # Shared objects (inc. Windows DLLs) 29 | *.dll 30 | *.so 31 | *.so.* 32 | *.dylib 33 | 34 | # Executables 35 | *.exe 36 | *.out 37 | *.app 38 | *.i*86 39 | *.x86_64 40 | *.hex 41 | 42 | -------------------------------------------------------------------------------- /.using: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/.using -------------------------------------------------------------------------------- /Createlite@Tujian@SnakerBar.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Copyright [2018-2019] [Tujian X @Createlite] 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ]] 16 | 17 | import "android.animation.Animator" 18 | --支持自定义文字,按钮动作,按钮文字, 19 | --事实上,完全自定义 20 | --支持滑动删除,支持面向对象式调用 21 | --触碰时不会关闭,可无期限查看 22 | --近乎原生体验 23 | --使用方法: 24 | -- 1.导入模块 import "Createlite@Tujian@SnackerBar" 25 | -- 2.调用:SnackerBar.build() 26 | -- :msg("提示文字"):actionText("按钮文字") 27 | -- :action(按钮点击事件):show() 28 | 29 | --[[ 30 | 以上是原作者的声明 31 | 我已经将Snakebar改为了函数,如果不需要按钮文字/事件的话,调用方法如下: 32 | SnakeBar("内容") 33 | 当然,原作者的调用方式仍然支持 34 | 35 | 单独写个函数: 36 | function Snakebar(内容) 37 | SnackerBar.build() 38 | :msg(内容):actionText("") 39 | :action():show() 40 | end 41 | ]] 42 | 43 | 44 | SnackerBar={shouldDismiss=true} 45 | import "android.animation.ValueAnimator" 46 | local w=activity.width 47 | import "android.view.animation.AccelerateDecelerateInterpolator" 48 | 49 | local layout={ 50 | LinearLayout, 51 | Gravity="bottom", 52 | { 53 | LinearLayout, 54 | layout_height=-2, 55 | layout_width=-1, 56 | Gravity="center", 57 | BackgroundColor=0xff333333, 58 | { 59 | TextView, 60 | textColor=0xffffffff, 61 | layout_weight=.8, 62 | paddingLeft="10dp", 63 | paddingTop="5dp", 64 | paddingBottom="5dp", 65 | layout_width=0, 66 | }, 67 | { 68 | Button, 69 | layout_height=-2, 70 | style="?android:attr/buttonBarButtonStyle", 71 | text="DONE", 72 | } 73 | } 74 | } 75 | local function addView(view) 76 | local mLayoutParams=ViewGroup.LayoutParams 77 | (-1,-1) 78 | activity.Window.DecorView.addView(view,mLayoutParams) 79 | end 80 | 81 | local function removeView(view) 82 | activity.Window.DecorView.removeView(view) 83 | end 84 | --设置提示文字 85 | function SnackerBar:msg(textMsg) 86 | self.textView.text=textMsg 87 | return self 88 | end 89 | --设置按钮文字 90 | function SnackerBar:actionText(textAction) 91 | self.actionView.text=textAction 92 | return self 93 | end 94 | --设置按钮动作 95 | function SnackerBar:action(func) 96 | self.actionView.onClick= 97 | function() 98 | func() 99 | self:dismiss() 100 | end 101 | return self 102 | end 103 | 104 | --显示 105 | function SnackerBar:show() 106 | local view=self.view 107 | addView(view) 108 | view.translationY=300 109 | view.animate().translationY(0) 110 | .setInterpolator(AccelerateDecelerateInterpolator()) 111 | .setDuration(400).start() 112 | indefiniteDismiss(self) 113 | end 114 | 115 | function indefiniteDismiss(snackerBar) 116 | task(2000,function() 117 | if snackerBar.shouldDismiss==true then 118 | snackerBar:dismiss() 119 | else 120 | indefiniteDismiss(snackerBar) 121 | end 122 | end) 123 | end 124 | 125 | --关闭 126 | function SnackerBar:dismiss() 127 | local view=self.view 128 | view.animate().translationY(300) 129 | .setDuration(400) 130 | .setListener(Animator.AnimatorListener{ 131 | onAnimationEnd=function() 132 | removeView(view) 133 | end 134 | }).start() 135 | end 136 | 137 | SnackerBar.__index=SnackerBar 138 | --构建者模式 139 | function SnackerBar.build() 140 | local mSnackerBar={} 141 | setmetatable(mSnackerBar,SnackerBar) 142 | mSnackerBar.view=loadlayout(layout) 143 | mSnackerBar.bckView=mSnackerBar.view 144 | .getChildAt(0) 145 | mSnackerBar.textView=mSnackerBar.bckView 146 | .getChildAt(0) 147 | mSnackerBar.actionView=mSnackerBar.bckView 148 | .getChildAt(1) 149 | local function animate(v,tx,dura) 150 | ValueAnimator().ofFloat({v.translationX,tx}).setDuration(dura) 151 | .addUpdateListener( ValueAnimator.AnimatorUpdateListener 152 | { 153 | onAnimationUpdate=function( p1) 154 | local f=p1.animatedValue 155 | v.translationX=f 156 | v.alpha=1-math.abs(v.translationX)/w 157 | end 158 | }).addListener(ValueAnimator.AnimatorListener{ 159 | onAnimationEnd=function() 160 | if math.abs(tx)>=w then 161 | removeView(mSnackerBar.view) 162 | end 163 | end 164 | }).start() 165 | end 166 | local frx,p,v,fx=0,0,0,0 167 | mSnackerBar.bckView.setOnTouchListener(View.OnTouchListener{ 168 | onTouch=function(view,event) 169 | if event.Action==event.ACTION_DOWN then 170 | mSnackerBar.shouldDismiss=false 171 | frx=event.x 172 | fx=event.x 173 | elseif event.Action==event.ACTION_MOVE then 174 | --高精度手指速度测量:) 175 | if math.abs(event.rawX-frx)>=2 then 176 | v=math.abs((frx-event.rawX)/(os.clock()-p)/1000) 177 | end 178 | p=os.clock() 179 | frx=event.rawX 180 | view.translationX=frx-fx 181 | view.alpha=1-math.abs(view.translationX)/w 182 | elseif event.Action==event.ACTION_UP then 183 | mSnackerBar.shouldDismiss=true 184 | local tx=view.translationX 185 | if tx>=w/5 then 186 | animate(view,w,(w-tx)/v) 187 | elseif tx>0 and tx19时生效 55 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 56 | ]] 57 | 58 | 59 | --完全沉浸,SDK>21 60 | if ThemeColor == "#FFFFFFFF" or ThemeColor == "#ffffffff" or ThemeColor==nil then--防止全白 61 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setStatusBarColor(转0x("#FF757575")); 62 | else 63 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setStatusBarColor(转0x(ThemeColor)); 64 | end 65 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setNavigationBarColor(转0x(ThemeColor)); 66 | 67 | 68 | 状态栏高度=activity.getResources().getDimensionPixelSize(luajava.bindClass("com.android.internal.R$dimen")().status_bar_height) 69 | 70 | --布局表 71 | layout={ 72 | --页面布局 73 | LinearLayout; 74 | layout_height="-1"; 75 | layout_width="-1"; 76 | id="_root"; 77 | orientation="vertical"; 78 | { 79 | RelativeLayout;--RelativeLayout中 80 | layout_height="-1"; 81 | layout_width="-1"; 82 | background=w; 83 | { 84 | LinearLayout; 85 | layout_height="-1"; 86 | layout_width="-1"; 87 | orientation="vertical"; 88 | { 89 | ObservableScrollView; 90 | layout_width="-1"; 91 | layout_height="-1"; 92 | id="obs_1"; 93 | overScrollMode=2; 94 | { 95 | LinearLayout; 96 | layout_height="-1"; 97 | layout_width="-1"; 98 | orientation="vertical"; 99 | --paddingTop=dp2px(200)+状态栏高度;--抵消顶部遮盖部分高度 100 | { 101 | LinearLayout; 102 | layout_height="200dp"; 103 | layout_width="-1"; 104 | background=ThemeColor; 105 | { 106 | ImageView; 107 | layout_height="-1"; 108 | layout_width="-1"; 109 | src="guanyu/res/photo.png"; 110 | scaleType="centerCrop"; 111 | id="pho_top"; 112 | ColorFilter=ThemeColor; 113 | }; 114 | }; 115 | { 116 | LinearLayout; 117 | layout_height="-1"; 118 | layout_width="-1"; 119 | orientation="vertical"; 120 | padding="7dp"; 121 | id="cv1_lay"; 122 | { 123 | CardView; 124 | CardElevation="0dp"; 125 | CardBackgroundColor="#FFE0E0E0"; 126 | Radius="8dp"; 127 | layout_width="-1"; 128 | layout_height="-2"; 129 | layout_margin="5dp"; 130 | { 131 | CardView; 132 | CardElevation="0dp"; 133 | CardBackgroundColor=w; 134 | Radius=dp2px(8)-2; 135 | layout_margin="2px"; 136 | layout_width="-1"; 137 | layout_height="-1"; 138 | { 139 | LinearLayout; 140 | layout_width="-1"; 141 | layout_height="-1"; 142 | orientation="vertical"; 143 | padding="7dp"; 144 | { 145 | TextView; 146 | text=" 概述"; 147 | textColor=b; 148 | textSize="16sp"; 149 | id="概述"; 150 | layout_marginTop="5dp"; 151 | gravity="center|left"; 152 | -- Typeface=字体("product-Bold"); 153 | }; 154 | { 155 | TextView; 156 | text=[[ 「无人为孤岛,一图一世界」 157 | 158 | Tujian 是我在经历数次找壁纸无果后,与几个朋友共同完成的一款精选图片壁纸软件,每日两张,两个分类,两种风味。 159 | 160 | 虽然每一天选出的图片至多只有三张,但是全部是投稿者/维护者们的精挑细选。 161 | 162 | 虽然小众,希望大众。希望你能在享受图片的同时,将 Tujian 也推荐给你的好友,一千个人眼中一千个哈姆雷特,让图片更有内涵。 163 | 164 | 本应用开发过程中,感谢 Tujian开发组 各位的支持!]]; 165 | textColor=b; 166 | textSize="14sp"; 167 | gravity="center|left"; 168 | id="概述内容"; 169 | layout_marginBottom="5dp"; 170 | --Typeface=字体("product"); 171 | layout_marginTop="12dp"; 172 | }; 173 | }; 174 | }; 175 | }; 176 | }; 177 | 178 | { 179 | LinearLayout; 180 | layout_height="-1"; 181 | layout_width="-1"; 182 | orientation="vertical"; 183 | padding="7dp"; 184 | id="cv10_lay"; 185 | layout_marginTop="5dp"; 186 | { 187 | CardView; 188 | CardElevation="0dp"; 189 | CardBackgroundColor="#FFE0E0E0"; 190 | Radius="8dp"; 191 | layout_width="-1"; 192 | layout_height="-2"; 193 | layout_margin="5dp"; 194 | { 195 | CardView; 196 | CardElevation="0dp"; 197 | CardBackgroundColor=w; 198 | Radius=dp2px(8)-2; 199 | layout_margin="2px"; 200 | layout_width="-1"; 201 | layout_height="-1"; 202 | { 203 | LinearLayout; 204 | layout_width="-1"; 205 | layout_height="-1"; 206 | orientation="vertical"; 207 | padding="7dp"; 208 | { 209 | TextView; 210 | text=" 版权声明"; 211 | textColor=b; 212 | textSize="16sp"; 213 | id="版权"; 214 | layout_marginTop="5dp"; 215 | gravity="center|left"; 216 | -- Typeface=字体("product-Bold"); 217 | }; 218 | { 219 | TextView; 220 | text=[[ Tujian 所选用的图片来自于 Unsplash、Pixiv、Cookapk 等社区、网站及论坛,且并非用于商业行为。 221 | 222 | 若您认为我们侵犯了您的合法知识产权,请发送邮件至 Chimon@Chimon.me,我们会第一时间配合处理。]]; 223 | textColor=b; 224 | textSize="14sp"; 225 | gravity="center|left"; 226 | id="版权内容"; 227 | --Typeface=字体("product"); 228 | layout_marginTop="12dp"; 229 | layout_marginBottom="5dp"; 230 | }; 231 | }; 232 | }; 233 | }; 234 | }; 235 | 236 | { 237 | LinearLayout; 238 | layout_height="-1"; 239 | layout_width="-1"; 240 | orientation="vertical"; 241 | padding="7dp"; 242 | id="cv11_lay"; 243 | { 244 | CardView; 245 | CardElevation="0dp"; 246 | CardBackgroundColor="#FFE0E0E0"; 247 | Radius="8dp"; 248 | layout_width="-1"; 249 | layout_height="-2"; 250 | layout_margin="5dp"; 251 | { 252 | CardView; 253 | CardElevation="0dp"; 254 | CardBackgroundColor=w; 255 | Radius=dp2px(8)-2; 256 | layout_margin="2px"; 257 | layout_width="-1"; 258 | layout_height="-1"; 259 | { 260 | LinearLayout; 261 | layout_width="-1"; 262 | layout_height="-1"; 263 | orientation="vertical"; 264 | padding="7dp"; 265 | { 266 | TextView; 267 | text=" 查看官网"; 268 | textColor=b; 269 | textSize="16sp"; 270 | id="官网"; 271 | layout_marginTop="5dp"; 272 | gravity="center|left"; 273 | -- Typeface=字体("product-Bold"); 274 | }; 275 | { 276 | TextView; 277 | text=[[ 点按了解更多信息]]; 278 | textColor=b; 279 | textSize="14sp"; 280 | gravity="center|left"; 281 | id="官网内容"; 282 | layout_marginBottom="5dp"; 283 | --Typeface=字体("product"); 284 | layout_marginTop="12dp"; 285 | }; 286 | }; 287 | }; 288 | }; 289 | }; 290 | 291 | { 292 | LinearLayout; 293 | layout_height="-1"; 294 | layout_width="-1"; 295 | orientation="vertical"; 296 | padding="7dp"; 297 | id="cv12_lay"; 298 | { 299 | CardView; 300 | CardElevation="0dp"; 301 | CardBackgroundColor="#FFE0E0E0"; 302 | Radius="8dp"; 303 | layout_width="-1"; 304 | layout_height="-2"; 305 | layout_margin="5dp"; 306 | { 307 | CardView; 308 | CardElevation="0dp"; 309 | CardBackgroundColor=w; 310 | Radius=dp2px(8)-2; 311 | layout_margin="2px"; 312 | layout_width="-1"; 313 | layout_height="-1"; 314 | { 315 | LinearLayout; 316 | layout_width="-1"; 317 | layout_height="-1"; 318 | orientation="vertical"; 319 | padding="7dp"; 320 | { 321 | TextView; 322 | text=" 捐赠我们"; 323 | textColor=b; 324 | textSize="16sp"; 325 | id="捐赠"; 326 | layout_marginTop="5dp"; 327 | gravity="center|left"; 328 | -- Typeface=字体("product-Bold"); 329 | }; 330 | { 331 | TextView; 332 | text=[[ 这会使 Tujian 项目 继续发展]]; 333 | textColor=b; 334 | textSize="14sp"; 335 | gravity="center|left"; 336 | id="捐赠内容"; 337 | --Typeface=字体("product"); 338 | layout_marginTop="12dp"; 339 | layout_marginBottom="5dp"; 340 | }; 341 | }; 342 | }; 343 | }; 344 | }; 345 | 346 | { 347 | LinearLayout; 348 | layout_height="-1"; 349 | layout_width="-1"; 350 | orientation="vertical"; 351 | padding="7dp"; 352 | id="cv3_lay"; 353 | { 354 | CardView; 355 | CardElevation="0dp"; 356 | CardBackgroundColor="#FFE0E0E0"; 357 | Radius="8dp"; 358 | layout_width="-1"; 359 | layout_height="-2"; 360 | layout_margin="5dp"; 361 | { 362 | CardView; 363 | CardElevation="0dp"; 364 | CardBackgroundColor=w; 365 | Radius=dp2px(8)-2; 366 | layout_margin="2px"; 367 | layout_width="-1"; 368 | layout_height="-1"; 369 | { 370 | LinearLayout; 371 | layout_width="-1"; 372 | layout_height="-1"; 373 | orientation="vertical"; 374 | padding="7dp"; 375 | { 376 | TextView; 377 | text=" 加入 QQ 群组"; 378 | textColor=b; 379 | textSize="16sp"; 380 | id="QQ群"; 381 | layout_marginTop="5dp"; 382 | gravity="center|left"; 383 | -- Typeface=字体("product-Bold"); 384 | }; 385 | { 386 | TextView; 387 | text=[[ 点按以加入 QQ 群组]]; 388 | textColor=b; 389 | textSize="14sp"; 390 | gravity="center|left"; 391 | id="QQ群内容"; 392 | layout_marginBottom="5dp"; 393 | --Typeface=字体("product"); 394 | layout_marginTop="12dp"; 395 | }; 396 | }; 397 | }; 398 | }; 399 | }; 400 | 401 | { 402 | LinearLayout; 403 | layout_height="-1"; 404 | layout_width="-1"; 405 | orientation="vertical"; 406 | padding="7dp"; 407 | id="cv4_lay"; 408 | { 409 | CardView; 410 | CardElevation="0dp"; 411 | CardBackgroundColor="#FFE0E0E0"; 412 | Radius="8dp"; 413 | layout_width="-1"; 414 | layout_height="-2"; 415 | layout_margin="5dp"; 416 | { 417 | CardView; 418 | CardElevation="0dp"; 419 | CardBackgroundColor=w; 420 | Radius=dp2px(8)-2; 421 | layout_margin="2px"; 422 | layout_width="-1"; 423 | layout_height="-1"; 424 | { 425 | LinearLayout; 426 | layout_width="-1"; 427 | layout_height="-1"; 428 | orientation="vertical"; 429 | padding="7dp"; 430 | { 431 | TextView; 432 | text=" 加入 Telegram 群组"; 433 | textColor=b; 434 | textSize="16sp"; 435 | id="Tg群"; 436 | layout_marginTop="5dp"; 437 | gravity="center|left"; 438 | -- Typeface=字体("product-Bold"); 439 | }; 440 | { 441 | TextView; 442 | text=[[ 点按以加入 Telegram 群组]]; 443 | textColor=b; 444 | textSize="14sp"; 445 | gravity="center|left"; 446 | id="Tg群内容"; 447 | layout_marginBottom="5dp"; 448 | --Typeface=字体("product"); 449 | layout_marginTop="12dp"; 450 | }; 451 | }; 452 | }; 453 | }; 454 | }; 455 | 456 | { 457 | LinearLayout; 458 | layout_height="-1"; 459 | layout_width="-1"; 460 | orientation="vertical"; 461 | padding="7dp"; 462 | id="cv5_lay"; 463 | { 464 | CardView; 465 | CardElevation="0dp"; 466 | CardBackgroundColor="#FFE0E0E0"; 467 | Radius="8dp"; 468 | layout_width="-1"; 469 | layout_height="-2"; 470 | layout_margin="5dp"; 471 | { 472 | CardView; 473 | CardElevation="0dp"; 474 | CardBackgroundColor=w; 475 | Radius=dp2px(8)-2; 476 | layout_margin="2px"; 477 | layout_width="-1"; 478 | layout_height="-1"; 479 | { 480 | LinearLayout; 481 | layout_width="-1"; 482 | layout_height="-1"; 483 | orientation="vertical"; 484 | padding="7dp"; 485 | { 486 | TextView; 487 | text=" Telegram 推送服务"; 488 | textColor=b; 489 | textSize="16sp"; 490 | id="推送"; 491 | layout_marginTop="5dp"; 492 | gravity="center|left"; 493 | -- Typeface=字体("product-Bold"); 494 | }; 495 | { 496 | TextView; 497 | text=[[ 点按以加入 Telegram 图片推送频道]]; 498 | textColor=b; 499 | textSize="14sp"; 500 | gravity="center|left"; 501 | layout_marginBottom="5dp"; 502 | id="推送内容"; 503 | --Typeface=字体("product"); 504 | layout_marginTop="12dp"; 505 | }; 506 | }; 507 | }; 508 | }; 509 | }; 510 | 511 | { 512 | LinearLayout; 513 | layout_height="-1"; 514 | layout_width="-1"; 515 | orientation="vertical"; 516 | padding="7dp"; 517 | id="cv6_lay"; 518 | { 519 | CardView; 520 | CardElevation="0dp"; 521 | CardBackgroundColor="#FFE0E0E0"; 522 | Radius="8dp"; 523 | layout_width="-1"; 524 | layout_height="-2"; 525 | layout_margin="5dp"; 526 | { 527 | CardView; 528 | CardElevation="0dp"; 529 | CardBackgroundColor=w; 530 | Radius=dp2px(8)-2; 531 | layout_margin="2px"; 532 | layout_width="-1"; 533 | layout_height="-1"; 534 | { 535 | LinearLayout; 536 | layout_width="-1"; 537 | layout_height="-1"; 538 | orientation="vertical"; 539 | padding="7dp"; 540 | { 541 | TextView; 542 | text=" Android 绿色应用公约"; 543 | textColor=b; 544 | textSize="16sp"; 545 | id="绿色公约"; 546 | layout_marginTop="5dp"; 547 | gravity="center|left"; 548 | -- Typeface=字体("product-Bold"); 549 | }; 550 | { 551 | TextView; 552 | text=[[ Tujian X 已经完全适配了「Android 绿色应用公约」并且通过审核 553 | 554 | 点按以了解更多信息]]; 555 | textColor=b; 556 | textSize="14sp"; 557 | gravity="center|left"; 558 | id="绿色公约内容"; 559 | layout_marginBottom="5dp"; 560 | --Typeface=字体("product"); 561 | layout_marginTop="12dp"; 562 | }; 563 | }; 564 | }; 565 | }; 566 | }; 567 | 568 | { 569 | LinearLayout; 570 | layout_height="-1"; 571 | layout_width="-1"; 572 | orientation="vertical"; 573 | padding="7dp"; 574 | id="cv7_lay"; 575 | { 576 | CardView; 577 | CardElevation="0dp"; 578 | CardBackgroundColor="#FFE0E0E0"; 579 | Radius="8dp"; 580 | layout_width="-1"; 581 | layout_height="-2"; 582 | layout_margin="5dp"; 583 | { 584 | CardView; 585 | CardElevation="0dp"; 586 | CardBackgroundColor=w; 587 | Radius=dp2px(8)-2; 588 | layout_margin="2px"; 589 | layout_width="-1"; 590 | layout_height="-1"; 591 | { 592 | LinearLayout; 593 | layout_width="-1"; 594 | layout_height="-1"; 595 | orientation="vertical"; 596 | padding="7dp"; 597 | { 598 | TextView; 599 | text=" Tujian 隐私政策"; 600 | layout_marginTop="5dp"; 601 | textColor=b; 602 | textSize="16sp"; 603 | id="隐私政策"; 604 | gravity="center|left"; 605 | -- Typeface=字体("product-Bold"); 606 | }; 607 | { 608 | TextView; 609 | text=[[ 点按以查看 Tujian 隐私政策]]; 610 | textColor=b; 611 | textSize="14sp"; 612 | gravity="center|left"; 613 | id="隐私政策内容"; 614 | layout_marginBottom="5dp"; 615 | --Typeface=字体("product"); 616 | layout_marginTop="12dp"; 617 | }; 618 | }; 619 | }; 620 | }; 621 | }; 622 | 623 | { 624 | LinearLayout; 625 | layout_height="-1"; 626 | layout_width="-1"; 627 | orientation="vertical"; 628 | padding="7dp"; 629 | id="cv8_lay"; 630 | { 631 | CardView; 632 | CardElevation="0dp"; 633 | CardBackgroundColor="#FFE0E0E0"; 634 | Radius="8dp"; 635 | layout_width="-1"; 636 | layout_height="-2"; 637 | layout_margin="5dp"; 638 | { 639 | CardView; 640 | CardElevation="0dp"; 641 | CardBackgroundColor=w; 642 | Radius=dp2px(8)-2; 643 | layout_margin="2px"; 644 | layout_width="-1"; 645 | layout_height="-1"; 646 | { 647 | LinearLayout; 648 | layout_width="-1"; 649 | layout_height="-1"; 650 | orientation="vertical"; 651 | padding="7dp"; 652 | { 653 | TextView; 654 | text=" Open Tujian-开源相关"; 655 | textColor=b; 656 | textSize="16sp"; 657 | id="开源"; 658 | gravity="center|left"; 659 | layout_marginTop="5dp"; 660 | -- Typeface=字体("product-Bold"); 661 | }; 662 | { 663 | TextView; 664 | text=[[ 点按以查看 Tujian 开源项目列表]]; 665 | textColor=b; 666 | textSize="14sp"; 667 | gravity="center|left"; 668 | id="开源内容"; 669 | --Typeface=字体("product"); 670 | layout_marginTop="12dp"; 671 | layout_marginBottom="5dp"; 672 | }; 673 | }; 674 | }; 675 | }; 676 | }; 677 | }; 678 | }; 679 | }; 680 | 681 | {--顶栏布局(背景) 682 | LinearLayout; 683 | layout_height="-2"; 684 | layout_width="-1"; 685 | background=ThemeColor; 686 | elevation="4dp"; 687 | orientation="vertical"; 688 | id="_topbar"; 689 | --[[ 690 | {--状态栏占位布局 691 | TextView; 692 | layout_height=状态栏高度; 693 | layout_width="-1"; 694 | --开启请配合SDK19状态栏 695 | }; 696 | ]] 697 | {--标题栏布局(背景) 698 | LinearLayout; 699 | layout_height="56dp"; 700 | layout_width="-1"; 701 | id="_topbar_top"; 702 | background=ThemeColor; 703 | }; 704 | }; 705 | {--顶栏布局(标题) 706 | LinearLayout; 707 | layout_height="200dp"; 708 | layout_width="-1"; 709 | elevation="4dp"; 710 | orientation="vertical"; 711 | id="_topbar2"; 712 | --[[ 713 | {--状态栏占位布局 714 | TextView; 715 | layout_height=状态栏高度; 716 | layout_width="-1"; 717 | }; 718 | --开启请配合SDK19状态栏 719 | ]] 720 | {--标题栏布局 721 | LinearLayout; 722 | layout_height="-1"; 723 | layout_width="-1"; 724 | gravity="left|bottom"; 725 | orientation="vertical"; 726 | { 727 | LinearLayout; 728 | layout_height="-1"; 729 | layout_width="-1"; 730 | gravity="left|top"; 731 | layout_weight="1"; 732 | { 733 | ImageView; 734 | layout_width="56dp"; 735 | layout_height="56dp"; 736 | padding="16dp"; 737 | ColorFilter=TextColor; 738 | src="guanyu/res/back"; 739 | onClick=function() 740 | 关闭页面() 741 | end; 742 | id="_back"; 743 | }; 744 | }; 745 | { 746 | TextView; 747 | text="关于"; 748 | textColor=TextColor; 749 | textSize="20sp"; 750 | paddingLeft="16dp"; 751 | layout_height="56dp"; 752 | id="_title"; 753 | gravity="left|center"; 754 | PivotX=0; 755 | PivotY="56dp"; 756 | ScaleX=1.6; 757 | ScaleY=1.6; 758 | }; 759 | }; 760 | }; 761 | {--顶栏布局(悬浮按钮) 762 | LinearLayout; 763 | layout_height="244dp"; 764 | layout_width="-1"; 765 | elevation="4dp"; 766 | orientation="vertical"; 767 | id="_topbar3"; 768 | gravity="right|bottom"; 769 | { 770 | MLuaFloatingButton--悬浮按钮(函数,打脸滑稽 771 | { 772 | size=0; 773 | layout_margin="16dp"; 774 | background=b; 775 | elevation="4dp"; 776 | elevationClick="10dp"; 777 | id="_mfb"; 778 | src="guanyu/res/open"; 779 | iconColor=w; 780 | rippleColor="#3fffffff"; 781 | }; 782 | id="_mfb_w"; 783 | }; 784 | }; 785 | }; 786 | }; 787 | 788 | 789 | 设置视图(layout) 790 | 品牌=Build.BRAND 791 | if 品牌 == "Smartisan" then 792 | else 793 | --[[ 波纹({cv1_lay},"方黑") 794 | 波纹({cv2_lay},"方白") 795 | 波纹({cv3_lay},"方黑") 796 | 波纹({cv4_lay},"方黑") 797 | 波纹({cv5_lay},"方黑") 798 | 波纹({cv6_lay},"方黑") 799 | 波纹({cv7_lay},"方黑") 800 | 波纹({cv8_lay},"方黑") 801 | 波纹({cv10_lay},"方黑") 802 | 波纹({cv11_lay},"方黑") 803 | 波纹({cv12_lay},"方黑") 804 | ]] 805 | 波纹({_back},"圆白") 806 | end 807 | _topbar.alpha=0 808 | 809 | _mfbb=true 810 | 811 | obs_1.setScrollViewCallbacks(ObservableScrollViewCallbacks{ 812 | --滚动时 813 | onScrollChanged=function(scrollY,firstScroll,dragging) 814 | obs1_lst_lst=obs1_lst 815 | obs1_lst=scrollY 816 | if obs1_lst_lst==nil then 817 | obs1_lst_lst=obs1_lst 818 | end 819 | apa=1-(obs1_lst/(dp2px(200-56)-状态栏高度)) 820 | apb=1-(obs1_lst/dp2px(244-56-16-16)) 821 | if apa<=0 then 822 | _topbar.alpha=1 823 | else 824 | _topbar.alpha=0 825 | end 826 | pho_top.alpha=apa 827 | if apa>=0 then 828 | _title.setY(apa*(dp2px(200-56)-状态栏高度)) 829 | _title.setX((1-apa)*dp2px(56)+0.6*apa) 830 | _title.setScaleY(1+(0.6*apa)) 831 | _title.setScaleX(1+(0.6*apa)) 832 | --_title.setPivotX(0) 833 | --_title.setPivotY(_title.getHeight()) 834 | _mfb_w.setY(apb*(dp2px(244-56-16-16))) 835 | if not mfbb then 836 | MFBshow(_mfb) 837 | mfbb=true 838 | mfblst=false 839 | end 840 | else 841 | _title.setY(0) 842 | _title.setX(dp2px(56)) 843 | _title.setScaleY(1) 844 | _title.setScaleX(1) 845 | if mfbb and not mfblst then 846 | mfblst=false 847 | MFBhide(_mfb) 848 | mfbb=false 849 | end 850 | mfblst=true 851 | end 852 | end, 853 | 854 | --按下 855 | onDownMotionEvent=function() 856 | end, 857 | 858 | --拖拽结束或者取消时 859 | onUpOrCancelMotionEvent=function(scrollState) 860 | --[[if tostring(scrollState)=="UP" and obs1_lst<=dp2px(200) and obs1_lst>=5 then 861 | local scrollYu = ObjectAnimator.ofInt(obs_1, "scrollY", {obs_1.scrollY,dp2px(200-55)-状态栏高度}) 862 | scrollYu.setDuration(512) 863 | scrollYu.setInterpolator(DecelerateInterpolator()); 864 | scrollYu.start() 865 | end 866 | if tostring(scrollState)=="DOWN" and obs1_lst<=dp2px(200) and obs1_lst>=5 then 867 | local scrollYu = ObjectAnimator.ofInt(obs_1, "scrollY", {obs_1.scrollY,0}) 868 | scrollYu.setDuration(512) 869 | scrollYu.setInterpolator(DecelerateInterpolator()); 870 | scrollYu.start() 871 | end]] 872 | end 873 | }) 874 | 875 | _mfb.onClick=function() 876 | url="https://tupics.github.io/" 877 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 878 | activity.startActivity(viewIntent) 879 | end 880 | 881 | function 返回顶部()--平滑返回顶部 882 | local scrollYu = ObjectAnimator.ofInt(obs_1, "scrollY", {obs_1.scrollY,0}) 883 | scrollYu.setDuration(512) 884 | scrollYu.setInterpolator(DecelerateInterpolator()); 885 | scrollYu.start() 886 | end 887 | 888 | --[[ 889 | 890 | 891 | MLua模板 by MUK 892 | 893 | 894 | ]] 895 | _title.getPaint().setFakeBoldText(true) 896 | 概述.getPaint().setFakeBoldText(true) 897 | 捐赠.getPaint().setFakeBoldText(true) 898 | 推送.getPaint().setFakeBoldText(true) 899 | Tg群.getPaint().setFakeBoldText(true) 900 | QQ群.getPaint().setFakeBoldText(true) 901 | 隐私政策.getPaint().setFakeBoldText(true) 902 | 绿色公约.getPaint().setFakeBoldText(true) 903 | 开源.getPaint().setFakeBoldText(true) 904 | 官网.getPaint().setFakeBoldText(true) 905 | 版权.getPaint().setFakeBoldText(true) 906 | 907 | 908 | pho_top.setColorFilter(转0x(ThemeColor)) 909 | 910 | --[[ 911 | PS:Tujian 所选用的图片来自于 Unsplash、Pixiv、Cookapk 等社区、网站及论坛,且并非用于商业行为。 912 | 若您认为我们侵犯了您的合法知识产权,请发送邮件至 Chimon@Chimon.me,我们会第一时间配合处理。 913 | ]] 914 | 915 | 916 | --[[ 917 | --退出动画开始 918 | kbl=...--接受在杂烩设置的空变量 919 | 参数=0 920 | function onKeyDown(code,event) 921 | if string.find(tostring(event),"KEYCODE_BACK") ~= nil then 922 | if 参数+2 > tonumber(os.time()) then 923 | activity.finish() 924 | else 925 | kbl1="空变量" 926 | activity.newActivity("zahui/main.lua",android.R.anim.fade_in,android.R.anim.fade_out,{kbl1}) 927 | activity.finish() 928 | 参数=tonumber(os.time()) 929 | end 930 | return true 931 | end 932 | end 933 | --动画代码不稳定,未开放 934 | ]] 935 | 936 | 937 | --语言设置开始 938 | if 939 | 语言=="zh"==false 940 | and 941 | 语言=="zh_CN"==false 942 | and 943 | 语言=="zh_HK"==false 944 | and 945 | 语言=="zh_TW"==false 946 | then 947 | 控件隐藏(cv10_lay) 948 | _title.text="About" 949 | 概述.text=" Main" 950 | 推送.text=" Push" 951 | 官网.text=" Official Website" 952 | Tg群.text=" Telegram Group" 953 | 捐赠.text=" Donate" 954 | 开源.text=" Open Source" 955 | QQ群.text=" QQ Group" 956 | 绿色公约.text=" Green-Android Project" 957 | 隐私政策.text=" Privacy" 958 | 概述内容.text=[[ Tujian X is a Wallpapers Recommendation Application. 959 | 960 | Our thoughts is “Nobody is an island,a picture contain one world” 961 | 962 | I wrote it in my spare time with some other developers.We are all students from China. 963 | 964 | Well, Enjoy the meaning of the pictures now!]] 965 | 推送内容.text=" Picture push service in Telegram" 966 | Tg群内容.text=" Join our Telegram Group" 967 | QQ群内容.text=" Join our QQ Group" 968 | 绿色公约内容.text=[[ Green-Android Project is held to make Android phones in China can have a longer using time and it is founded by oasisfeng,who is the developer of Greenify. 969 | 970 | Now Tujian X has already supported the Project and pass the authentication.]] 971 | 官网内容.text=" Click to learn more information" 972 | 隐私政策内容.text=" Click to learn more information" 973 | 捐赠内容.text=" Click to learn more information" 974 | 开源内容.text=" Click to learn more about Open Tujian-Tujian Open source" 975 | end 976 | 977 | --点击事件开始 978 | --[[ 979 | cv1_lay.onClick=function() 980 | if 981 | 语言=="zh"or 982 | 语言=="zh_CN"or 983 | 语言=="zh_HK"or 984 | 语言=="zh_TW" 985 | then 986 | SnakeBar("无人为孤岛,一图一世界") 987 | else 988 | SnakeBar("Nobody is an island,a picture contain one world.") 989 | end 990 | end 991 | ]] 992 | 993 | cv3_lay.onClick=function() 994 | url="mqqapi://card/show_pslcard?src_type=internal&version=1&uin=472863370&card_type=group&source=qrcode" 995 | activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) 996 | if 997 | 语言=="zh"or 998 | 语言=="zh_CN"or 999 | 语言=="zh_HK"or 1000 | 语言=="zh_TW" 1001 | then 1002 | SnakeBar("若加入失败,请检查是否安装了最新版本 QQ") 1003 | else 1004 | SnakeBar("If failed, please install QQ") 1005 | end 1006 | end 1007 | cv4_lay.onClick=function() 1008 | url="https://t.me/RutuGroup" 1009 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 1010 | activity.startActivity(viewIntent) 1011 | end 1012 | 1013 | 1014 | cv5_lay.onClick=function() 1015 | url="https://t.me/Tujiansays" 1016 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 1017 | activity.startActivity(viewIntent) 1018 | end 1019 | 1020 | cv6_lay.onClick=function() 1021 | url="https://green-android.org/" 1022 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 1023 | activity.startActivity(viewIntent) 1024 | end 1025 | 1026 | cv7_lay.onClick=function() 1027 | url="https://dpic.dev/licenses/privacy" 1028 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 1029 | activity.startActivity(viewIntent) 1030 | end 1031 | 1032 | cv8_lay.onClick=function() 1033 | url="https://open.dpic.dev/" 1034 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 1035 | activity.startActivity(viewIntent) 1036 | end 1037 | 1038 | cv11_lay.onClick=function() 1039 | url="https://tupics.github.io/" 1040 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(url)) 1041 | activity.startActivity(viewIntent) 1042 | end 1043 | 1044 | cv12_lay.onClick=function() 1045 | --对话框内带图片(自定义布局对话框,带图片的) 1046 | img_layout= 1047 | { 1048 | LinearLayout; 1049 | orientation="vertical";--重力属性 1050 | { 1051 | ImageView;--图片控件 1052 | src='zahui/res/qr.png';--设置图片路径 1053 | layout_width='150dp';--图片宽度 1054 | layout_height='150dp';--图片高度 1055 | layout_gravity="center";--重力属性 1056 | scaleType='fitXY';--图片显示类型 1057 | }; 1058 | { 1059 | TextView;--文字控件 1060 | textSize="16sp"; 1061 | paddingLeft="22dp"; 1062 | paddingRight="19dp"; 1063 | text=[[ 众所周知,Tujian 是一个公益项目。随着用户的增加、图片收录数量等方面的问题,Tujian 服务器已经不堪重负... 1064 | 1065 | 因此,经过 第3195次 Tujian 事务所 圆桌会议,我们决定放一个微信收款二维码...欢迎捐赠以支持 Tujian 发展]]; 1066 | textColor="#ff000000"; 1067 | }; 1068 | 1069 | };--图片自绘支持修改图片大小 1070 | 1071 | dialog1=AlertDialog.Builder(this) 1072 | .setTitle("捐赠-微信")--设置标题 1073 | .setView(loadlayout(img_layout))--设置布局 1074 | .setNegativeButton("了解",function(v)--设置积极按钮 1075 | end) 1076 | .setPositiveButton("保存二维码至本地",function(v)--设置积极按钮 1077 | qrlink="https://ws1.sinaimg.cn/large/006N1muNly1g2t70rcrehj30cp0cpgle.jpg" 1078 | if tointeger(sdk) <= 28 1079 | then 1080 | if 1081 | File("/sdcard/Pictures/Tujian/Wechat-QR.jpg").exists() == true 1082 | then 1083 | SnackerBar.build() 1084 | :msg("二维码已存在") 1085 | :actionText("") 1086 | :action(function() end) 1087 | :show() 1088 | else 1089 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 1090 | url=Uri.parse(qrlink); 1091 | request=DownloadManager.Request(url); 1092 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 1093 | request.setDestinationInExternalPublicDir("Pictures/Tujian","Wechat-QR.jpg"); 1094 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 1095 | downloadManager.enqueue(request); 1096 | SnackerBar.build() 1097 | :msg("二维码已存储至此设备") 1098 | :actionText("") 1099 | :action(function() end) 1100 | :show() 1101 | end 1102 | else 1103 | if File("/sdcard/Android/media/ml.cerasus.pics/Tujian/Wechat-QR.jpg").exists() == true 1104 | then 1105 | SnackerBar.build() 1106 | :msg("二维码已存在") 1107 | :actionText("") 1108 | :action(function() end) 1109 | :show() 1110 | else 1111 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 1112 | url=Uri.parse(qrlink); 1113 | request=DownloadManager.Request(url); 1114 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 1115 | request.setDestinationInExternalPublicDir("Android/media/ml.cerasus.pics/Tujian","Wechat-QR.jpg"); 1116 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 1117 | downloadManager.enqueue(request); 1118 | SnackerBar.build() 1119 | :msg("二维码已存储至此设备") 1120 | :actionText("") 1121 | :action(function() end) 1122 | :show() 1123 | end 1124 | end 1125 | end) 1126 | .show()--显示弹窗 1127 | dialog1.getButton(dialog1.BUTTON_POSITIVE).setTextColor(0xff000000) 1128 | dialog1.getButton(dialog1.BUTTON_NEGATIVE).setTextColor(0xff000000) 1129 | dialog1.getButton(dialog1.BUTTON_NEUTRAL).setTextColor(0xff000000) 1130 | dialog1.create() 1131 | end 1132 | 1133 | --颜色转换 1134 | function 转0x(颜色) 1135 | if #颜色==7 then 1136 | ab=颜色:match("#(.+)") 1137 | abc=tonumber("0xff"..ab) 1138 | else 1139 | ab=颜色:match("#(.+)") 1140 | abc=tonumber("0x"..ab) 1141 | end 1142 | return abc 1143 | end 1144 | 1145 | --隐藏导航栏 1146 | activity.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE) 1147 | 1148 | --针对(可能)锤子水波纹问题 1149 | sdk = tointeger(Build.VERSION.SDK) 1150 | if sdk < 28 then 1151 | activity.setTheme(android.R.style.Theme_Material_Light) 1152 | end 1153 | 1154 | --Snakebar函数,具体代码请见根目录Snakebar.lua 1155 | function SnakeBar(fill) 1156 | SnackerBar.build() 1157 | :msg(fill) 1158 | :actionText("") 1159 | :action(function() end) 1160 | :show() 1161 | end 1162 | -------------------------------------------------------------------------------- /guanyu/mluafloatingbutton.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/guanyu/mluafloatingbutton.lua -------------------------------------------------------------------------------- /guanyu/res/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/guanyu/res/back.png -------------------------------------------------------------------------------- /guanyu/res/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/guanyu/res/open.png -------------------------------------------------------------------------------- /guanyu/res/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/guanyu/res/photo.png -------------------------------------------------------------------------------- /guidang/main.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Copyright [2018-2019] [Tujian X @Createlite] 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ]] 16 | require "import" 17 | import "android.app.*" 18 | import "android.os.*" 19 | import "android.widget.*" 20 | import "android.view.*" 21 | import "com.github.ksoichiro.android.observablescrollview.*"--导入ObservableScrollView,容易监听滑动 22 | import "muk"--导入中文函数 23 | import "Createlite@Tujian@SnakerBar" 24 | import "android.content.pm.ActivityInfo" 25 | import 'ml.cerasus.RomUtil.*' 26 | 27 | ThemeColor,TextColor=...--载入参数 28 | sdk = tointeger(Build.VERSION.SDK) 29 | 30 | 隐藏标题栏() 31 | 32 | --隐藏虚拟导航栏 33 | activity.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE) 34 | activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)--禁止横屏 35 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setNavigationBarColor(转0x(ThemeColor)); 36 | 37 | --设置颜色变量便于调用 38 | primaryc="#3F51B5" 39 | write="#ffffffff" 40 | viewshaderc="#3f000000" 41 | textc="#212121" 42 | w=ThemeColor 43 | b=TextColor 44 | 45 | --[[ 46 | 状态栏沉浸,Android SDK>19时生效 47 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 48 | ]] 49 | --完全沉浸,SDK>21 50 | if ThemeColor == "#FFFFFFFF" or ThemeColor == "#ffffffff" or ThemeColor==nil then--防止全白 51 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setStatusBarColor(转0x("#FF757575")); 52 | else 53 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setStatusBarColor(转0x(ThemeColor)); 54 | end 55 | 56 | 状态栏高度=activity.getResources().getDimensionPixelSize(luajava.bindClass("com.android.internal.R$dimen")().status_bar_height) 57 | 58 | pagea_={ 59 | ObservableScrollView; 60 | layout_width="-1"; 61 | layout_height="-1"; 62 | id="obs_1"; 63 | { 64 | LinearLayout; 65 | layout_height="-1"; 66 | layout_width="-1"; 67 | orientation="vertical"; 68 | paddingTop=dp2px(56+48)+状态栏高度;--抵消顶部遮盖部分高度 69 | { 70 | LuaWebView; 71 | id="杂烩"; 72 | layout_width="fill"; 73 | layout_height="fill"; 74 | }; 75 | }; 76 | }; 77 | 78 | pageb_={ 79 | ObservableScrollView; 80 | layout_width="-1"; 81 | layout_height="-1"; 82 | id="obs_2"; 83 | { 84 | LinearLayout; 85 | layout_height="-1"; 86 | layout_width="-1"; 87 | orientation="vertical"; 88 | paddingTop=dp2px(56+48)+状态栏高度;--抵消顶部遮盖部分高度 89 | { 90 | LuaWebView; 91 | id="插画"; 92 | layout_width="fill"; 93 | layout_height="fill"; 94 | }; 95 | }; 96 | }; 97 | 98 | --布局表 99 | layout={--页面布局 100 | LinearLayout; 101 | layout_height="-1"; 102 | layout_width="-1"; 103 | id="_root"; 104 | orientation="vertical"; 105 | { 106 | RelativeLayout;--RelativeLayout中 107 | layout_height="-1"; 108 | layout_width="-1"; 109 | background=write; 110 | { 111 | LinearLayout; 112 | layout_height="-1"; 113 | layout_width="-1"; 114 | orientation="vertical"; 115 | {--标题栏以下布局 116 | PageView;--多页面布局 117 | layout_height="-1"; 118 | layout_width="-1"; 119 | id="_page"; 120 | pages={ 121 | pagea_;--页面a 122 | pageb_;--页面b 123 | }; 124 | }; 125 | }; 126 | { 127 | LinearLayout; 128 | layout_height="-1"; 129 | layout_width="-1"; 130 | orientation="vertical"; 131 | {--顶栏布局 132 | LinearLayout; 133 | layout_height="-2"; 134 | layout_width="-1"; 135 | background=w; 136 | elevation="4dp"; 137 | orientation="vertical"; 138 | id="_topbar"; 139 | --[[ 140 | {--状态栏占位布局 141 | TextView; 142 | layout_height=状态栏高度; 143 | layout_width="-1"; 144 | background=w; 145 | }; 146 | --启用请配合sdk19的状态栏 147 | ]] 148 | {--标题栏布局 149 | LinearLayout; 150 | layout_height="56dp"; 151 | layout_width="-1"; 152 | background=w; 153 | gravity="left|center"; 154 | id="_topbar_top"; 155 | { 156 | RelativeLayout, 157 | { 158 | TextView; 159 | Text="归档"; 160 | textColor=b; 161 | textSize="20sp"; 162 | paddingLeft="25dp"; 163 | id="_title"; 164 | }; 165 | { 166 | TextView; 167 | Text="加载中.."; 168 | textColor=b; 169 | textSize="12sp"; 170 | layout_below="_title", 171 | paddingLeft="25dp"; 172 | id="subtitle"; 173 | }; 174 | 175 | }; 176 | }; 177 | {--Tab布局 178 | RelativeLayout; 179 | layout_height="48dp"; 180 | layout_width="-1"; 181 | background=w; 182 | { 183 | LinearLayout; 184 | layout_height="-1"; 185 | layout_width="-1"; 186 | { 187 | LinearLayout; 188 | layout_width=activity.getWidth()/2; 189 | layout_height="-1"; 190 | gravity="center"; 191 | id="jc1"; 192 | onClick=function()_page.showPage(0)end;--切换到第一页(Page计数从0开始) 193 | { 194 | TextView; 195 | layout_width="-2"; 196 | layout_height="-2"; 197 | Text="杂烩"; 198 | textColor=b; 199 | }; 200 | }; 201 | { 202 | LinearLayout; 203 | layout_width=activity.getWidth()/2; 204 | layout_height="-1"; 205 | gravity="center"; 206 | id="jc2"; 207 | onClick=function()_page.showPage(1)end;--切换到第二页(Page计数从0开始) 208 | { 209 | TextView; 210 | layout_width="-2"; 211 | layout_height="-2"; 212 | Text="插画"; 213 | textColor=b; 214 | alpha="0.6"; 215 | }; 216 | }; 217 | }; 218 | { 219 | LinearLayout; 220 | layout_height="2dp"; 221 | layout_width=activity.getWidth()/2; 222 | id="page_scroll"; 223 | layout_alignParentBottom="true"; 224 | background=write; 225 | }; 226 | }; 227 | }; 228 | }; 229 | }; 230 | }; 231 | 232 | 233 | 设置视图(layout) 234 | 235 | 品牌=Build.BRAND 236 | if 品牌 == "Smartisan" then 237 | else 238 | 波纹({jc1,jc2},"方黑") 239 | end 240 | 241 | --[[ 242 | ControlsRipple(jc1,0x3f000000) 243 | ControlsRipple(jc2,0x3f000000) 244 | ]] 245 | 246 | _page.setOnPageChangeListener(PageView.OnPageChangeListener{ 247 | --页面状态改变监听 248 | onPageScrolled=function(a,b,c) 249 | --页面滚动时 250 | local w=activity.getWidth()/2 251 | local wd=c/2 252 | if a==0 then 253 | page_scroll.setX(wd) 254 | end 255 | if a==1 then 256 | page_scroll.setX(wd+w) 257 | end 258 | end, 259 | onPageSelected=function(v) 260 | --页面选中时(停止滚动时) 261 | local x=1 262 | local c=0.6 263 | local c1=c 264 | local c2=c 265 | local c3=c 266 | local c4=c 267 | if v==0 then 268 | c1=x 269 | end 270 | if v==1 then 271 | c2=x 272 | end 273 | --设置透明度 274 | jc1.getChildAt(0).setAlpha(c1) 275 | jc2.getChildAt(0).setAlpha(c2) 276 | end 277 | }) 278 | 279 | obs_1.setScrollViewCallbacks(ObservableScrollViewCallbacks{ 280 | --滚动时 281 | onScrollChanged=function(scrollY,firstScroll,dragging) 282 | obs1_lst=scrollY 283 | --SnakeBar(scrollY) 284 | end, 285 | 286 | --按下 287 | onDownMotionEvent=function() 288 | --SnakeBar("按下") 289 | end, 290 | 291 | --拖拽结束或者取消时 292 | onUpOrCancelMotionEvent=function(scrollState) 293 | if(scrollState==ScrollState.DOWN) then 294 | --SnakeBar("向下滚动"); 295 | translationUp = ObjectAnimator.ofFloat(_topbar, "Y",{_topbar.getY(), 0}) 296 | translationUp.setInterpolator(DecelerateInterpolator()) 297 | translationUp.setDuration(256) 298 | translationUp.start() 299 | alpha = ObjectAnimator.ofFloat(_topbar_top, "alpha", {_topbar_top.getAlpha(), 1}) 300 | alpha.setDuration(256)--设置动画时间 301 | alpha.setInterpolator(DecelerateInterpolator()) 302 | alpha.start() 303 | elseif(scrollState==ScrollState.UP) then 304 | --SnakeBar("向上滚动"); 305 | if obs1_lst>=5 then 306 | translationUp = ObjectAnimator.ofFloat(_topbar, "Y",{_topbar.getY(),-dp2px(56)}) 307 | translationUp.setInterpolator(DecelerateInterpolator()) 308 | translationUp.setDuration(256) 309 | translationUp.start() 310 | alpha = ObjectAnimator.ofFloat(_topbar_top, "alpha", {_topbar_top.getAlpha(), 0}) 311 | alpha.setDuration(256)--设置动画时间 312 | alpha.setInterpolator(DecelerateInterpolator()) 313 | alpha.start() 314 | else 315 | --SnakeBar("向下滚动"); 316 | translationUp = ObjectAnimator.ofFloat(_topbar, "Y",{_topbar.getY(), 0}) 317 | translationUp.setInterpolator(DecelerateInterpolator()) 318 | translationUp.setDuration(256) 319 | translationUp.start() 320 | alpha = ObjectAnimator.ofFloat(_topbar_top, "alpha", {_topbar_top.getAlpha(), 1}) 321 | alpha.setDuration(256)--设置动画时间 322 | alpha.setInterpolator(DecelerateInterpolator()) 323 | alpha.start() 324 | end 325 | else 326 | --SnakeBar("停止滚动"); 327 | end 328 | 329 | end 330 | }) 331 | 332 | obs_2.setScrollViewCallbacks(ObservableScrollViewCallbacks{ 333 | --滚动时 334 | onScrollChanged=function(scrollY,firstScroll,dragging) 335 | obs2_lst=scrollY 336 | --SnakeBar(scrollY,firstScroll,dragging) 337 | 338 | -- param scrollY 在Y轴滚动位置。 339 | -- firstScroll 是否是第一次(刚开始)滑动 340 | -- dragging 当前视图是否是因为拖拽而产生滑动 341 | end, 342 | 343 | --按下 344 | onDownMotionEvent=function() 345 | --SnakeBar("按下") 346 | end, 347 | 348 | --拖拽结束或者取消时 349 | onUpOrCancelMotionEvent=function(scrollState) 350 | if(scrollState==ScrollState.DOWN) then 351 | --SnakeBar("向下滚动"); 352 | translationUp = ObjectAnimator.ofFloat(_topbar, "Y",{_topbar.getY(), 0}) 353 | translationUp.setInterpolator(DecelerateInterpolator()) 354 | translationUp.setDuration(256) 355 | translationUp.start() 356 | alpha = ObjectAnimator.ofFloat(_topbar_top, "alpha", {_topbar_top.getAlpha(), 1}) 357 | alpha.setDuration(256)--设置动画时间 358 | alpha.setInterpolator(DecelerateInterpolator()) 359 | alpha.start() 360 | elseif(scrollState==ScrollState.UP) then 361 | if obs2_lst>=5 then 362 | --SnakeBar("向上滚动"); 363 | translationUp = ObjectAnimator.ofFloat(_topbar, "Y",{_topbar.getY(),-dp2px(56)}) 364 | translationUp.setInterpolator(DecelerateInterpolator()) 365 | translationUp.setDuration(256) 366 | translationUp.start() 367 | alpha = ObjectAnimator.ofFloat(_topbar_top, "alpha", {_topbar_top.getAlpha(), 0}) 368 | alpha.setDuration(256)--设置动画时间 369 | alpha.setInterpolator(DecelerateInterpolator()) 370 | alpha.start() 371 | else 372 | --SnakeBar("向下滚动"); 373 | translationUp = ObjectAnimator.ofFloat(_topbar, "Y",{_topbar.getY(), 0}) 374 | translationUp.setInterpolator(DecelerateInterpolator()) 375 | translationUp.setDuration(256) 376 | translationUp.start() 377 | alpha = ObjectAnimator.ofFloat(_topbar_top, "alpha", {_topbar_top.getAlpha(), 1}) 378 | alpha.setDuration(256)--设置动画时间 379 | alpha.setInterpolator(DecelerateInterpolator()) 380 | alpha.start() 381 | end 382 | else 383 | --SnakeBar("停止滚动"); 384 | end 385 | 386 | end 387 | }) 388 | 389 | --[[ 390 | 391 | 392 | MLua模板 by MUK 393 | 394 | 395 | ]] 396 | 397 | 控件隐藏(subtitle) 398 | _title.getPaint().setFakeBoldText(true) 399 | ThemeColor,TextColor=...--载入参数 400 | --SnakeBar(ThemeColor,TextColor)--测试 401 | 402 | --[[ 403 | kbl3=...--接受在杂烩设置的空变量 404 | 参数=0 405 | function onKeyDown(code,event) 406 | if string.find(tostring(event),"KEYCODE_BACK") ~= nil then 407 | if 参数+2 > tonumber(os.time()) then 408 | activity.finish() 409 | else 410 | kbl2="空变量" 411 | activity.newActivity("zahui/main.lua",android.R.anim.fade_in,android.R.anim.fade_out,{kbl2}) 412 | activity.finish() 413 | 参数=tonumber(os.time()) 414 | end 415 | return true 416 | end 417 | end 418 | ]] 419 | --动画代码不稳定,未开放 420 | 421 | --杂烩归档设置 422 | 杂烩.loadUrl("https://dp.chimon.me/fapp/old.php?sort=杂烩")--加载网页 423 | 杂烩.getSettings().setSupportZoom(false)--不支持缩放 424 | 杂烩.getSettings().setJavaScriptEnabled(true)--设置支持JS,备用 425 | 杂烩.getSettings().setUserAgentString("Tujian @Createlite");--辨识UA 426 | 杂烩.removeView(杂烩.getChildAt(0))--隐藏进度显示 427 | 428 | 杂烩.onLongClick=function() 429 | hitTestResult = 杂烩.getHitTestResult() 430 | if 431 | (hitTestResult.getType() == 杂烩.HitTestResult.IMAGE_TYPE 432 | or 433 | hitTestResult.getType() == 杂烩.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) 434 | then 435 | picUrl = hitTestResult.getExtra() 436 | project = {"保存图片","设为壁纸"} 437 | actionListener = 438 | { 439 | onClick=function(dialog,which) 440 | if(which== 0) then 441 | 保存图片("杂烩")--函数在后面,这里是为了方便 442 | end 443 | if(which== 1) then 444 | setWallpaper(""..picUrl.."","杂烩-"..math.random(1,999999999999)..".png") 445 | end 446 | end 447 | } 448 | AlertDialog.Builder(this) 449 | .setItems(project,actionListener) 450 | .show(); 451 | end 452 | end 453 | 454 | 杂烩.setWebViewClient{ 455 | onPageStarted=function(view,url,favicon) 456 | 控件可见(subtitle) 457 | end, 458 | onPageFinished=function(view,url) 459 | 控件隐藏(subtitle) 460 | end} 461 | 462 | --插画归档设置 463 | 控件可见(subtitle) 464 | 插画.loadUrl("https://dp.chimon.me/fapp/old.php?sort=插画")--加载网页 465 | 插画.getSettings().setSupportZoom(false)--不支持缩放 466 | 插画.getSettings().setJavaScriptEnabled(true)--设置支持JS,备用 467 | 插画.getSettings().setUserAgentString("Tujian @Createlite");--辨识UA 468 | 插画.removeView(插画.getChildAt(0))--隐藏进度显示 469 | 470 | 插画.onLongClick=function() 471 | hitTestResult = 插画.getHitTestResult() 472 | if 473 | (hitTestResult.getType() == 插画.HitTestResult.IMAGE_TYPE 474 | or 475 | hitTestResult.getType() == 插画.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) 476 | then 477 | picUrl = hitTestResult.getExtra() 478 | project = {"保存图片","设为壁纸"} 479 | actionListener = 480 | { 481 | onClick=function(dialog,which) 482 | if(which== 0) 483 | then 484 | 保存图片("插画")--函数在后面,这里是为了方便 485 | end 486 | if(which== 1) then 487 | setWallpaper(""..picUrl.."","插画-"..math.random(1,999999999999)..".png") 488 | end 489 | end 490 | } 491 | AlertDialog.Builder(this) 492 | .setItems(project,actionListener) 493 | .show(); 494 | end 495 | end 496 | 497 | 插画.setWebViewClient{ 498 | onPageStarted=function(view,url,favicon) 499 | 控件可见(subtitle) 500 | end, 501 | onPageFinished=function(view,url) 502 | 控件隐藏(subtitle) 503 | end} 504 | 505 | --隐藏导航栏 506 | activity.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE) 507 | 508 | --保存图片函数 509 | function 保存图片(sort) 510 | 判定=Uri.parse(picUrl:sub(1,16)); 511 | if 判定 == "https://img.dpic"then 512 | if sdk <= 28 == false 513 | then 514 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 515 | url1=Uri.parse(picUrl:sub(1,53)); 516 | url=url1.."?p=0" 517 | request=DownloadManager.Request(url); 518 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 519 | request.setDestinationInExternalPublicDir("Android/media/ml.cerasus.pics/Tujian",""..sort.."-"..math.random(1,999999999999)..".png"); 520 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 521 | downloadManager.enqueue(request); 522 | SnakeBar("开始保存图片至此设备") 523 | else 524 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 525 | url1=Uri.parse(picUrl:sub(1,53)); 526 | url=url1.."?p=0" 527 | request=DownloadManager.Request(url); 528 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 529 | request.setDestinationInExternalPublicDir("Pictures/Tujian",""..sort.."-"..math.random(1,999999999999)..".png"); 530 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 531 | downloadManager.enqueue(request); 532 | SnakeBar("开始保存图片至此设备") 533 | end 534 | else 535 | if sdk <= 28 == false 536 | then 537 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 538 | url=Uri.parse(picUrl); 539 | request=DownloadManager.Request(url); 540 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 541 | request.setDestinationInExternalPublicDir("Android/media/ml.cerasus.pics/Tujian",""..sort.."-"..math.random(1,999999999999)..".png"); 542 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 543 | downloadManager.enqueue(request); 544 | SnakeBar("开始保存图片至此设备") 545 | else 546 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 547 | url=Uri.parse(picUrl); 548 | request=DownloadManager.Request(url); 549 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 550 | request.setDestinationInExternalPublicDir("Pictures/Tujian",""..sort.."-"..math.random(1,999999999999)..".png"); 551 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 552 | downloadManager.enqueue(request); 553 | SnakeBar("开始保存图片至此设备") 554 | end 555 | end 556 | end 557 | 558 | --设置壁纸函数 559 | function setWallpaper(url,title) --直接传入下载链接和标题就行 560 | require "import" 561 | import "com.androlua.Http" 562 | import "com.androlua.Ticker" 563 | import "android.widget.LinearLayout" 564 | import "java.net.URL" 565 | import "android.content.Intent" 566 | import "android.os.Environment" 567 | import "android.net.Uri" 568 | import "android.widget.TextView" 569 | import "android.app.WallpaperManager" 570 | import "android.app.*" 571 | import "java.io.*" 572 | dialog6= ProgressDialog(this) 573 | dialog6.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); 574 | --设置进度条的形式为水平进度条 575 | dialog6.setTitle("设置壁纸") 576 | dialog6.setCancelable(false)--设置是否可以通过点击Back键取消 577 | dialog6.setCanceledOnTouchOutside(false)--设置在点击Dialog外是否取消Dialog进度条 578 | filePath="/sdcard/Android/data/ml.cerasus.pics/cache/"..title.."" 579 | path=filePath 580 | function down(url,path) 581 | tt=Ticker() 582 | tt.Period=10 583 | tt.start() 584 | Http.download(url,path,nil,UA,function(code,content) 585 | if code==200 then 586 | import "java.io.*" --先导入io包 587 | file,err=io.open(path) 588 | --SnakeBar(content,file,err) 589 | if err==nil then 590 | tt.stop() 591 | --判断系统,需要导包 import"ml.cerasus.RomUtil" 592 | --EMUI 593 | if RomUtil.isHuaweiRom() then 594 | componentName = ComponentName("com.android.gallery3d","com.android.gallery3d.app.Wallpaper"); 595 | intent = Intent(Intent.ACTION_VIEW); 596 | intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); 597 | intent.setDataAndType(Uri.fromFile(File(path)), "image/*"); 598 | intent.putExtra("mimeType", "image/*"); 599 | intent.setComponent(componentName); 600 | activity.startActivity(intent); 601 | dialog6.hide() 602 | dialog6.dismiss() 603 | elseif RomUtil.isMiuiRom() then 604 | --MIUI 605 | componentName = ComponentName("com.android.thememanager", "com.android.thememanager.activity.WallpaperDetailActivity"); 606 | intent = Intent("miui.intent.action.START_WALLPAPER_DETAIL"); 607 | intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); 608 | intent.setDataAndType(Uri.fromFile(File(path)),"image/*"); 609 | intent.putExtra("mimeType","image/*"); 610 | intent.setComponent(componentName); 611 | activity.startActivity(intent); intent = Intent(Intent.ACTION_ATTACH_DATA); 612 | dialog6.hide() 613 | dialog6.dismiss() 614 | else 615 | --其他 616 | local intent = Intent(Intent.ACTION_ATTACH_DATA); 617 | intent.setDataAndType(Uri.fromFile(File(path)),'image/*'); 618 | activity.startActivity(intent); 619 | dialog6.hide() 620 | dialog6.dismiss() 621 | end 622 | end 623 | end 624 | end) 625 | function tt.onTick() 626 | f=io.open(path,"r") 627 | if f~=nil then 628 | len=f:read("a") 629 | s=#len/lens 630 | dialog6.setProgress(s*100) 631 | end 632 | end 633 | end 634 | function download(url,path) 635 | dialog6.show() 636 | import "java.net.URL" 637 | realUrl = URL(url) 638 | -- 打开和URL之间的连接 639 | con = realUrl.openConnection(); 640 | -- 设置通用的请求属性 641 | con.setRequestProperty("accept", "*/*"); 642 | con.setRequestProperty("connection", "Keep-Alive"); 643 | con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); 644 | lens=con.getContentLength() 645 | down(url,path) 646 | end 647 | download(url,filePath) 648 | end 649 | 650 | --针对(可能)锤子水波纹问题 651 | if sdk < 28 then 652 | activity.setTheme(android.R.style.Theme_Material_Light) 653 | end 654 | --控件点击波纹函数 655 | function ControlsRipple(id,Color) 656 | import 'android.graphics.drawable.*' 657 | import "aS,ndroid.content.res.ColorStateList" 658 | local attrsArray = {android.R.attr.selectableItemBackgroundBorderless} 659 | local typedArray =activity.obtainStyledAttributes(attrsArray) 660 | ripple=typedArray.getResourceId(0,0) 661 | Pretend=activity.Resources.getDrawable(ripple) 662 | Pretend.setColor(ColorStateList(int[0].class{int{}},int{Color})) 663 | id.setBackground(Pretend.setColor(ColorStateList(int[0].class{int{}},int{Color}))) 664 | end 665 | 666 | --Snakebar函数,具体代码请见根目录Snakebar.lua 667 | function SnakeBar(fill) 668 | SnackerBar.build() 669 | :msg(fill) 670 | :actionText("") 671 | :action(function() end) 672 | :show() 673 | end 674 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/icon.png -------------------------------------------------------------------------------- /imports.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/imports.lua -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | appname="Tujian X" 2 | appver="3.2.0" 3 | appcode="190608" 4 | appsdk="21" 5 | path_pattern="" 6 | packagename="ml.cerasus.pics" 7 | theme="Theme_DeviceDefault_Light" 8 | app_key="" 9 | app_channel="" 10 | developer="Createlite" 11 | description="Tujian X Official Application" 12 | debugmode=false 13 | user_permission={ 14 | "INTERNET", 15 | "REQUEST_INSTALL_PACKAGES", 16 | "WRITE_EXTERNAL_STORAGE" 17 | } 18 | -------------------------------------------------------------------------------- /layout.aly: -------------------------------------------------------------------------------- 1 | { 2 | LinearLayout, 3 | orientation="vertical", 4 | layout_width="fill", 5 | layout_height="fill", 6 | gravity="center", 7 | } 8 | -------------------------------------------------------------------------------- /libs/RomUtil.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/libs/RomUtil.dex -------------------------------------------------------------------------------- /libs/Tujian.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/libs/Tujian.dex -------------------------------------------------------------------------------- /libs/oat/arm/RomUtil.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/libs/oat/arm/RomUtil.odex -------------------------------------------------------------------------------- /libs/oat/arm/RomUtil.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/libs/oat/arm/RomUtil.vdex -------------------------------------------------------------------------------- /libs/oat/arm/Tujian.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/libs/oat/arm/Tujian.odex -------------------------------------------------------------------------------- /libs/oat/arm/Tujian.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/libs/oat/arm/Tujian.vdex -------------------------------------------------------------------------------- /main.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Copyright [2018-2019] [Tujian X @Createlite] 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ]] 16 | require "import" 17 | import "android.app.*" 18 | import "android.os.*" 19 | import "android.widget.*" 20 | import "android.view.*" 21 | import "android.graphics.ColorFilter" 22 | import "android.view.WindowManager" 23 | import "android.content.pm.ActivityInfo" 24 | import "android.content.pm.PackageManager" 25 | import "android.Manifest" 26 | import "muk" 27 | 28 | --activity.setTitle('MLua') 29 | --activity.setTheme(android.R.style.Theme_DeviceDefault_Light) 30 | activity.setContentView(loadlayout("layout")) 31 | --设置视图("layout") 32 | 33 | --隐藏虚拟导航栏 34 | activity.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE) 35 | 36 | sdk = tointeger(Build.VERSION.SDK) 37 | 38 | 39 | --针对(可能)锤子水波纹问题 40 | if sdk < 28 then 41 | activity.setTheme(android.R.style.Theme_Material_Light) 42 | end 43 | 44 | --检测是否启动过了,打开welcome.lua 45 | --判断你的第一次 46 | import 'android.content.SharedPreferences' 47 | local Package_Name='ml.cerasus.pics'--你的包名 48 | local setting = activity.getSharedPreferences(Package_Name,0); 49 | local user_first = setting.getBoolean('FIRST_OPEN',true); 50 | if (user_first) then 51 | setting.edit().putBoolean('FIRST_OPEN',false).commit(); 52 | if tointeger(sdk) <= 28 53 | then 54 | 申请权限({Manifest.permission.WRITE_EXTERNAL_STORAGE}) 55 | end 56 | activity.newActivity('welcome/main.lua') 57 | activity.finish() 58 | function onNewIntent(intent) 59 | --获得传递过来的数据并转化为字符串 60 | local uriString = tostring(intent.getData()) 61 | if "num1"==uriString then 62 | activity.newActivity("zahui/main.lua",{"随机"}) 63 | activity.finish() 64 | elseif "num2"==uriString then 65 | activity.newActivity("zahui/main.lua",{"插画"}) 66 | activity.finish() 67 | elseif "num3"==uriString then 68 | activity.newActivity("zahui/main.lua",{"杂烩"}) 69 | activity.finish() 70 | else 71 | activity.newActivity("zahui/main.lua",{nil}) 72 | activity.finish() 73 | end 74 | end 75 | return true 76 | else 77 | function onNewIntent(intent) 78 | --获得传递过来的数据并转化为字符串 79 | local uriString = tostring(intent.getData()) 80 | if "num1"==uriString then 81 | activity.newActivity("zahui/main.lua",{"随机"}) 82 | activity.finish() 83 | elseif "num2"==uriString then 84 | activity.newActivity("zahui/main.lua",{"插画"}) 85 | activity.finish() 86 | elseif "num3"==uriString then 87 | activity.newActivity("zahui/main.lua",{"杂烩"}) 88 | activity.finish() 89 | else 90 | activity.newActivity("zahui/main.lua",{nil}) 91 | activity.finish() 92 | end 93 | end 94 | return false 95 | end 96 | 97 | 98 | activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)--禁止横屏 99 | 100 | if Build.VERSION.SDK_INT >= 21 then 101 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS).setStatusBarColor(0xff757575); 102 | end 103 | -------------------------------------------------------------------------------- /muk.lua: -------------------------------------------------------------------------------- 1 | require "import" 2 | import "imports" 3 | 4 | import "android.app.*" 5 | import "android.os.*" 6 | import "android.widget.*" 7 | 8 | import "android.view.*" 9 | import "android.view.animation.*" 10 | import "android.view.animation.Animation$AnimationListener" 11 | import "android.view.inputmethod.InputMethodManager" 12 | 13 | import "android.animation.*" 14 | 15 | import "android.net.*" 16 | 17 | import "android.text.*" 18 | import "android.text.style.*" 19 | 20 | import "android.content.*" 21 | import "android.content.res.*" 22 | import "android.content.pm.PackageManager" 23 | import "android.content.pm.ApplicationInfo" 24 | import "android.content.ContentResolver" 25 | 26 | import "android.graphics.*" 27 | import "android.graphics.Matrix" 28 | import "android.graphics.Bitmap" 29 | import "android.graphics.BitmapFactory" 30 | import "android.graphics.Typeface" 31 | import "android.graphics.drawable.*" 32 | import "android.graphics.PorterDuff" 33 | import "android.graphics.PorterDuffColorFilter" 34 | 35 | import "android.renderscript.*" 36 | import "android.renderscript.Element" 37 | import "android.renderscript.Allocation" 38 | import "android.renderscript.ScriptIntrinsicBlur" 39 | import "android.renderscript.RenderScript" 40 | 41 | import "java.lang.Math" 42 | 43 | import "java.security.*" 44 | 45 | import "java.io.*" 46 | import "java.io.File" 47 | import "java.io.InputStream" 48 | 49 | import "java.util.*" 50 | 51 | import "java.net.URL" 52 | 53 | import "android.content.res.ColorStateList" 54 | import "android.content.pm.PackageManager" 55 | import "android.content.Intent" 56 | import "android.net.Uri" 57 | import "android.util.Base64" 58 | import "http" 59 | 60 | import "androidx.*" 61 | import "androidx.core.app.ActivityCompat" 62 | 63 | import "android.webkit.WebSettings" 64 | import "android.webkit.MimeTypeMap" 65 | 66 | import "android.provider.Settings" 67 | 68 | import "android.Manifest" 69 | 70 | 71 | --MUK的函数-- 72 | function 状态栏颜色(n) 73 | window=activity.getWindow() 74 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) 75 | window.setStatusBarColor(n) 76 | if n==0x3f000000 then 77 | if 获取SDK版本()>=23 then 78 | window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) 79 | window.setStatusBarColor(0xffffffff) 80 | end 81 | end 82 | end 83 | 84 | function 主题(str) 85 | --str="夜" 86 | 全局主题值=str 87 | if 全局主题值=="日" then 88 | primaryc="#448aff" 89 | secondaryc="#fdd835" 90 | textc="#212121" 91 | stextc="#424242" 92 | backgroundc="#ffffffff" 93 | barbackgroundc="#efffffff" 94 | cardbackc="#ffffffff" 95 | viewshaderc="#00000000" 96 | grayc="#ECEDF1" 97 | 状态栏颜色(0x3f000000) 98 | activity.setTheme(android.R.style.Theme_DeviceDefault_Light_NoActionBar) 99 | elseif 全局主题值=="夜" then 100 | primaryc="#ff3368c0" 101 | secondaryc="#ffbfa328" 102 | textc="#808080" 103 | stextc="#666666" 104 | backgroundc="#ff191919" 105 | barbackgroundc="#ef191919" 106 | cardbackc="#ff212121" 107 | viewshaderc="#80000000" 108 | grayc="#212121" 109 | 状态栏颜色(0xff191919) 110 | activity.setTheme(android.R.style.Theme_DeviceDefault_NoActionBar) 111 | end 112 | end 113 | 114 | function 设置主题(str) 115 | activity.setTheme(str) 116 | end 117 | 118 | function 转0x(j) 119 | if #j==7 then 120 | jj=j:match("#(.+)") 121 | jjj=tonumber("0xff"..jj) 122 | else 123 | jj=j:match("#(.+)") 124 | jjj=tonumber("0x"..jj) 125 | end 126 | return jjj 127 | end 128 | 129 | function 判断悬浮窗权限() 130 | if (Build.VERSION.SDK_INT >= 23 and not Settings.canDrawOverlays(this)) then 131 | return false 132 | elseif Build.VERSION.SDK_INT < 23 then 133 | return "" 134 | else 135 | return true 136 | end 137 | end 138 | 139 | function 获取悬浮窗权限() 140 | intent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION); 141 | intent.setData(Uri.parse("package:" .. activity.getPackageName())); 142 | activity.startActivityForResult(intent, 100); 143 | end 144 | 145 | --[[if Settings.canDrawOverlays(this)==false then 146 | 147 | intent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION); 148 | intent.setData(Uri.parse("package:" .. activity.getPackageName())); 149 | this.startActivity(intent); 150 | 151 | 双按钮对话框("烦人但是必不可少的权限(; ・`д・´)","MUKSK的正常运行需要以下权限:\n悬浮窗权限(显示步骤教程)\n存储权限(保存数据)","开启权限","退出",function() 152 | 获取权限() 153 | 权限=1 154 | end,function() 155 | 关闭对话框(an) 156 | 关闭页面() 157 | end,0) 158 | 159 | end]] 160 | 161 | function 安装apk(安装包路径) 162 | import "android.content.Intent" 163 | import "android.net.Uri" 164 | intent = Intent(Intent.ACTION_VIEW) 165 | intent.setDataAndType(Uri.parse("file:///"..安装包路径), "application/vnd.android.package-archive") 166 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 167 | activity.startActivity(intent) 168 | end 169 | 170 | function 浏览器打开(pageurl) 171 | import "android.content.Intent" 172 | import "android.net.Uri" 173 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(pageurl)) 174 | activity.startActivity(viewIntent) 175 | end 176 | 177 | function 设置图片(preview,url) 178 | preview.setImageBitmap(loadbitmap(url)) 179 | end 180 | 181 | function 字体(t) 182 | return Typeface.createFromFile(File(activity.getLuaDir().."/res/"..t..".ttf")) 183 | end 184 | 185 | function 开关颜色(id,color,color2) 186 | id.ThumbDrawable.setColorFilter(PorterDuffColorFilter(转0x(color),PorterDuff.Mode.SRC_ATOP)) 187 | id.TrackDrawable.setColorFilter(PorterDuffColorFilter(转0x(color2),PorterDuff.Mode.SRC_ATOP)) 188 | end 189 | 190 | 191 | function 提示(t) 192 | local tsbj={ 193 | LinearLayout; 194 | layout_width="-1"; 195 | layout_height="-1"; 196 | gravity="center"; 197 | --background="#ffffffff"; 198 | --padding="8dp"; 199 | --paddingTop="64dp"; 200 | { 201 | CardView; 202 | layout_width="-1"; 203 | layout_height="-2"; 204 | Elevation="0"; 205 | layout_margin="8dp"; 206 | radius="4dp"; 207 | background="#ef424242"; 208 | { 209 | LinearLayout; 210 | layout_width=activity.getWidth()-16; 211 | layout_height="-1"; 212 | { 213 | TextView; 214 | layout_width="-1"; 215 | layout_height="-1"; 216 | textSize="14sp"; 217 | paddingRight="16dp"; 218 | paddingLeft="16dp"; 219 | paddingTop="12dp"; 220 | paddingBottom="12dp"; 221 | gravity="center"; 222 | Text=t; 223 | textColor="#ffffffff"; 224 | }; 225 | }; 226 | }; 227 | }; 228 | Toast.makeText(activity,t,Toast.LENGTH_LONG).setGravity(Gravity.BOTTOM|Gravity.CENTER, 0, 0).setView(loadlayout(tsbj)).show() 229 | end 230 | 231 | local ripple = activity.obtainStyledAttributes({android.R.attr.selectableItemBackgroundBorderless}).getResourceId(0,0) 232 | local ripples = activity.obtainStyledAttributes({android.R.attr.selectableItemBackground}).getResourceId(0,0) 233 | 234 | function 波纹(id,lx,numfy) 235 | if type(lx)=="number" then 236 | for index,content in pairs(id) do 237 | if numfy=="方" then 238 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{lx}))) 239 | elseif numfy=="圆" 240 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripple).setColor(ColorStateList(int[0].class{int{}},int{lx}))) 241 | end 242 | end 243 | else 244 | for index,content in pairs(id) do 245 | if lx=="圆白" then 246 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripple).setColor(ColorStateList(int[0].class{int{}},int{0x3fffffff}))) 247 | end 248 | if lx=="方白" then 249 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{0x3fffffff}))) 250 | end 251 | if lx=="圆黑" then 252 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripple).setColor(ColorStateList(int[0].class{int{}},int{0x3f000000}))) 253 | end 254 | if lx=="方黑" then 255 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{0x3f000000}))) 256 | end 257 | if lx=="圆主题" then 258 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripple).setColor(ColorStateList(int[0].class{int{}},int{0x3f448aff}))) 259 | end 260 | if lx=="方主题" then 261 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{0x3f448aff}))) 262 | end 263 | if lx=="圆自适应" then 264 | if 全局主题值=="日" then 265 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripple).setColor(ColorStateList(int[0].class{int{}},int{0x3f000000}))) 266 | else 267 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripple).setColor(ColorStateList(int[0].class{int{}},int{0x3fffffff}))) 268 | end 269 | end 270 | if lx=="方自适应" then 271 | if 全局主题值=="日" then 272 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{0x3f000000}))) 273 | else 274 | content.setBackgroundDrawable(activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{0x3fffffff}))) 275 | end 276 | end 277 | end 278 | end 279 | end 280 | 281 | function 双按钮对话框(bt,nr,qd,qx,qdnr,qxnr,gb) 282 | if 全局主题值=="日" then 283 | bwz=0x3f000000 284 | else 285 | bwz=0x3fffffff 286 | end 287 | 288 | local gd2 = GradientDrawable() 289 | gd2.setColor(转0x(backgroundc))--填充 290 | local radius=dp2px(16) 291 | gd2.setCornerRadii({radius,radius,radius,radius,0,0,0,0})--圆角 292 | gd2.setShape(0)--形状,0矩形,1圆形,2线,3环形 293 | local dann={ 294 | LinearLayout; 295 | layout_width="-1"; 296 | layout_height="-1"; 297 | { 298 | LinearLayout; 299 | orientation="vertical"; 300 | layout_width="-1"; 301 | layout_height="-2"; 302 | Elevation="4dp"; 303 | BackgroundDrawable=gd2; 304 | id="ztbj"; 305 | { 306 | TextView; 307 | layout_width="-1"; 308 | layout_height="-2"; 309 | textSize="20sp"; 310 | layout_marginTop="24dp"; 311 | layout_marginLeft="24dp"; 312 | layout_marginRight="24dp"; 313 | Text=bt; 314 | textColor=primaryc; 315 | }; 316 | { 317 | ScrollView; 318 | layout_width="-1"; 319 | layout_height="-1"; 320 | { 321 | TextView; 322 | layout_width="-1"; 323 | layout_height="-2"; 324 | textSize="14sp"; 325 | layout_marginTop="8dp"; 326 | layout_marginLeft="24dp"; 327 | layout_marginRight="24dp"; 328 | layout_marginBottom="8dp"; 329 | Text=nr; 330 | textColor=textc; 331 | }; 332 | }; 333 | { 334 | LinearLayout; 335 | orientation="horizontal"; 336 | layout_width="-1"; 337 | layout_height="-2"; 338 | gravity="right|center"; 339 | { 340 | CardView; 341 | layout_width="-2"; 342 | layout_height="-2"; 343 | radius="2dp"; 344 | background="#00000000"; 345 | layout_marginTop="8dp"; 346 | layout_marginLeft="8dp"; 347 | layout_marginBottom="24dp"; 348 | Elevation="0"; 349 | onClick=qxnr; 350 | { 351 | TextView; 352 | layout_width="-1"; 353 | layout_height="-2"; 354 | textSize="16sp"; 355 | paddingRight="16dp"; 356 | paddingLeft="16dp"; 357 | paddingTop="8dp"; 358 | paddingBottom="8dp"; 359 | Text=qx; 360 | textColor=stextc; 361 | BackgroundDrawable=activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{bwz})); 362 | }; 363 | }; 364 | { 365 | CardView; 366 | layout_width="-2"; 367 | layout_height="-2"; 368 | radius="4dp"; 369 | background=primaryc; 370 | layout_marginTop="8dp"; 371 | layout_marginLeft="8dp"; 372 | layout_marginRight="24dp"; 373 | layout_marginBottom="24dp"; 374 | Elevation="1dp"; 375 | onClick=qdnr; 376 | { 377 | TextView; 378 | layout_width="-1"; 379 | layout_height="-2"; 380 | textSize="16sp"; 381 | paddingRight="16dp"; 382 | paddingLeft="16dp"; 383 | paddingTop="8dp"; 384 | paddingBottom="8dp"; 385 | Text=qd; 386 | textColor=backgroundc; 387 | BackgroundDrawable=activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{bwz})); 388 | }; 389 | }; 390 | }; 391 | }; 392 | }; 393 | 394 | dl=AlertDialog.Builder(activity) 395 | dl.setView(loadlayout(dann)) 396 | if gb==0 then 397 | dl.setCancelable(false) 398 | end 399 | an=dl.show() 400 | window = an.getWindow(); 401 | window.setBackgroundDrawable(ColorDrawable(0x00ffffff)); 402 | wlp = window.getAttributes(); 403 | wlp.gravity = Gravity.BOTTOM; 404 | wlp.width = WindowManager.LayoutParams.MATCH_PARENT; 405 | wlp.height = WindowManager.LayoutParams.WRAP_CONTENT; 406 | window.setAttributes(wlp); 407 | end 408 | 409 | function 单按钮对话框(bt,nr,qd,qdnr,gb) 410 | if 全局主题值=="日" then 411 | bwz=0x3f000000 412 | else 413 | bwz=0x3fffffff 414 | end 415 | 416 | local gd2 = GradientDrawable() 417 | gd2.setColor(转0x(backgroundc))--填充 418 | local radius=dp2px(16) 419 | gd2.setCornerRadii({radius,radius,radius,radius,0,0,0,0})--圆角 420 | gd2.setShape(0)--形状,0矩形,1圆形,2线,3环形 421 | local dann={ 422 | LinearLayout; 423 | layout_width="-1"; 424 | layout_height="-1"; 425 | { 426 | LinearLayout; 427 | orientation="vertical"; 428 | layout_width="-1"; 429 | layout_height="-2"; 430 | Elevation="4dp"; 431 | BackgroundDrawable=gd2; 432 | id="ztbj"; 433 | { 434 | TextView; 435 | layout_width="-1"; 436 | layout_height="-2"; 437 | textSize="20sp"; 438 | layout_marginTop="24dp"; 439 | layout_marginLeft="24dp"; 440 | layout_marginRight="24dp"; 441 | Text=bt; 442 | textColor=primaryc; 443 | }; 444 | { 445 | RelativeLayout; 446 | layout_width="-1"; 447 | layout_height="-1"; 448 | { 449 | ScrollView; 450 | layout_width="-1"; 451 | layout_height="-1"; 452 | layout_marginBottom=dp2px(24+8+16+8)+sp2px(16); 453 | { 454 | TextView; 455 | layout_width="-1"; 456 | layout_height="-2"; 457 | textSize="14sp"; 458 | layout_marginTop="8dp"; 459 | layout_marginLeft="24dp"; 460 | layout_marginRight="24dp"; 461 | layout_marginBottom="8dp"; 462 | Text=nr; 463 | textColor=textc; 464 | }; 465 | }; 466 | { 467 | LinearLayout; 468 | layout_width="-1"; 469 | layout_height="-1"; 470 | gravity="bottom|center"; 471 | { 472 | LinearLayout; 473 | orientation="horizontal"; 474 | layout_width="-1"; 475 | layout_height="-2"; 476 | gravity="right|center"; 477 | background=barbackgroundc; 478 | { 479 | CardView;--24+8 480 | layout_width="-2"; 481 | layout_height="-2"; 482 | radius="4dp"; 483 | background=primaryc; 484 | layout_marginTop="8dp"; 485 | layout_marginLeft="8dp"; 486 | layout_marginRight="24dp"; 487 | layout_marginBottom="24dp"; 488 | Elevation="1dp"; 489 | onClick=qdnr; 490 | { 491 | TextView;--16+8 492 | layout_width="-1"; 493 | layout_height="-2"; 494 | textSize="16sp"; 495 | paddingRight="16dp"; 496 | paddingLeft="16dp"; 497 | paddingTop="8dp"; 498 | paddingBottom="8dp"; 499 | Text=qd; 500 | textColor=backgroundc; 501 | BackgroundDrawable=activity.Resources.getDrawable(ripples).setColor(ColorStateList(int[0].class{int{}},int{bwz})); 502 | }; 503 | }; 504 | }; 505 | }; 506 | }; 507 | }; 508 | }; 509 | 510 | dl=AlertDialog.Builder(activity) 511 | dl.setView(loadlayout(dann)) 512 | if gb==0 then 513 | dl.setCancelable(false) 514 | end 515 | an=dl.show() 516 | window = an.getWindow(); 517 | window.setBackgroundDrawable(ColorDrawable(0x00ffffff)); 518 | wlp = window.getAttributes(); 519 | wlp.gravity = Gravity.BOTTOM; 520 | wlp.width = WindowManager.LayoutParams.MATCH_PARENT; 521 | wlp.height = WindowManager.LayoutParams.WRAP_CONTENT; 522 | window.setAttributes(wlp); 523 | end 524 | --/MUK函数-- 525 | 526 | --文件操作-- 527 | function 写入文件(路径,内容) 528 | xpcall(function() 529 | f=File(tostring(File(tostring(路径)).getParentFile())).mkdirs() 530 | io.open(tostring(路径),"w"):write(tostring(内容)):close() 531 | end,function() 532 | 提示("写入文件 "..路径.." 失败") 533 | end) 534 | end 535 | 536 | function 读取文件(路径) 537 | if 文件是否存在(路径) then 538 | rtn=io.open(路径):read("*a") 539 | else 540 | rtn="" 541 | end 542 | return rtn 543 | end 544 | 545 | function 复制文件(from,to) 546 | xpcall(function() 547 | LuaUtil.copyDir(from,to) 548 | end,function() 549 | 提示("复制文件 从 "..from.." 到 "..to.." 失败") 550 | end) 551 | end 552 | 553 | function 创建文件夹(file) 554 | xpcall(function() 555 | File(file).mkdir() 556 | end,function() 557 | 提示("创建文件夹 "..file.." 失败") 558 | end) 559 | end 560 | 561 | function 创建文件(file) 562 | xpcall(function() 563 | File(file).createNewFile() 564 | end,function() 565 | 提示("创建文件 "..file.." 失败") 566 | end) 567 | end 568 | 569 | function 创建多级文件夹(file) 570 | xpcall(function() 571 | File(file).mkdirs() 572 | end,function() 573 | 提示("创建文件夹 "..file.." 失败") 574 | end) 575 | end 576 | 577 | function 文件是否存在(file) 578 | return File(file).exists() 579 | end 580 | 581 | function 删除文件(file) 582 | xpcall(function() 583 | LuaUtil.rmDir(File(file)) 584 | end,function() 585 | 提示("删除文件(夹) "..file.." 失败") 586 | end) 587 | end 588 | 589 | function 文件修改时间(path) 590 | f = File(path); 591 | time = f.lastModified() 592 | return time 593 | end 594 | 595 | function 内置存储路径(t) 596 | return Environment.getExternalStorageDirectory().toString().."/"..t 597 | end 598 | 599 | function 解压缩(压缩路径,解压缩路径) 600 | xpcall(function() 601 | ZipUtil.unzip(压缩路径,解压缩路径) 602 | end,function() 603 | 提示("解压文件 "..压缩路径.." 失败") 604 | end) 605 | end 606 | 607 | function 压缩(原路径,压缩路径,名称) 608 | xpcall(function() 609 | LuaUtil.zip(原路径,压缩路径,名称) 610 | end,function() 611 | 提示("压缩文件 "..原路径.." 至 "..压缩路径.."/"..名称.." 失败") 612 | end) 613 | end 614 | 615 | function 重命名文件(旧,新) 616 | xpcall(function() 617 | File(旧).renameTo(File(新)) 618 | end,function() 619 | 提示("重命名文件 "..旧.." 失败") 620 | end) 621 | end 622 | 623 | function 移动文件(旧,新) 624 | xpcall(function() 625 | File(旧).renameTo(File(新)) 626 | end,function() 627 | 提示("移动文件 "..旧.." 至 "..新.." 失败") 628 | end) 629 | end 630 | 631 | --/文件操作-- 632 | 633 | --获取设备-- 634 | function 获取设备标识码() 635 | import "android.provider.Settings$Secure" 636 | return Secure.getString(activity.getContentResolver(), Secure.ANDROID_ID) 637 | end 638 | 639 | function 获取IMEI() 640 | import "android.content.Context" 641 | return activity.getSystemService(Context.TELEPHONY_SERVICE).getDeviceId() 642 | end 643 | 644 | function 获取状态栏高度() 645 | return activity.getResources().getDimensionPixelSize(luajava.bindClass("com.android.internal.R$dimen")().status_bar_height) 646 | end 647 | 648 | function 获取设备型号() 649 | return Build.MODEL 650 | end 651 | 652 | function 获取ROM类型() 653 | return string.upper(Build.MANUFACTURER) 654 | end 655 | 656 | function 获取SDK版本() 657 | return tonumber(Build.VERSION.SDK) 658 | end 659 | 660 | function 获取安卓版本() 661 | return Build.VERSION.RELEASE 662 | end 663 | 664 | function 获取屏幕尺寸() 665 | import "android.util.DisplayMetrics" 666 | local dm = DisplayMetrics(); 667 | activity.getWindowManager().getDefaultDisplay().getMetrics(dm); 668 | diagonalPixels = Math.sqrt(Math.pow(dm.widthPixels, 2) + Math.pow(dm.heightPixels, 2)); 669 | return diagonalPixels / (160 * dm.density); 670 | end 671 | 672 | function 获取手机内置存储剩余空间() 673 | fs = StatFs(Environment.getDataDirectory().getPath()) 674 | return 格式化文件大小(fs.getAvailableBytes()) 675 | end 676 | 677 | function 获取手机内置存储空间() 678 | path = Environment.getExternalStorageDirectory() 679 | stat = StatFs(path.getPath()) 680 | blockSize = stat.getBlockSize() 681 | totalBlocks = stat.getBlockCount() 682 | return 格式化文件大小(blockSize * totalBlocks) 683 | end 684 | --/获取设备-- 685 | 686 | --一些函数-- 687 | function 格式化文件大小(fileSize) 688 | if (fileSize < 1024) then 689 | return fileSize + 'B'; 690 | elseif (fileSize < (1024*1024)) then 691 | temp = fileSize / 1024; 692 | --temp = temp.toFixed(2); 693 | temp=四舍五入(temp,2) 694 | return temp .. 'KB'; 695 | elseif (fileSize < (1024*1024*1024)) then 696 | temp = fileSize / (1024*1024); 697 | --temp = temp.toFixed(2); 698 | temp=四舍五入(temp,2) 699 | return temp .. 'MB'; 700 | else 701 | temp = fileSize / (1024*1024*1024); 702 | --temp = temp.toFixed(2); 703 | temp=四舍五入(temp,2) 704 | return temp .. 'GB'; 705 | end 706 | end 707 | 708 | function 四舍五入(num,n) 709 | local n=n-1 710 | ws="0" 711 | for i=0,n do 712 | if ws=="0" then 713 | ws="0." 714 | end 715 | ws=ws.."0" 716 | end 717 | import "java.text.DecimalFormat" 718 | import "android.icu.text.DecimalFormat" 719 | formatter = DecimalFormat(ws); 720 | local s = formatter.format(num); 721 | ws=nil 722 | return s; 723 | end 724 | 725 | function 获取视频第一帧(path) 726 | import "android.media.MediaMetadataRetriever" 727 | media = MediaMetadataRetriever() 728 | media.setDataSource(tostring(path)) 729 | return media.getFrameAtTime() 730 | end 731 | 732 | function 背景圆角(view,InsideColor,radiu) 733 | import "android.graphics.drawable.GradientDrawable" 734 | drawable = GradientDrawable() 735 | drawable.setShape(GradientDrawable.RECTANGLE) 736 | drawable.setColor(InsideColor) 737 | drawable.setCornerRadii({radiu,radiu,radiu,radiu,radiu,radiu,radiu,radiu}); 738 | view.setBackgroundDrawable(drawable) 739 | end 740 | 741 | function 匹配汉字(s) 742 | local ss = {} 743 | for k = 1, #s do 744 | local c = string.byte(s,k) 745 | if not c then break end 746 | if (c>=48 and c<=57) or (c>= 65 and c<=90) or (c>=97 and c<=122) then 747 | if not string.char(c):find("%w") then 748 | table.insert(ss, string.char(c)) 749 | end 750 | elseif c>=228 and c<=233 then 751 | local c1 = string.byte(s,k+1) 752 | local c2 = string.byte(s,k+2) 753 | if c1 and c2 then 754 | local a1,a2,a3,a4 = 128,191,128,191 755 | if c == 228 then a1 = 184 756 | elseif c == 233 then a2,a4 = 190,c1 ~= 190 and 191 or 165 757 | end 758 | if c1>=a1 and c1<=a2 and c2>=a3 and c2<=a4 then 759 | k = k + 2 760 | table.insert(ss, string.char(c,c1,c2)) 761 | end 762 | end 763 | end 764 | end 765 | return table.concat(ss) 766 | end 767 | 768 | function px2dp(pxValue) 769 | local scale = this.getResources().getDisplayMetrics().density 770 | return (pxValue / scale + 0.5) 771 | end 772 | 773 | function dp2px(dpValue) 774 | local scale = this.getResources().getDisplayMetrics().density 775 | return (dpValue * scale + 0.5) 776 | end 777 | 778 | function sp2px(spValue) 779 | local fontScale = this.getResources().getDisplayMetrics().scaledDensity 780 | return (spValue * fontScale + 0.5) 781 | end 782 | 783 | function 随机数(最小值,最大值) 784 | return math.random(最小值,最大值) 785 | end 786 | 787 | function 静态渐变(a,b,id,fx) 788 | if fx=="竖" then 789 | fx=GradientDrawable.Orientation.TOP_BOTTOM 790 | end 791 | if fx=="横" then 792 | fx=GradientDrawable.Orientation.LEFT_RIGHT 793 | end 794 | drawable = GradientDrawable(fx,{ 795 | a,--右色 796 | b,--左色 797 | }); 798 | id.setBackgroundDrawable(drawable) 799 | end 800 | 801 | function 对话框按钮颜色(dialog,button,WidgetColor) 802 | if button==1 then 803 | dialog.getButton(dialog.BUTTON_POSITIVE).setTextColor(WidgetColor) 804 | elseif button==2 then 805 | dialog.getButton(dialog.BUTTON_NEGATIVE).setTextColor(WidgetColor) 806 | elseif button==3 then 807 | dialog.getButton(dialog.BUTTON_NEUTRAL).setTextColor(WidgetColor) 808 | end 809 | end 810 | 811 | function 关闭对话框(an) 812 | an.dismiss() 813 | end 814 | 815 | function 检测键盘状态() 816 | imm = activity.getSystemService(Context.INPUT_METHOD_SERVICE) 817 | isOpen=imm.isActive() 818 | return isOpen==true or false 819 | end 820 | 821 | function 隐藏键盘() 822 | activity.getSystemService(INPUT_METHOD_SERVICE).hideSoftInputFromWindow(WidgetSearchActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS) 823 | end 824 | 825 | function 显示键盘(id) 826 | activity.getSystemService(INPUT_METHOD_SERVICE).showSoftInput(id, 0) 827 | end 828 | 829 | function 关闭页面() 830 | activity.finish() 831 | end 832 | 833 | function 复制文本(文本) 834 | activity.getSystemService(Context.CLIPBOARD_SERVICE).setText(文本) 835 | end 836 | 837 | function QQ群(h) 838 | url="mqqapi://card/show_pslcard?src_type=internal&version=1&uin="..h.."&card_type=group&source=qrcode" 839 | activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) 840 | end 841 | 842 | function QQ(h) 843 | url="mqqapi://card/show_pslcard?src_type=internal&source=sharecard&version=1&uin="..h 844 | activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) 845 | end 846 | 847 | function 全屏() 848 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN) 849 | end 850 | 851 | function 退出全屏() 852 | activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN) 853 | end 854 | 855 | function 图片高斯模糊(id,tp,radius1,radius2) 856 | function blur( context, bitmap, blurRadius) 857 | renderScript = RenderScript.create(context); 858 | blurScript = ScriptIntrinsicBlur.create(renderScript, Element.U8_4(renderScript)); 859 | inAllocation = Allocation.createFromBitmap(renderScript, bitmap); 860 | outputBitmap = bitmap; 861 | outAllocation = Allocation.createTyped(renderScript, inAllocation.getType()); 862 | blurScript.setRadius(blurRadius); 863 | blurScript.setInput(inAllocation); 864 | blurScript.forEach(outAllocation); 865 | outAllocation.copyTo(outputBitmap); 866 | inAllocation.destroy(); 867 | outAllocation.destroy(); 868 | renderScript.destroy(); 869 | blurScript.destroy(); 870 | return outputBitmap; 871 | end 872 | bitmap=loadbitmap(tp) 873 | function blurAndZoom(context,bitmap,blurRadius,scale) 874 | return zoomBitmap(blur(context,zoomBitmap(bitmap, 1 / scale), blurRadius), scale); 875 | end 876 | 877 | function zoomBitmap(bitmap,scale) 878 | w = bitmap.getWidth(); 879 | h = bitmap.getHeight(); 880 | matrix = Matrix(); 881 | matrix.postScale(scale, scale); 882 | bitmap = Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true); 883 | return bitmap; 884 | end 885 | 886 | 887 | 加深后的图片=blurAndZoom(activity,bitmap,radius1,radius2) 888 | id.setImageBitmap(加深后的图片) 889 | end 890 | 891 | function 获取应用信息(archiveFilePath) 892 | pm = activity.getPackageManager() 893 | info = pm.getPackageInfo(archiveFilePath, PackageManager.GET_ACTIVITIES); 894 | if info ~= nil then 895 | appInfo = info.applicationInfo; 896 | appName = tostring(pm.getApplicationLabel(appInfo)) 897 | packageName = appInfo.packageName; --安装包名称 898 | version=info.versionName; --版本信息 899 | icon = pm.getApplicationIcon(appInfo);--图标 900 | end 901 | return packageName,version,icon 902 | end 903 | 904 | function 编辑框颜色(eid,color) 905 | eid.getBackground().setColorFilter(PorterDuffColorFilter(color,PorterDuff.Mode.SRC_ATOP)) 906 | end 907 | 908 | function 下载文件(链接,文件名) 909 | downloadManager=activity.getSystemService(Context.DOWNLOAD_SERVICE); 910 | url=Uri.parse(链接); 911 | request=DownloadManager.Request(url); 912 | request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE|DownloadManager.Request.NETWORK_WIFI); 913 | request.setDestinationInExternalPublicDir(内置存储("Download",文件名)); 914 | request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); 915 | downloadManager.enqueue(request); 916 | 提示("正在下载,下载到:"..内置存储("Download/"..文件名).."\n请查看通知栏以查看下载进度。") 917 | end 918 | 919 | function 获取文件MIME(name) 920 | ExtensionName=tostring(name):match("%.(.+)") 921 | Mime=MimeTypeMap.getSingleton().getMimeTypeFromExtension(ExtensionName) 922 | return tostring(Mime) 923 | end 924 | 925 | function xdc(url,path) 926 | require "import" 927 | import "java.net.URL" 928 | local ur =URL(url) 929 | import "java.io.File" 930 | file=File(path); 931 | local con = ur.openConnection(); 932 | local co = con.getContentLength(); 933 | local is = con.getInputStream(); 934 | local bs = byte[1024] 935 | local len,read=0,0 936 | import "java.io.FileOutputStream" 937 | local wj= FileOutputStream(path); 938 | len = is.read(bs) 939 | while len~=-1 do 940 | wj.write(bs, 0, len); 941 | read=read+len 942 | pcall(call,"ding",read,co) 943 | len = is.read(bs) 944 | end 945 | wj.close(); 946 | is.close(); 947 | pcall(call,"dstop",co) 948 | end 949 | function appDownload(url,path) 950 | thread(xdc,url,path) 951 | end 952 | function 下载文件对话框(title,url,path,ex) 953 | local path=内置存储("Download/"..path) 954 | appDownload(url,path) 955 | local gd2 = GradientDrawable() 956 | gd2.setColor(转0x(backgroundc))--填充 957 | local radius=dp2px(16) 958 | gd2.setCornerRadii({radius,radius,radius,radius,0,0,0,0})--圆角 959 | gd2.setShape(0)--形状,0矩形,1圆形,2线,3环形 960 | local 布局={ 961 | LinearLayout, 962 | id="appdownbg", 963 | layout_width="fill", 964 | layout_height="fill", 965 | orientation="vertical", 966 | BackgroundDrawable=gd2; 967 | { 968 | TextView, 969 | id="appdownsong", 970 | text=title, 971 | -- typeface=Typeface.DEFAULT_BOLD, 972 | layout_marginTop="24dp", 973 | layout_marginLeft="24dp", 974 | layout_marginRight="24dp", 975 | layout_marginBottom="8dp", 976 | textColor=primaryc, 977 | textSize="20sp", 978 | }, 979 | { 980 | TextView, 981 | id="appdowninfo", 982 | text="已下载:0MB/0MB\n下载状态:准备下载", 983 | --id="显示信息", 984 | -- typeface=Typeface.MONOSPACE, 985 | layout_marginRight="24dp", 986 | layout_marginLeft="24dp", 987 | layout_marginBottom="8dp", 988 | textSize="14sp", 989 | textColor=textc; 990 | }, 991 | { 992 | ProgressBar, 993 | id="进度条", 994 | style="?android:attr/progressBarStyleHorizontal", 995 | layout_width="fill", 996 | progress=0, 997 | max=100; 998 | layout_marginRight="24dp", 999 | layout_marginLeft="24dp", 1000 | layout_marginBottom="24dp", 1001 | }, 1002 | } 1003 | local dldown=AlertDialog.Builder(activity) 1004 | dldown.setView(loadlayout(布局)) 1005 | 进度条.IndeterminateDrawable.setColorFilter(PorterDuffColorFilter(转0x(primaryc),PorterDuff.Mode.SRC_ATOP)) 1006 | dldown.setCancelable(false) 1007 | local ao=dldown.show() 1008 | window = ao.getWindow(); 1009 | window.setBackgroundDrawable(ColorDrawable(0x00ffffff)); 1010 | wlp = window.getAttributes(); 1011 | wlp.gravity = Gravity.BOTTOM; 1012 | wlp.width = WindowManager.LayoutParams.MATCH_PARENT; 1013 | wlp.height = WindowManager.LayoutParams.WRAP_CONTENT; 1014 | window.setAttributes(wlp); 1015 | 1016 | function ding(a,b)--已下载,总长度(byte) 1017 | appdowninfo.Text=string.format("%0.2f",a/1024/1024).."MB/"..string.format("%0.2f",b/1024/1024).."MB".."\n下载状态:正在下载" 1018 | 进度条.progress=(a/b*100) 1019 | end 1020 | 1021 | function dstop(c)--总长度 1022 | --[[if path:find(".bin") then 1023 | lpath=path 1024 | path=path:gsub(".bin",".apk") 1025 | 重命名文件(lpath,path) 1026 | end]] 1027 | 关闭对话框(ao) 1028 | 1029 | if url:find("step")~=nil then 1030 | 提示("导入中…稍等哦(^^♪") 1031 | 解压缩(path,ex) 1032 | 删除文件(path) 1033 | 提示("导入完成ʕ•ٹ•ʔ") 1034 | else 1035 | 提示("下载完成,大小"..string.format("%0.2f",c/1024/1024).."MB,储存在:"..path) 1036 | if path:find(".apk$")~=nil then 1037 | 双按钮对话框("安装APP",[===[您下载了安装包文件,要现在安装吗?]===],"立即安装","取消",function()关闭对话框(an)安装apk(path)end,function()关闭对话框(an)end) 1038 | end 1039 | end 1040 | end 1041 | 1042 | end 1043 | 1044 | function 申请权限(权限) 1045 | ActivityCompat.requestPermissions(this,权限,1) 1046 | end 1047 | 1048 | function 安装apk(安装包路径) 1049 | import "android.content.Intent" 1050 | import "android.net.Uri" 1051 | intent = Intent(Intent.ACTION_VIEW) 1052 | intent.setDataAndType(Uri.parse("file:///"..安装包路径), "application/vnd.android.package-archive") 1053 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 1054 | activity.startActivity(intent) 1055 | end 1056 | 1057 | function 浏览器打开(pageurl) 1058 | import "android.content.Intent" 1059 | import "android.net.Uri" 1060 | viewIntent = Intent("android.intent.action.VIEW",Uri.parse(pageurl)) 1061 | activity.startActivity(viewIntent) 1062 | end 1063 | 1064 | function 设置图片(preview,url) 1065 | preview.setImageBitmap(loadbitmap(url)) 1066 | end 1067 | 1068 | function 设置开关颜色(id,color,color2) 1069 | id.ThumbDrawable.setColorFilter(PorterDuffColorFilter(转0x(color),PorterDuff.Mode.SRC_ATOP)) 1070 | id.TrackDrawable.setColorFilter(PorterDuffColorFilter(转0x(color2),PorterDuff.Mode.SRC_ATOP)) 1071 | end 1072 | 1073 | function 微信扫一扫() 1074 | import "android.content.Intent" 1075 | import "android.content.ComponentName" 1076 | intent = Intent(); 1077 | intent.setComponent( ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI")); 1078 | intent.putExtra("LauncherUI.From.Scaner.Shortcut", true); 1079 | intent.setFlags(335544320); 1080 | intent.setAction("android.intent.action.VIEW"); 1081 | activity.startActivity(intent); 1082 | end 1083 | 1084 | function 支付宝扫一扫() 1085 | import "android.net.Uri" 1086 | import "android.content.Intent" 1087 | uri = Uri.parse("alipayqr://platformapi/startapp?saId=10000007"); 1088 | intent = Intent(Intent.ACTION_VIEW, uri); 1089 | activity.startActivity(intent); 1090 | end 1091 | 1092 | function 颜色字体(t,c) 1093 | local sp = SpannableString(t) 1094 | sp.setSpan(ForegroundColorSpan(转0x(c)),0,#sp,Spannable.SPAN_EXCLUSIVE_INCLUSIVE) 1095 | return sp 1096 | end 1097 | 1098 | function 打印(t) 1099 | print(t) 1100 | end 1101 | 1102 | function 判断有无网络() 1103 | local wl=activity.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE).getActiveNetworkInfo(); 1104 | if wl==nil then 1105 | netl=false 1106 | else 1107 | netl=true 1108 | end 1109 | return netl 1110 | end 1111 | 1112 | function 沉浸状态栏() 1113 | --这个需要系统SDK19以上才能用 1114 | if Build.VERSION.SDK_INT >= 19 then 1115 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 1116 | end 1117 | end 1118 | 1119 | --/一些函数-- 1120 | 1121 | --用户界面-- 1122 | function 跳转页面(ym,cs) 1123 | if cs then 1124 | activity.newActivity(ym,cs) 1125 | else 1126 | activity.newActivity(ym) 1127 | end 1128 | end 1129 | 1130 | function 渐变跳转页面(ym,cs) 1131 | if cs then 1132 | activity.newActivity(ym,android.R.anim.fade_in,android.R.anim.fade_out,cs) 1133 | else 1134 | activity.newActivity(ym,android.R.anim.fade_in,android.R.anim.fade_out) 1135 | end 1136 | end 1137 | 1138 | function 设置视图(t) 1139 | activity.setContentView(loadlayout(t)) 1140 | end 1141 | 1142 | function 控件可见(a) 1143 | a.setVisibility(View.VISIBLE) 1144 | end 1145 | 1146 | function 控件不可见(a) 1147 | a.setVisibility(View.INVISIBLE) 1148 | end 1149 | 1150 | function 控件隐藏(a) 1151 | a.setVisibility(View.GONE) 1152 | end 1153 | 1154 | function 显示标题栏() 1155 | activity.ActionBar.show() 1156 | end 1157 | 1158 | function 隐藏标题栏() 1159 | activity.ActionBar.hide() 1160 | end 1161 | 1162 | function 设置标题栏阴影高度(dp) 1163 | activity.ActionBar.setElevation(dp2px(dp)) 1164 | end 1165 | 1166 | function 设置标题栏返回图标(boolean) 1167 | activity.ActionBar.setDisplayHomeAsUpEnabled(boolean) 1168 | end 1169 | 1170 | function 设置页面标题(t) 1171 | activity.ActionBar.setTitle(t) 1172 | end 1173 | 1174 | function 设置页面小标题(t) 1175 | activity.ActionBar.setSubTitle(t) 1176 | end 1177 | 1178 | function 设置文本(id,t) 1179 | id.setText(t) 1180 | end 1181 | 1182 | function 获取文本(id) 1183 | return id.getText() 1184 | end 1185 | 1186 | function 设置控件宽度(id,dp) 1187 | id.setWidth(dp2px(dp)) 1188 | end 1189 | 1190 | function 设置控件高度(id,dp) 1191 | id.setHeight(dp2px(dp)) 1192 | end 1193 | --/用户界面-- -------------------------------------------------------------------------------- /res/chahua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/res/chahua.png -------------------------------------------------------------------------------- /res/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/res/compass.png -------------------------------------------------------------------------------- /res/hei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/res/hei.png -------------------------------------------------------------------------------- /res/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/res/right.png -------------------------------------------------------------------------------- /res/true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/res/true.png -------------------------------------------------------------------------------- /res/zahui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/res/zahui.png -------------------------------------------------------------------------------- /welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/welcome.png -------------------------------------------------------------------------------- /welcome/main.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Copyright [2018-2019] [Tujian X @Createlite] 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ]] 16 | require "import" 17 | import "android.app.*" 18 | import "android.os.*" 19 | import "android.widget.*" 20 | import "android.view.*" 21 | import 'android.support.*' 22 | import "com.androlua.LuaAdapter" 23 | import "org.w3c.dom.Text" 24 | import "android.view.WindowManager" 25 | import "android.widget.TextView" 26 | import "com.androlua.LuaAdapter" 27 | import "android.widget.ImageView" 28 | import "android.widget.ListView" 29 | import "android.support.v7.widget.*" 30 | import "android.widget.GridLayout" 31 | import "android.support.v4.app.*" 32 | import "com.tencent.smtt.sdk.*" 33 | import "android.widget.PopupMenu" 34 | import "muk" 35 | import "android.graphics.*" 36 | import "android.content.pm.ActivityInfo" 37 | import "Createlite@Tujian@SnakerBar" 38 | 39 | 隐藏标题栏() 40 | 41 | sdk = tointeger(Build.VERSION.SDK) 42 | 43 | activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)--禁止横屏 44 | 45 | activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN) 46 | 47 | --[[ 48 | 代码大约50%原创,其中很大一部分是在 @MUK 的思路下完成的 49 | 源代码是 @Luxts 的欢迎页,这里被我做了不少改动... 50 | ]] 51 | 52 | fltBtncolor='#607D8B'--悬浮窗颜色 53 | fltBtncolor2='#efefef'--悬浮窗图标颜色 54 | 55 | color1='#FFFFFFFF'--页面一背景颜色 56 | image1='zahui/res/icon'--页面一图片路径 57 | title1='Hola!'--页面一标题文字 58 | text1="\n\n欢迎使用 Tujian X-精选壁纸推荐\n\n无人为孤岛,一图一世界"--页面一说明文字 59 | textcolor1='#FF000000'--页面一文字颜色 60 | --下面的同上 61 | color2='#FFFFFFFF'--页面一背景颜色 62 | image2='res/hei'--页面一图片路径 63 | title2=[[ 64 | 65 | 66 | Tujian]] 67 | sologen="无人为孤岛,一图一世界" 68 | text2=[[ 69 | 70 | Tujian 是我在经历数次找壁纸无果后,与几个朋友共同完成的一款精选图片壁纸软件,每日两张,两个分类,两种风味。 71 | 72 | 虽然每一天选出的图片至多只有三张,但是全部是投稿者/维护者们的精挑细选。 73 | 74 | 虽然小众,希望大众。希望你能在享受图片的同时,将 Tujian 也推荐给你的好友,一千个人眼中一千个哈姆雷特,让图片更有内涵。 75 | 76 | 本应用中的图片均来自于 Unsplash、Pixiv、Coolapk 等网站,社区及论坛且未用于商业行为。若您认为 Tujian 中的图片侵犯了您的合法知识产权,请联系我们。我们将第一时间处理。 77 | ]] 78 | textcolor2='#FF000000' 79 | 80 | color3='#FFFFFFFF' 81 | image3='res/hei'--页面一图片路径 82 | title3=[[ 83 | 84 | 85 | 86 | 隐私政策]] 87 | sologen3="请您仔细阅读并同意" 88 | text3=[[ 89 | 90 | 图鉴(以下统称“本应用”)尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。但本应用将以高度的勤勉、审慎义务对待这些信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。本应用会不时更新本隐私权政策。 您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本应用服务使用协议不可分割的一部分。 91 | 92 | 1.适用范围 93 | 94 | (a) 在您注册本应用帐号时,您根据本应用要求提供的个人注册信息; 95 | 96 | (b) 在您使用本应用网络服务,或访问本应用平台网页时,本应用自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据; 97 | 98 | (c) 本应用通过合法途径从商业伙伴处取得的用户个人数据。 99 | 100 | 您了解并同意,以下信息不适用本隐私权政策: 101 | 102 | (a) 您在使用本应用平台提供的搜索服务时输入的关键字信息; 103 | 104 | (b) 本应用收集到的您在本应用发布的有关信息数据,包括但不限于参与活动、成交信息及评价详情; 105 | 106 | (c) 违反法律规定或违反本应用规则行为及本应用已对您采取的措施。 107 | 108 | 2.信息使用 109 | 110 | (a)本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人信息,除非事先得到您的许可,或该第三方和本应用(含本应用关联公司)单独或共同为您提供服务,且在该服务结束后,其将被禁止访问包括其以前能够访问的所有这些资料。 111 | 112 | (b) 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。 113 | 114 | (c) 为服务用户的目的,本应用可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与本应用合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。 115 | 116 | 3.信息披露 117 | 118 | 在如下情况下,本应用将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息: 119 | 120 | (a) 经您事先同意,向第三方披露; 121 | 122 | (b)为提供您所要求的产品和服务,而必须和第三方分享您的个人信息; 123 | 124 | (c) 根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露; 125 | 126 | (d) 如您出现违反中国有关法律、法规或者本应用服务协议或相关规则的情况,需要向第三方披露; 127 | 128 | (e) 如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷; 129 | 130 | (f) 在本应用平台上创建的某一交易中,如交易任何一方履行或部分履行了交易义务并提出信息披露请求的,本应用有权决定向该用户提供其交易对方的联络方式等必要信息,以促成交易的完成或纠纷的解决; 131 | 132 | (g) 其它本应用根据法律、法规或者网站政策认为合适的披露。 133 | 134 | 4.信息存储和交换 135 | 136 | 本应用收集的有关您的信息和资料将保存在本应用及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本应用收集信息和资料所在地的境外并在境外被访问、存储和展示。 137 | 138 | 5.Cookie的使用 139 | 140 | (a) 在您未拒绝接受cookies的情况下,本应用会在您的计算机上设定或取用cookies ,以便您能登录或使用依赖于cookies的本应用平台服务或功能。本应用使用cookies可为您提供更加周到的个性化服务,包括推广服务。 141 | 142 | (b) 您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的本应用网络服务或功能。 143 | 144 | (c) 通过本应用所设cookies所取得的有关信息,将适用本政策。 145 | 146 | 6.信息安全 147 | 148 | (a) 本应用帐号均有安全保护功能,请妥善保管您的用户名及密码信息。本应用将通过对用户密码进行加密等安全措施确保您的信息不丢失,不被滥用和变造。尽管有前述安全措施,但同时也请您注意在信息网络上不存在“完善的安全措施”。 149 | 150 | (b) 在使用本应用网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。请妥善保护自己的个人信息,仅在必要在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是用户名及密码发生泄露,请您立即联络我们(Chimon@Chimon.me),以便我们采取相应措施。 151 | 152 | 7.本隐私政策的更改 153 | 154 | (a) 如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。 155 | 156 | (b) 本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。 157 | 158 | 图鉴事务所 2019/03/20 159 | 160 | ]] 161 | textcolor3='#FF000000' 162 | 163 | local viewlayout={ 164 | RelativeLayout, 165 | layout_height="match_parent", 166 | layout_width="match_parent", 167 | { 168 | LinearLayout, 169 | id='back', 170 | orientation="vertical", 171 | layout_width="match_parent", 172 | layout_height="match_parent", 173 | { 174 | PageView, 175 | layout_width="match_parent", 176 | id="hd", 177 | layout_height="match_parent", 178 | pages={ 179 | { 180 | RelativeLayout, 181 | background=color1, 182 | layout_width="match_parent", 183 | layout_height="match_parent", 184 | { 185 | ImageView, 186 | id='image1', 187 | elevation='0dp', 188 | layout_centerInParent="true", 189 | background='#FFFFFFFF', 190 | src=image1, 191 | layout_width="100dp", 192 | layout_height="100dp", 193 | }, 194 | { 195 | TextView, 196 | layout_above="image1", 197 | textSize='70sp', 198 | textColor=textcolor1, 199 | text=title1, 200 | gravity='center', 201 | layout_width='match_parent', 202 | layout_height="wrap_content", 203 | padding='10sp', 204 | id="Hola"; 205 | }, 206 | { 207 | TextView, 208 | layout_below="image1", 209 | --textSize='30sp', 210 | textColor=textcolor1, 211 | Alpha='0.87', 212 | text=text1, 213 | gravity='center', 214 | layout_width='match_parent', 215 | layout_height="wrap_content", 216 | padding='5sp', 217 | }, 218 | }, 219 | { 220 | ScrollView, 221 | layout_width="match_parent", 222 | layout_height="match_parent", 223 | { 224 | RelativeLayout, 225 | background=color2, 226 | layout_width="match_parent", 227 | layout_height="match_parent", 228 | { 229 | LinearLayout, 230 | orientation="vertical", 231 | layout_width="match_parent", 232 | layout_height="match_parent", 233 | { 234 | ImageView, 235 | id='image2', 236 | elevation='0dp', 237 | background='#FFFFFFFF', 238 | src="res/hei.png", 239 | layout_marginTop="50dp"; 240 | layout_height="100dp"; 241 | layout_width="100dp"; 242 | layout_gravity="center"; 243 | }, 244 | }, 245 | { 246 | TextView, 247 | textSize='60sp', 248 | layout_below="image2", 249 | textColor=textcolor2, 250 | text=title2, 251 | gravity='left', 252 | layout_width='match_parent', 253 | layout_marginLeft="30dp", 254 | layout_height="wrap_content", 255 | layout_marginRight="20dp", 256 | padding='10sp', 257 | id="Tujian", 258 | }, 259 | { 260 | TextView, 261 | textSize='20sp', 262 | layout_below="Tujian", 263 | textColor=textcolor2, 264 | text=sologen, 265 | gravity='left', 266 | layout_width='match_parent', 267 | layout_marginLeft="35dp", 268 | layout_height="wrap_content", 269 | layout_marginRight="20dp", 270 | padding='10sp', 271 | id="sologen", 272 | }; 273 | { 274 | TextView, 275 | layout_below="sologen", 276 | textSize='18sp', 277 | textColor=textcolor2, 278 | Alpha='0.87', 279 | text=text2, 280 | gravity='left', 281 | layout_width='match_parent', 282 | layout_marginLeft="35dp", 283 | layout_marginRight="35dp", 284 | layout_height="wrap_content", 285 | padding='5sp', 286 | }, 287 | }; 288 | }, 289 | { 290 | ScrollView, 291 | layout_width="match_parent", 292 | { 293 | RelativeLayout, 294 | background=color2, 295 | layout_width="match_parent", 296 | layout_height="match_parent", 297 | { 298 | LinearLayout, 299 | orientation="vertical", 300 | layout_width="match_parent", 301 | layout_height="match_parent", 302 | { 303 | ImageView, 304 | id='image3', 305 | elevation='0dp', 306 | background='#FFFFFFFF', 307 | src="res/hei.png", 308 | layout_marginTop="50dp"; 309 | layout_height="100dp"; 310 | layout_width="100dp"; 311 | layout_gravity="center"; 312 | }, 313 | }, 314 | { 315 | TextView, 316 | textSize='45sp', 317 | layout_below="image3", 318 | textColor=textcolor3, 319 | text=title3, 320 | gravity='left', 321 | layout_width='match_parent', 322 | layout_marginLeft="30dp", 323 | layout_height="wrap_content", 324 | layout_marginRight="20dp", 325 | padding='10sp', 326 | id="Tujian3", 327 | }, 328 | { 329 | TextView, 330 | textSize='20sp', 331 | layout_below="Tujian3", 332 | textColor=textcolor3, 333 | text=sologen3, 334 | gravity='left', 335 | layout_width='match_parent', 336 | layout_marginLeft="32dp", 337 | layout_height="wrap_content", 338 | layout_marginRight="20dp", 339 | padding='10sp', 340 | id="sologen3", 341 | }; 342 | { 343 | TextView, 344 | layout_below="sologen3", 345 | textSize='18sp', 346 | textColor=textcolor3, 347 | Alpha='0.87', 348 | text=text3, 349 | gravity='left', 350 | layout_width='match_parent', 351 | layout_marginLeft="35dp", 352 | layout_marginRight="35dp", 353 | layout_height="wrap_content", 354 | padding='5sp', 355 | }, 356 | }, 357 | }; 358 | }, 359 | }, 360 | }, 361 | { 362 | LinearLayout, 363 | id='tt', 364 | layout_height="56dp", 365 | background="#00000000", 366 | layout_centerHorizontal="true", 367 | layout_alignBottom="back", 368 | layout_width="match_parent", 369 | layout_height="70dp", 370 | gravity='center', 371 | }, 372 | { 373 | CardView, 374 | id='button', 375 | layout_column='1', 376 | layout_width='60dp', 377 | CardElevation="3dp", 378 | CardBackgroundColor="#FF000000", 379 | layout_height='60dp', 380 | Radius='30dp', 381 | layout_alignRight="tt", 382 | layout_alignTop="tt", 383 | layout_marginRight="20dp", 384 | layout_marginTop="-20dp", 385 | { 386 | ImageView, 387 | id='imageview', 388 | src='res/right.png', 389 | ColorFilter=fltBtncolor2, 390 | layout_width="wrap_content", 391 | layout_height="wrap_content", 392 | layout_gravity="center", 393 | adjustViewBounds='true', 394 | maxWidth='30dp', 395 | maxHeight='30dp', 396 | }, 397 | }; 398 | } 399 | 400 | 401 | activity.requestWindowFeature(Window.FEATURE_NO_TITLE) 402 | --activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN) 403 | activity.setContentView(loadlayout(viewlayout)) 404 | 405 | 406 | local pag=0 407 | local ppg=0 408 | hd.addOnPageChangeListener{ 409 | onPageScrolled=function(p,pO,pp) 410 | pag=p 411 | ppg=pO 412 | if (pag==1 and tonumber(pO)>=0.1 or pag==2)then 413 | imageview.setImageBitmap(loadbitmap('res/true.png')) 414 | else 415 | imageview.setImageBitmap(loadbitmap('res/right.png')) 416 | end 417 | end, 418 | } 419 | button.onClick=function() 420 | if (pag==1 and tonumber(ppg)>=0.1 or pag==2)then--1和2为页面数,可修改 421 | activity.finish() 422 | activity.newActivity("zahui/main.lua",{"nil"}) 423 | if tointeger(sdk) <= 28 424 | then 425 | 申请权限({Manifest.permission.WRITE_EXTERNAL_STORAGE}) 426 | end 427 | end 428 | hd.showPage(pag+1) 429 | pag=pag+1 430 | end 431 | 432 | --两次退出 433 | 参数=0 434 | function onKeyDown(code,event) 435 | if string.find(tostring(event),"KEYCODE_BACK") ~= nil then 436 | if 参数+2 > tonumber(os.time()) then 437 | activity.finish() 438 | else 439 | 参数=tonumber(os.time()) 440 | end 441 | return true 442 | end 443 | end 444 | 445 | Hola.getPaint().setFakeBoldText(true) 446 | sologen.getPaint().setFakeBoldText(true) 447 | sologen3.getPaint().setFakeBoldText(true) 448 | Tujian.getPaint().setFakeBoldText(true) 449 | Tujian.getPaint().setTextSkewX(-0.2) 450 | Tujian3.getPaint().setFakeBoldText(true) 451 | Tujian3.getPaint().setTextSkewX(-0.2) 452 | 453 | --针对(可能)锤子水波纹问题 454 | sdk = tointeger(Build.VERSION.SDK) 455 | if sdk < 28 then 456 | activity.setTheme(android.R.style.Theme_Material_Light) 457 | end 458 | 459 | --Snakebar函数,具体代码请见根目录Snakebar.lua 460 | function SnakeBar(fill) 461 | SnackerBar.build() 462 | :msg(fill) 463 | :actionText("") 464 | :action(function() end) 465 | :show() 466 | end 467 | -------------------------------------------------------------------------------- /zahui/res/archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/archive.png -------------------------------------------------------------------------------- /zahui/res/bing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/bing.png -------------------------------------------------------------------------------- /zahui/res/chahua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/chahua.png -------------------------------------------------------------------------------- /zahui/res/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/compass.png -------------------------------------------------------------------------------- /zahui/res/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/desktop.png -------------------------------------------------------------------------------- /zahui/res/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/icon.png -------------------------------------------------------------------------------- /zahui/res/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/info.png -------------------------------------------------------------------------------- /zahui/res/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/more.png -------------------------------------------------------------------------------- /zahui/res/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/qr.png -------------------------------------------------------------------------------- /zahui/res/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/right.png -------------------------------------------------------------------------------- /zahui/res/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/setting.png -------------------------------------------------------------------------------- /zahui/res/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/text.png -------------------------------------------------------------------------------- /zahui/res/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/upload.png -------------------------------------------------------------------------------- /zahui/res/zahui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tupics/Tujian-X-daily-pics/73a3d0748dcca0ab8f42939fa69b7cd667a69618/zahui/res/zahui.png --------------------------------------------------------------------------------