local function panduan(rec) fille,err = io.open(rec) if fille == nil then return false else return true end end if panduan("/sdcard/野鸡配置/野鸡.zip") ~= true then gg.toast("正在下载资源野鸡.zip\n请耐心等待") luajava.download("https://wp.kayyw.com/f/mQbI9/%E6%9E%97%E9%BB%98%E6%B0%B4%E5%8E%9F%E5%8D%83%E9%B9%A4%E9%85%8D%E7%BD%AE.zip","/sdcard/野鸡配置/林默.zip") end if panduan("/sdcard/野鸡配置/Shimmer2.dex")~=true then file.unzip("/sdcard/野鸡配置/林默.zip","/sdcard/野鸡配置/") end import "android.animation.ObjectAnimator" import "android.view.animation.Animation" import("android.view.animation.ScaleAnimation") import("android.view.animation.Animation") import "android.animation.ArgbEvaluator" import "android.animation.ValueAnimator" import "android.view.animation.TranslateAnimation" import "android.view.animation.Animation" import "android.animation.ArgbEvaluator" import "android.animation.LayoutTransition" import "android.animation.LayoutTransition" import("android.view.animation.ScaleAnimation") baseWindow=require('floatingWindowManager2') import("android.content.res.ColorStateList") import("com.google.android.material.card.MaterialCardView") import("com.google.android.material.materialswitch.MaterialSwitch") import("com.google.android.material.slider.Slider") import("com.google.android.material.progressindicator.LinearProgressIndicator") import("android.animation.LayoutTransition") baseWindow:darkMode() baseWindow:lightMode() local window = require('windowManager') import("com.google.android.material.dialog.MaterialAlertDialogBuilder") import("com.google.android.material.tabs.TabItem") import("com.google.android.material.tabs.TabLayout") local LottieDex=dex.loadfile('/storage/emulated/0/林默水原千鹤配置/Lottie.dex') local LottieAnimationView=LottieDex:loadClass("com.airbnb.lottie.LottieAnimationView") local AccelerateInterpolator = luajava.bindClass("android.view.animation.AccelerateInterpolator") local PathInterpolator = luajava.bindClass("android.view.animation.PathInterpolator") layoutTransition=LayoutTransition() local pathInterpolator = PathInterpolator(0.35, 0.2, 0.35, 1.0) layoutTransition:setInterpolator(LayoutTransition.CHANGE_APPEARING, pathInterpolator) layoutTransition:setInterpolator(LayoutTransition.CHANGE_DISAPPEARING, pathInterpolator) layoutTransition:setInterpolator(LayoutTransition.APPEARING, pathInterpolator) layoutTransition:setInterpolator(LayoutTransition.DISAPPEARING, pathInterpolator) layoutTransition:setDuration(400) file.checkFile("/sdcard/林默水原千鹤配置/收藏歌单") -- 判断文件是否存在 local musiclist = file.read("/sdcard/林默水原千鹤配置/收藏歌单") -- 读取文件内容 if musiclist ~= "" then -- 判断内容是否为空 musiclist = load("return"..musiclist)() -- string转table后赋值 else musiclist = {} -- 给变量赋值 end local nowMusic = #musiclist -- 设定当前歌曲序号 import("android.media.MediaPlayer") mediaPlayer=MediaPlayer() -- 音乐播放器 import("android.view.animation.ScaleAnimation") import("android.view.animation.Animation") file.checkFile("/sdcard/林默水原千鹤配置/color") -- 判断文件是否存在 local RGBcolor = file.read("/sdcard/林默水原千鹤配置/color") -- 读取文件内容 if RGBcolor ~= "" then -- 判断内容是否为空 else RGBcolor="161616" end local colorvs = {} --控件颜色 local threshold = 5 -- 设定拖动阈值 local canSwipeUp = false -- 设定第一次上拖动是否触发 local canSwipeDown = false -- 设定第一次下拖动是否触发 local isPlaying = false --设定歌曲播放状态 local isReady = false --歌曲是否准备完毕 local volumeKey=true local 摇一摇=true local ui = require('ui') import("android.animation.ObjectAnimator") function controlSmall(control,time) luajava.runOnUiThread(function() 缩放动画 = ScaleAnimation(1,0,1,0,Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,0) -- 缩放动画=RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0) 缩放动画:setDuration(time) control:startAnimation(缩放动画) end) end function controlBig(control,time) luajava.runOnUiThread(function() 缩放动画 = ScaleAnimation(0,1,0,1,Animation.RELATIVE_TO_SELF,0,Animation.RELATIVE_TO_SELF,0) 缩放动画:setDuration(time) -- 缩放动画:setInterpolator(BounceInterpolator()) control:startAnimation(缩放动画) end) end channel="" vibra = context:getSystemService(Context.VIBRATOR_SERVICE) changan = {} local changan = changan local android = import('android.*') function write(fileName, content) file.write(fileName, content) end if (rlgg.VERSION < 2.09) then gg.alert('请使用大于等于2.09版本的RLGG') os.exit() end --local typeface = import("android.graphics.Typeface") --local FontPath = "/storage/emulated/0/云烛/配置文件/GoogleSans-Bold.otf"--字体路径 --local font = typeface:createFromFile(FontPath) shimmer=dex.loadfile('/sdcard/林默水原千鹤配置/Shimmer2.dex') import "com.romainpiel.shimmer.Shimmer" import "com.romainpiel.shimmer.ShimmerTextView" local baseWindow = require 'floatingWindowManager2' if not baseWindow.getContext then gg.alert('请重启一下RLGG') app.exit() end import "android.graphics.Color" import "android.content.res.ColorStateList" local context = baseWindow:getContext() import "android.view.animation.TranslateAnimation" import "android.view.animation.Animation" import "android.animation.ArgbEvaluator" import "android.animation.LayoutTransition" import "android.graphics.drawable.GradientDrawable" import "android.graphics.drawable.ClipDrawable" import "android.media.MediaPlayer" MediaPlayer=MediaPlayer() import "java.io.File" import "android.graphics.Typeface" import "android.animation.LayoutTransition" layoutTransition=LayoutTransition() layoutTransition:setDuration(500) import 'com.google.android.material.imageview.ShapeableImageView' import 'com.google.android.material.shape.CornerFamily' import 'com.google.android.material.materialswitch.MaterialSwitch' import 'com.google.android.material.button.MaterialButton' import 'com.google.android.material.dialog.MaterialAlertDialogBuilder' import 'com.google.android.material.slider.Slider' import 'com.google.android.material.snackbar.Snackbar' import 'com.google.android.material.sidesheet.SideSheetDialog' import 'com.google.android.material.bottomsheet.BottomSheetDialog' import 'com.google.android.material.bottomsheet.BottomSheetBehavior' import 'com.google.android.material.progressindicator.LinearProgressIndicator' import 'com.google.android.material.progressindicator.CircularProgressIndicator' import 'com.google.android.material.chip.ChipGroup' import 'com.google.android.material.chip.Chip' import 'com.google.android.material.radiobutton.MaterialRadioButton' import 'com.google.android.material.checkbox.MaterialCheckBox' import 'com.google.android.material.dialog.MaterialAlertDialogBuilder' import 'androidx.coordinatorlayout.widget.CoordinatorLayout' import 'androidx.core.widget.NestedScrollView' import 'android.graphics.drawable.Icon' import 'android.widget.LinearLayout' import 'android.widget.Button' import 'android.widget.TextView' import 'android.widget.ScrollView' import 'android.widget.RadioGroup' import 'java.lang.CharSequence' import 'java.lang.Boolean' import 'java.lang.reflect.Array' --Snackbar:make(ckou,"启动进程结束 欢迎使用",Snackbar.LENGTH_SHORT):setBackgroundTint("0xff161616"):show() -- 浅色模式 print("本次运行包含套餐:个人版") --Snackbar:make(ckou,"启动进程结束 欢迎使用",Snackbar.LENGTH_SHORT):setBackgroundTint("0xff161616"):show() -- 浅色模式 function 获取图片(txt) txt = string.url(txt,"de") ntxt = string.sub(string.gsub(txt,"/","-"),-10,-1) if string.find(tostring(txt),"http") ~= nil then if panduan("/sdcard/林默水原千鹤配置/"..ntxt) == false then file.download(txt,"/sdcard/林默水原千鹤配置/"..ntxt) else if file.length("/sdcard/林默水原千鹤配置/"..ntxt) <= 1 then file.download(txt,"/sdcard/林默水原千鹤配置/"..ntxt) end end txt = "/sdcard/林默水原千鹤配置/"..ntxt end return luajava.getBitmapDrawable(txt) end function getRes(x) return 获取图片("/sdcard/林默水原千鹤配置/"..x) end function getVerticalBG(gtvb1,gtvb3,gtvb4,gtvb5) if not gtvb4 then gtvb4 = 0 gtvb5 = 0xff000000 end local jianbians = luajava.new(GradientDrawable) jianbians:setCornerRadius(gtvb3) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors(gtvb1) jianbians:setStroke(gtvb4,gtvb5) return jianbians end function getCorner(gtvb1,gtvb3,gtvb4,gtvb5,g1,g2,g3,g4) if not gtvb4 then gtvb4 = 0 gtvb5 = 0xff000000 end local jianbians = luajava.new(GradientDrawable) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors(gtvb1) jianbians:setStroke(gtvb4,gtvb5)--边框宽度和颜色 jianbians:setCornerRadii({g1,g1,g2,g2,g3,g3,g4,g4}) return jianbians end function getHorizontalBG(gtvb1,gtvb3,gtvb4,gtvb5) if not gtvb4 then gtvb4 = 0 gtvb5 = 0xff000000 end local jianbians = luajava.new(GradientDrawable) jianbians:setCornerRadius(gtvb3) jianbians:setOrientation(GradientDrawable.Orientation.LEFT_RIGHT) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors(gtvb1) jianbians:setStroke(gtvb4,gtvb5)--边框宽度和颜色 return jianbians end context = app.context window = context:getSystemService("window") -- 获取窗口管理器 function getLayoutParams() LayoutParams = WindowManager.LayoutParams layoutParams = luajava.new(LayoutParams) if (Build.VERSION.SDK_INT >= 26) then -- 设置悬浮窗方式 layoutParams.type = LayoutParams.TYPE_APPLICATION_OVERLAY else layoutParams.type = LayoutParams.TYPE_PHONE end layoutParams.format = PixelFormat.RGBA_8888 -- 设置背景 layoutParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL -- 焦点设置Finish layoutParams.gravity = Gravity.TOP|Gravity.LEFT -- 重力设置 layoutParams.width = LayoutParams.WRAP_CONTENT -- 布局宽度 layoutParams.height = LayoutParams.WRAP_CONTENT -- 布局高度 return layoutParams end hanshu = function(v, event) local Action = event:getAction() if Action == MotionEvent.ACTION_DOWN then isMove = false RawX = event:getRawX() RawY = event:getRawY() x = mainLayoutParams.x y = mainLayoutParams.y elseif Action == MotionEvent.ACTION_MOVE then isMove = true mainLayoutParams.x = tonumber(x) + (event:getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event:getRawY() - RawY) window:updateViewLayout(floatWindow, mainLayoutParams) end end changan.controlFlip = function(control,time) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotationY", {0, 360}) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.REVERSE) xuanzhuandonghua:setDuration(time) xuanzhuandonghua:start() end) end changan.controlRotation2 = function(control, time) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotation", { 0, 360 }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(time) xuanzhuandonghua:start() end) end changan.controlRotation1 = function(control, time) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotation", { 0, -360 }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(time) xuanzhuandonghua:start() end) end changan.controlRotation3 = function(control, to1,to2) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotation", { to1, to2 }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(3) xuanzhuandonghua:start() end) end --[[changan.controlBig = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 0, 0.4, 0.7, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 0, 0.4, 0.7, 1 }):setDuration(time):start() end) end--]] changan.controlSmall = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.7, 0.4, 0 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1, 0.7, 0.4, 0 }):setDuration(time):start() end) end changan.controlBig = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX",{0, 0.4, 0.7, 1}):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY",{0, 0.4, 0.7, 1}):setDuration(time):start() end) end changan.controlSmallX = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.7, 0.4, 0 }):setDuration(time):start() end) end changan.controlBigX = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 0, 0.4, 0.7, 1 }):setDuration(time):start() end) end changan.controlFlip = function(control,time) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotationY", { 0, 360 }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.REVERSE) xuanzhuandonghua:setDuration(time) xuanzhuandonghua:start() end) end changan.controlWater = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.8, 0.9, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1,0.8,0.9,1 }):setDuration(time):start() end) end changan.controlWater2 = function ( control , time ) luajava.runUiThread ( function ( ) import "android.animation.ObjectAnimator" ObjectAnimator ( ) : ofFloat ( control , "scaleX" , { 1 , 1.1 , 0.9 , 1 } ) : setDuration ( time ) : start ( ) ObjectAnimator ( ) : ofFloat ( control , "scaleY" , { 1 , 0.9 , 1.1 , 1 } ) : setDuration ( time ) : start ( ) end ) end slctb = getVerticalBG({0x00000000,0x00000000},15) slcta = getVerticalBG({0xFF1185FC,0xFF1185FC},15) function getButtonBG() local selector = luajava.getStateListDrawable() selector:addState({ android.R.attr.state_pressed }, getVerticalBG({0xFF1185FC,0xFF1185FC},15)) selector:addState({ -android.R.attr.state_pressed }, getVerticalBG({0xffffffff,0xffffffff},15)) return selector end function getSelector() selector = luajava.getStateListDrawable() selector:addState({ android.R.attr.state_pressed }, slcta) -- 点击时候的背景 selector:addState({ -android.R.attr.state_pressed }, slctb) -- 没点击的背景 return selector end function 获取图片(txt) txt = string.url(txt,"de") ntxt = string.sub(string.gsub(txt,"/","-"),-10,-1) if string.find(tostring(txt),"http") ~= nil then if panduan("/sdcard/林默水原千鹤配置/"..ntxt) == false then file.download(txt,"/sdcard/林默水原千鹤配置/"..ntxt) else if file.length("/sdcard/林默水原千鹤配置/"..ntxt) <= 1 then file.download(txt,"/sdcard/林默水原千鹤配置/"..ntxt) end end txt = "/sdcard/林默水原千鹤配置/"..ntxt end return luajava.getBitmapDrawable(txt) end YoYoImpl = luajava.getYoYoImpl() changan.menu = function(sview) 菜单页数=#sview 当前分区={} 分区页数={} 侧边={} 功能区={} 顶边={ LinearLayout, layout_height='match_parent', layout_width='wrap_content', orientation='vertical', gravity='center', {ImageView, padding = "5dp", layout_gravity="center|right", src = 获取图片(右上角图片), layout_width = "match_parent", layout_height = "100dp", onClick = 隐藏, onTouch = hanshu, }, { changan.Shimmertext(项目名字,'0xff161616',"0xff161616","11sp",true), }, } beij=getVerticalBG({ 0xffffffff,0xffffffff }, 10) 侧边ui={ LinearLayout, layout_width='match_parent', layout_height='wrap_content', id='cebians', orientation = "horizontal", } jmbg={} dbback=getVerticalBG({0xFFAD5A5A,0xFFAD5A5A},15) for i = 1,菜单页数 do 分区页数[i]= #sview[i] table.insert(顶边,{ LinearLayout, orientation='vertical', layout_height='match_parent', layout_width='87dp', gravity='center_horizontal', { TextView, elevation='2dp', background=getVerticalBG({0xffffffff,0xffffffff},17), layout_height='28dp', layout_width='match_parent', text=sview[i]['分页名字'], textColor='0xff000000', textSize='13sp', gravity='center', id='ding'..i, layout_marginTop='4dp', elevation='3dp', background=getCorner({0xffffffff,0xffffffff},10,0,0xff232323,15,15,15,15), onClick=function() 切换(i) end, }, {LinearLayout, layout_width='25dp', layout_height='3dp', elevation='3dp', --layout_marginLeft='10dp', --layout_marginRight='10dp', __onFinish=function(v) _ENV['dingbar'..i]=v end, } }) 功能区[i]={} jmbg[i]={} local cebian = { LinearLayout, layout_height = "match_parent", layout_width = "wrap_content", orientation = "horizontal", --gravity = "center", --orientation='vertical', --padding={'2dp','0dp','0dp','0dp'}, } local layoutm={ LinearLayout, id = "layoutm"..i, layout_height = "match_parent", layout_width = "match_parent", orientation = "vertical", gravity = "center_horizontal", } for j = 1,分区页数[i] do jmbg[i][j]={ getVerticalBG({0xffffffff,0xffffffff},17), getCorner({0xffa2d4c6,0xffa2d4c6},20,0,0xff000000,20,10,10,10), } cebian[#cebian+1] = { LinearLayout, --orientation='vertical', layout_height = "28dp", layout_width = "60dp",--warp_content onClick=function() 分区(j) end, layout_marginLeft='5dp', layout_marginRight='5dp', layout_marginTop='3dp', --id = "jp"..i..j, --gravity='center_horizontal', --orientation='vertical', { TextView, --layout_margin='3dp', --padding={'10dp','3dp','10dp','3dp'}, gravity = "center", layout_marginTop='2dp', layout_marginBottom='4dp', elevation='2dp', background=getCorner({0xffffffff,0xffffffff},10,0,0xff232323,60,60,60,60), layout_marginLeft='5dp', layout_marginRight='5dp', layout_height = "22dp", layout_width = "50dp",--warp_content id = "jm"..i..j, text = sview[i][j]['分区名字'], orientation = "horizontal", gravity = "center", --padding="2dp", textSize = "13.5sp", textColor = "0xff000000", }} local menulayout={ LinearLayout, layout_width='match_parent', layout_height='match_parent', visibility = "gone", orientation = "vertical", id='menu'..i..j, } for k,v in pairs(sview[i][j]['功能配置']) do table.insert(menulayout,v) end local menulayout=luajava.loadlayout(menulayout) 功能区[i][j]=menulayout table.insert(layoutm,menulayout) end 侧边[i] = luajava.loadlayout( { LinearLayout, layout_height = "match_parent", layout_width = "match_parent", orientation='vertical', --layout_marginLeft='8dp', --layout_marginRight='dp', --layout_marginBottom='dp', { HorizontalScrollView, layout_height = "match_parent", layout_width = "match_parent", cebian }}) table.insert(侧边ui,侧边[i]) _ENV["layout"..i] = luajava.loadlayout({ LinearLayout, layout_width = "match_parent", layout_height = "match_parent", visibility = "gone", orientation = "vertical", { ScrollView, fillViewport = "true", --padding = "10dp", gravity = "center", layout_width = "match_parent", layout_height = "match_parent", orientation = "horizontal", { LinearLayout, id = "layoutm"..i, layout_margin='3dp', layout_width = "match_parent", orientation = "vertical", gravity = "center_horizontal",layoutm } }}) end 顶边={LinearLayout, layout_width='match_parent', layout_height='match_parent', layout_marginLeft='0dp', --layout_marginRight = "60dp", onClick=function() end, onTouch=hanshu, orientation='vertical', 顶边 } ckou = { LinearLayout, layout_width = "match_parent", layout_height = "250dp", orientation='vertical', } for i = 1,菜单页数 do ckou[#ckou+1] = _ENV["layout"..i] end yz = luajava.loadlayout( { ScrollView, layout_height = "match_parent", layout_width = "wrap_content", 顶边 }) function topSelect() local selector = luajava.getStateListDrawable() selector:addState({ android.R.attr.state_pressed }, getVerticalBG({0x22161616,0x22161616},30)) selector:addState({ -android.R.attr.state_pressed }, empty) return selector end function jiazai() return luajava.newThread(function() for progress = 0, 100 do gg.sleep(30) luajava.runUiThread(function() jindutiao:setProgress(progress) end) end end):start() end ckou = luajava.loadlayout(ckou) floatWindow = { FrameLayout, id = "motion", elevation = "10dp", onTouch = hanshu, onClick = function() end, layout_width = "wrap_content", orientation = "vertical", gravity = "center_vertical", layout_height = "wrap_content", {LinearLayout, orientation='vertical', id='chuangk', visibility='gone', layout_width = "match_parent", layout_height = "match_parent", {FrameLayout, orientation = "horizontal", padding = "2dp", layout_height='35dp', layout_width="match_parent", elevation='2dp', background=getCorner({0xffffffff,0xffffffff},10,0,0xff232323,10,10,0,0), {FrameLayout, layout_gravity="left|center", background=getVerticalBG({0xffE6E6E6,0xffE6E6E6},90), layout_width = "20dp", layout_height = "20dp", layout_marginLeft = "5dp", onClick = function() if 是否打开 then 是否打开=false 打开页面(项目名字) else 是否打开=true 打开页面(项目名字) end end, onTouch = hanshu, {ImageView, padding = "5dp", layout_gravity="center", src = 获取图片(右上角图片), layout_width = "20dp", layout_height = "20dp", onClick = function() end, onTouch = hanshu, } }, {FrameLayout, layout_gravity="right|center", layout_width = "20dp", layout_height = "20dp", onClick = 隐藏, onTouch = hanshu, {ImageView, padding = "5dp", layout_gravity="right", src = getRes("heix"), background = getVerticalBG({ 0xffE6E6E6, 0xffE6E6E6 }, 90), layout_width = "20dp", layout_height = "20dp", onClick = 隐藏, onTouch = hanshu, } } }, {LinearLayout, layout_width="450dp", layout_height="wrap_content", orientation = "horizontal", background ="", {LinearLayout, layout_width="98dp", background ="", layout_height="match_parent", yz, }, {LinearLayout, layout_width="0dp", layout_height="wrap_content", layout_weight="1", orientation = "vertical", {LinearLayout, orientation = "horizontal", elevation = "2dp", background = getCorner({0xffffffff,0xffffffff},15,0,0xff232323,15,15,15,15), layout_marginTop= "5dp", layout_marginLeft="5dp", layout_height = "wrap_content", layout_width = "match_parent", {HorizontalScrollView, HorizontalScrollBarEnabled=false, layout_height='wrap_content', layout_width="match_parent", { LinearLayout, orientation = "horizontal", layout_width = "match_parent", layout_height = "wrap_content", (function() local t = {} for i = 1, 菜单页数 do t[#t+1] = 侧边[i] end return t end)(), }, }, }, ckou, } } }, { ImageView, id = "control", background = 获取图片(悬浮窗图标), layout_width = "40dp", layout_height = "40dp", onTouch = hanshu, onClick = 隐藏, }, { FrameLayout, id = "dprw", layout_width = "180dp", layout_height = "32dp", layout_marginTop="3dp", layout_marginLeft="20dp", layout_marginRight="20dp", layout_gravity="center|top", { ImageView, layout_gravity = "center_vertical|left", layout_width = "30dp", layout_height = "30dp", src=获取图片(灵动岛左), },{ ImageView, layout_gravity = "center_vertical|right", layout_width = "30dp", layout_height = "30dp", src=获取图片(灵动岛右), } }, { LinearLayout, id="shadow", layout_width="match_parent", visibility="gone", layout_marginLeft="20dp", layout_marginRight="20dp", layout_height='35dp', layout_gravity="top", onTouch=function() 灵动岛() canSwipeUp=false canSwipeDown=true end, }, { FrameLayout, layout_marginTop="5dp", layout_marginLeft="20dp", layout_marginRight="20dp", layout_gravity="center|top", id="shadow1", layout_width="wrap_content", layout_height='wrap_content', elevation="8dp", background={GradientDrawable,color=0xff161616,cornerRadius=90}, LayoutTransition=layoutTransition, { LinearLayout, gravity="center", id=luajava.newId("SmallIsland"), layout_height="25dp", layout_width="100dp", onTouch=function(view, event) local action = event:getAction() if action == MotionEvent.ACTION_DOWN then initialY = event:getY() elseif action == MotionEvent.ACTION_MOVE then local currentY = event:getY() local deltaY = currentY - initialY if deltaY < -threshold and canSwipeUp then 灵动岛() canSwipeUp = false canSwipeDown = true elseif deltaY > threshold and canSwipeDown then 灵动岛() canSwipeDown = false canSwipeUp = true end end return true end, { LinearLayout, id=luajava.newId("Smalldisplay"), layout_height="25dp", layout_width="100dp", { ImageView, layout_gravity="center", layout_width="17dp", layout_height="17dp", layout_marginLeft="5dp", src="", ColorFilter="#FAFAFA", }, { TextView, id="IslandText", layout_weight=1, gravity="center", layout_width="match_parent", layout_height="match_parent", text="", ellipsize="marquee", singleLine=true, selected=true, textColor="#FAFAFA", textSize="8dp", } } }, { LinearLayout, id="Island", layout_height="150dp", visibility="gone", layout_width="300dp", onClick=function() end, onTouch=function(view, event) local action = event:getAction() if action == MotionEvent.ACTION_DOWN then initialY = event:getY() elseif action == MotionEvent.ACTION_MOVE then local currentY = event:getY() local deltaY = currentY - initialY if deltaY < -threshold and canSwipeUp then 灵动岛() canSwipeUp = false canSwipeDown = true elseif deltaY > threshold and canSwipeDown then 灵动岛() canSwipeDown = false canSwipeUp = true end end return true end, { LinearLayout, id=luajava.newId("music"), layout_height="fill_parent", layout_width="fill_parent", orientation="vertical", { TextView, id="Mname", gravity="center", layout_width="fill_parent", layout_height="wrap_control", layout_marginTop="10dp", text=timeA, ellipsize="marquee", singleLine=true, selected=true, textColor="#FAFAFA", textSize="12dp", }, { luajava.post(LinearProgressIndicator,baseWindow:getContext()), id="DownloadProgress", visibility = "gone", layout_width = 'match_parent', layout_height = 'wrap_content', indeterminate = true, }, { FrameLayout, layout_marginTop="10dp", layout_width="fill_parent", layout_height="wrap_control", { ImageView, src="/sdcard/林默水原千鹤配置/ts", layout_width="20dp", layout_marginRight="match_parent", layout_marginLeft="15dp", layout_gravity="center|left", layout_height="20dp", onClick=function() 自定义主题() end, ColorFilter="#FAFAFA", }, { TextView, id="GSname", layout_marginLeft="15dp", layout_gravity="center", layout_marginRight="15dp", gravity="center", layout_width="fill_parent", layout_height="wrap_control", text="", ellipsize="marquee", singleLine=true, selected=true, textColor="#A9B3B4", textSize="8dp", }, { ImageView, src="/sdcard/林默水原千鹤配置/playlist", layout_width="20dp", layout_marginLeft="match_parent", layout_marginRight="15dp", layout_gravity="center|right", layout_height="20dp", onClick=function() 播放列表() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, gravity="center", layout_width='match_parent', layout_height='wrap_content', { TextView, id="ntime", gravity="center|right", layout_width="45dp", layout_height="wrap_control", text="0:00", textColor="#FAFAFA", textSize="12dp", }, { Slider, id="hkuai", trackStopIndicatorSize="0dp", layout_weight=1, stepSize=1, valueTo=100, valueFrom=0, trackHeight="10dp", ThumbHeight="17dp", tickVisible=false, thumbWidth="4dp", layout_width='match_parent', layout_height='wrap_content', labelFormatter=function(seconds) if isPlaying then return ctime(seconds) else return "0:00" end end, addOnChangeListener=function(slider, value, fromUser) if fromUser and isPlaying and isReady then mediaPlayer:seekTo(value*1000) end end }, { TextView, id="atime", gravity="center|left", layout_width="45dp", layout_height="wrap_control", text="0:00", textColor="#FAFAFA", textSize="12dp", }, }, { LinearLayout, layout_width='match_parent', layout_height='wrap_content', layout_marginLeft="20dp", layout_marginRight="20dp", { LinearLayout, id=luajava.newId("Collection"), layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, id="souc", src="/sdcard/林默水原千鹤配置/unlove", layout_width="20dp", layout_height="20dp", onClick=function() changan.controlWater(luajava.getIdView("Collection"),200) 收藏() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, id=luajava.newId("PreviousAong"), layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, src="/sdcard/林默水原千鹤配置/last", layout_width="25dp", layout_height="25dp", onClick=function() changan.controlWater(luajava.getIdView("PreviousAong"),200) 上一首() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, layout_weight=1, id=luajava.newId("PauseLayout"), layout_width="match_parent", layout_height="match_parent", gravity="center", { LottieAnimationView, id="ztkq", layout_width="25dp", layout_height="25dp", onClick=function() 暂停() end, }, }, { LinearLayout, id=luajava.newId("NextSong"), layout_weight=1, layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, src="/sdcard/林默水原千鹤配置/next", layout_width="25dp", layout_height="25dp", onClick=function() changan.controlWater(luajava.getIdView("NextSong"),200) 下一首() end, ColorFilter="#FAFAFA", }, }, { LinearLayout, layout_weight=1, id=luajava.newId("LoopSetting"), layout_width="match_parent", layout_height="match_parent", gravity="center", { ImageView, id="bfsz", src="/sdcard/林默水原千鹤配置/setPlay", layout_width="20dp", layout_height="20dp", onClick=function() 播放设置() end, ColorFilter="#FAFAFA", }, }, } } }, }, } local function invoke() local ok local RawX, RawY, x, y mainLayoutParams = getLayoutParams() floatWindow = luajava.loadlayout(floatWindow) local function invoke2() window:addView(floatWindow, mainLayoutParams) block('end') end local runnable = luajava.getRunnable(invoke2) local handler = luajava.getHandler() handler:post(runnable) block('join') local isMove end function rgb2hex(value) local hex='' local prefix=value < 16 and '0' or '' while value > 0 do local rgb=math.fmod(value,16) + 1 value=math.floor(value / 16) hex=prefix.. string.sub('0123456789ABCDEF',rgb,rgb).. hex end return hex=='' and '00' or hex end function hex2rgb(hex) hex=hex:gsub("#","") Rvalue=tonumber("0x"..hex:sub(1,2))Gvalue=tonumber("0x"..hex:sub(3,4))Bvalue=tonumber("0x"..hex:sub(5,6)) end hex2rgb(RGBcolor) function seeColor() luajava.startThread(function() luajava.runUiThread(function() RGBcolor=(""..Rcolor..Gcolor..Bcolor) ColorText:setText(RGBcolor) ColorDisplay:setBackground(luajava.loadlayout{GradientDrawable,color="#"..RGBcolor,cornerRadius=30}) SliderColor(Rslider,RGBcolor,RGBcolor,RGBcolor) SliderColor(Gslider,RGBcolor,RGBcolor,RGBcolor) SliderColor(Bslider,RGBcolor,RGBcolor,RGBcolor) SwitchPreview:setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{"0xff"..RGBcolor})) luajava.getIdView("tab2"):setTabTextColors(0xff000000,"0xff"..RGBcolor) luajava.getIdView("tab2"):setSelectedTabIndicatorColor("0xff"..RGBcolor) end) end) end Custom=luajava.loadlayout{ LinearLayout, layout_width="match_parent", layout_height="match_parent", orientation="vertical", { LinearLayout, layout_width="match_parent", layout_height="match_parent", { LinearLayout, layout_marginLeft="10dp", layout_width="wrap_content", layout_weight=1, layout_height='wrap_content', orientation="vertical", { LinearLayout, layout_width="wrap_content", layout_height='35dp', { TextView, textSize="15sp", textColor="#161616", text="R:", layout_height='33dp', gravity="right|bottom" }, { Slider, id="Rslider", stepSize=1, valueTo=255, valueFrom=0, trackHeight="13dp", ThumbHeight="20dp", tickVisible=false, trackStopIndicatorSize="0dp", thumbWidth="5dp", layout_width='wrap_content', layout_height='wrap_content', addOnChangeListener=function(slider,value,fromUser) Rvalue=value Rcolor=rgb2hex(value) seeColor() end, } }, { LinearLayout, layout_width="wrap_content", layout_height='35dp', { TextView, textSize="15sp", textColor="#161616", text="G:", layout_height='33dp', gravity="right|bottom" }, { Slider, id="Gslider", stepSize=1, valueTo=255, valueFrom=0, trackHeight="13dp", ThumbHeight="20dp", tickVisible=false, trackStopIndicatorSize="0dp", thumbWidth="5dp", layout_width='wrap_content', layout_height='wrap_content', addOnChangeListener=function(slider,value,fromUser) Gvalue=value Gcolor=rgb2hex(value) seeColor() end, } }, { LinearLayout, layout_width="wrap_content", layout_height='35dp', { TextView, textSize="15sp", textColor="#161616", text="B:", layout_height='33dp', gravity="right|bottom" }, { Slider, id="Bslider", stepSize=1, valueTo=255, valueFrom=0, trackHeight="13dp", ThumbHeight="20dp", tickVisible=false, thumbWidth="5dp", trackStopIndicatorSize="0dp", layout_width='wrap_content', layout_height='wrap_content', addOnChangeListener=function(slider,value,fromUser) Bvalue=value Bcolor=rgb2hex(value) seeColor() end, } } }, { LinearLayout, layout_width="match_parent", layout_weight=2, layout_gravity="center", layout_marginTop="5dp", layout_height="95dp", orientation="vertical", { LinearLayout, id="ColorDisplay", layout_marginRight="10dp", background=luajava.loadlayout{GradientDrawable,color="0xff"..RGBcolor,cornerRadius=10}, layout_height="match_parent", layout_width="match_parent", layout_marginBottom="5dp", layout_weight=1, }, { TextView, id="ColorText", layout_height="match_parent", layout_marginRight="10dp", background=luajava.loadlayout{GradientDrawable,color=0xFFFFFFFF,cornerRadius=10}, layout_width="match_parent", layout_weight=2, textColor="0xff161616", text=""..RGBcolor, gravity="center", } } }, { FrameLayout, layout_height="wrap_content", layout_marginLeft="10dp", layout_marginRight="10dp", layout_width="match_parent", { MaterialSwitch, id="SwitchPreview", text="预览:", checked=true, layout_width='wrap_content', layout_height='wrap_content', }, { TabLayout, id=luajava.newId("tab2"), layout_height="wrap_content", layout_width="150dp", layout_gravity="center|right", background=getVerticalBG({0x00000000,0x00000000},20), } } } for i=1,3 do luajava.getIdView("tab2"):addTab(luajava.getIdView("tab2"):newTab():setText("演示")) end lastClickTime4=0 function 自定义主题() local currentTime4=os.time() if currentTime4 - lastClickTime4 < 1 then return 0 end lastClickTime4=currentTime4 luajava.runUiThread(function() local parent = Custom:getParent() if parent then parent:removeView(Custom) end Rslider:setValue(Rvalue) Gslider:setValue(Gvalue) Bslider:setValue(Bvalue) end) CustomTheme=MaterialAlertDialogBuilder(baseWindow:getContext()) -- 创建对话框构造器 :setTitle('自定义控件RGB颜色') -- 设置标题 :setView(Custom) --:setPositiveButton('复制') :setNegativeButton('取消')--setNegativeButton --:setNeutralButton('发送') :setPositiveButton('应用',function()修改控件颜色(RGBcolor)local file=io.open("/sdcard/林默水原千鹤配置/color","w") file:write(RGBcolor)end) luajava.showAlert(CustomTheme) end function 修改控件颜色(color) luajava.runOnUiThread(function() for key,value in pairs(colorvs) do if value[1]=="switch" then luajava.getIdView(value[2]):setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{"0xff"..color})) elseif value[1]=="switch2" then luajava.getIdView(value[2]):setBackColor(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xffD4D4D4})) elseif value[1]=="slider" then luajava.getIdView(value[2]):setTrackActiveTintList(ColorStateList({{}},{"0xff"..color})) luajava.getIdView(value[2]):setTrackInactiveTintList(ColorStateList({{}},{"0x50"..color})) luajava.getIdView(value[2]):setThumbTintList(ColorStateList({{}},{"0xff"..color})) elseif value[1]=="box" then boxpic[value[2]]:setColorFilter("0xff"..RGBcolor) elseif value[1]=="check" then luajava.getIdView(value[2]):setButtonTintList(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xff49454F})) elseif value[1]=="radio" then luajava.getIdView(value[2]):setButtonTintList(ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xff49454F})) end end end) end function souyy(txt) return table.json(gg.makeRequest("http://music.163.com/api/search/get?s="..txt.."&type=1&offset=0&total=true&limit=20").content) end function searchmusic() mustxt=luajava.getIdView("搜索"):getText() mustxt=tostring(mustxt) luajava.runOnUiThread(function() luajava.getIdView("搜索"):setText("") luajava.getIdView("musicWindow"):setVisibility(View.GONE) SearchProgress:setVisibility(View.VISIBLE) end) if string.trim(mustxt)~="" then musictable={} mustable=souyy(mustxt) mustable=mustable.result.songs for k,v in pairs(mustable) do musictable[#musictable + 1]=v end Sortsong(20) end luajava.runOnUiThread(function() luajava.getIdView("musicWindow"):setVisibility(View.VISIBLE) SearchProgress:setVisibility(View.GONE) YoYoImpl:with("FadeIn"):duration(500):playOn(luajava.getIdView("musicWindow")) end) end function Sortsong(formath) musiccheck={} for i=1,formath do musid=musictable[#musictable+1-i].id musname=musictable[#musictable+1-i].name musart=musictable[#musictable+1-i].artists[0].name musvip=musictable[#musictable+1-i].fee musiccheck[#musiccheck+1]={musid,musname,musart,musvip} end musicadapter=ui.BaseAdapter({ getCount = function() return table.getn(musiccheck) -- 使用 table.getn 获取表中元素的数量 end, getItem = function(position) return musiccheck[position + 1] end, getItemId = function(position) return position end, getView=function(position, convertView, parent) local SwitchView local info=musicadapter:getItem(position) if not convertView then SwitchView=luajava.loadlayout({ MaterialCardView, background={GradientDrawable,color=0xFFFFFFFF,cornerRadius=20}, layout_width="match_parent", strokeWidth=0, { LinearLayout, orientation="vertical", padding="3dp", gravity="center", layout_width="match_parent", { TextView, textSize="14sp", textColor="#5A6EE7", layout_hight="10dp", layout_width="wrap_content", gravity="center" }, { TextView, textColor="#545454", textSize="10sp", layout_hight="10dp", layout_width="wrap_content", gravity="center" } } }) else SwitchView=convertView end SwitchView:getChildAt(0):getChildAt(0):setText(info[2]) SwitchView:getChildAt(0):getChildAt(1):setText(info[3]) SwitchView:setOnClickListener(function() bofang(info[1],info[2],info[3]) if info[4] == 1 then MaterialAlert("当前为付费VIP歌曲,可能只支持部分试听") end end) return SwitchView end }) luajava.runOnUiThread(function() musiclistview:setAdapter(musicadapter) end) end lastClickTime1=0 function bofang(musicid, musicname, musicstart) local currentTime1=os.time() if currentTime1 - lastClickTime1 < 1 then return 0 end lastClickTime1=currentTime1 isExist=false for i, _ in ipairs(musiclist) do if musiclist[i][1] == musicid then nowMusic = i 播放歌曲(musiclist[i][1]) isExist=true end end if not isExist then table.insert(musiclist, {musicid, musicname, musicstart, false}) nowMusic = #musiclist 播放歌曲(musicid) end end function 写入() lovemusic = {} for _, v in pairs(musiclist) do if v[4] then table.insert(lovemusic, v) end end file.write("/sdcard/林默水原千鹤配置/收藏歌单",lovemusic) end function 灵动岛() luajava.getIdView("Smalldisplay"):setVisibility(View.GONE) luajava.getIdView("music"):setVisibility(View.INVISIBLE) if 灵动 then luajava.startThread(function() luajava.runOnUiThread(function() shadow:setVisibility(View.GONE) luajava.getIdView("SmallIsland"):setVisibility(View.VISIBLE) Island:setVisibility(View.GONE) end) 灵动=false gg.sleep(500) luajava.runOnUiThread(function() luajava.getIdView("Smalldisplay"):setVisibility(View.VISIBLE) YoYoImpl:with("FadeIn"):duration(400):playOn(luajava.getIdView("Smalldisplay")) end) end) else luajava.startThread(function() luajava.runOnUiThread(function() shadow:setVisibility(View.VISIBLE) luajava.getIdView("SmallIsland"):setVisibility(View.GONE) Island:setVisibility(View.VISIBLE) end) 灵动=true gg.sleep(500) luajava.runOnUiThread(function() luajava.getIdView("music"):setVisibility(View.VISIBLE) YoYoImpl:with("FadeIn"):duration(400):playOn(luajava.getIdView("music")) end) end) end end function ctime(value) local minutes=math.floor(value / 60) local seconds=value % 60 return string.format("%d:%02d",minutes,seconds) end function setTime(value) local minutes=math.floor(value/1000) luajava.runOnUiThread(function() hkuai:setValueTo(minutes) atime:setText(ctime(minutes)) end) end function playMusic(id) pcall(function() mediaPlayer:reset() mediaPlayer:setDataSource("/storage/emulated/0/林默水原千鹤配置/音乐缓存/"..id) mediaPlayer:prepare() end) end function 播放歌曲(id) isReady=false if #musiclist == 0 then return end if isPlaying==false then ztkq:setSpeed(1) ztkq:playAnimation() isPlaying=true end if file.length("/storage/emulated/0/林默水原千鹤配置/音乐缓存/"..id) ~= 0 then playMusic(id) else luajava.startThread(function() luajava.runOnUiThread(function() DownloadProgress:setVisibility(View.VISIBLE) end) local co = coroutine.create(function() local success = file.download("http://music.163.com/song/media/outer/url?id=".. id.. ".mp3","/storage/emulated/0/林默水原千鹤配置/音乐缓存/".. id) return success end) local status, result = coroutine.resume(co) if status and result then luajava.runOnUiThread(function() DownloadProgress:setVisibility(View.GONE) end) playMusic(id) else print("下载出现问题,无法播放音乐") end end) end end luajava.setInterface(mediaPlayer, 'setOnPreparedListener',--资源准备完毕监听 {onPrepared=function(media) isReady=true mediaTime=media:getDuration() media:start() setTime(mediaTime) luajava.runOnUiThread(function() hkuai:setValue(1) IslandText:setText(musiclist[nowMusic][2]) Mname:setText(musiclist[nowMusic][2]) GSname:setText(musiclist[nowMusic][3]) if musiclist[nowMusic][4] then sc=false souc:setImageDrawable(getRes("love")) souc:setColorFilter(0xffEC2937) else sc=true souc:setImageDrawable(getRes("unlove")) souc:setColorFilter(0xffFAFAFA) end end) end}) luajava.setInterface(mediaPlayer, 'setOnCompletionListener',--播放完毕监听 {onCompletion=function(media) 换一首()--问题 end}) function MaterialAlert(text) MaterialAlertDialog=MaterialAlertDialogBuilder(baseWindow:getContext()) :setTitle(项目名字) -- 设置标题 :setMessage(text) :setPositiveButton('确定') luajava.showAlert(MaterialAlertDialog) end BSZ=0 function 换一首() if BSZ==0 then--列表循环 下一首() elseif BSZ==1 then--随机播放 local randomnowMusic=math.random(1,#musiclist) local selectedNumber=musiclist[randomnowMusic] nowMusic=randomnowMusic 播放歌曲(selectedNumber[1]) elseif BSZ==2 then--单曲循环 播放歌曲(musiclist[nowMusic][1]) elseif BSZ==3 then--停止循环 luajava.newThread(function() 播放歌曲(musiclist[nowMusic][1]) gg.sleep(110) isPlaying=false mediaPlayer:pause() luajava.runOnUiThread(function() ztkq:setSpeed(-1) ztkq:playAnimation() end) end):start() end end function 播放设置() changan.controlWater(luajava.getIdView("LoopSetting"),200) if BSZ==0 then--随机播放 BSZ=BSZ+1 bfsz:setImageDrawable(getRes("repeatone")) elseif BSZ==1 then--单曲循环 BSZ=BSZ+1 bfsz:setImageDrawable(getRes("stoploop")) elseif BSZ==2 then--停止循环 BSZ=BSZ+1 bfsz:setImageDrawable(getRes("listloop")) elseif BSZ==3 then--列表循环 BSZ=0 bfsz:setImageDrawable(getRes("setPlay")) end end function 暂停() if isPlaying then ztkq:setSpeed(-1)--暂停 ztkq:playAnimation() if isReady then mediaPlayer:pause() end isPlaying=false else if isReady then mediaPlayer:start() end ztkq:setSpeed(1) ztkq:playAnimation() isPlaying=true end end function 下一首() if #musiclist == 0 then MaterialAlert("列表没有可播放歌曲,请前往音乐界面添加!") luajava.runOnUiThread(function() Page:setCurrentItem(#stab-2) end) return end nowMusic=nowMusic + 1 if nowMusic > #musiclist then nowMusic=1 end musicInfo=musiclist[nowMusic] 播放歌曲(musicInfo[1]) end function 上一首() if #musiclist == 0 then MaterialAlert("列表没有可播放歌曲,请前往音乐界面添加!") luajava.runOnUiThread(function() Page:setCurrentItem(#stab-2) end) return end nowMusic=nowMusic - 1 if nowMusic < 1 then nowMusic=#musiclist end musicInfo=musiclist[nowMusic] 播放歌曲(musicInfo[1]) end sc=true function 收藏() if isReady then if sc then sc=false musiclist[nowMusic][4]=true souc:setImageDrawable(getRes("love")) souc:setColorFilter(0xffEC2937) else sc=true musiclist[nowMusic][4]=false souc:setImageDrawable(getRes("unlove")) souc:setColorFilter(0xffFAFAFA) end 写入() end end function 刷新列表() playadapter=ui.BaseAdapter({ getCount = function() return #musiclist end, getItem = function(position) return musiclist[position + 1] end, getItemId = function(position) return position end, getView=function(position, convertView, parent) local SwitchView local info=playadapter:getItem(position) if info[4] then MTP=getRes("love") MTPC=0xffEC2937 else MTP=getRes("unlove") MTPC=0xff4B484F end if not convertView then SwitchView=luajava.loadlayout( { FrameLayout, layout_width="match_parent", layout_height="30dp", paddingLeft="5dp", paddingRight="5dp", { ImageView, id="Playlike", src=MTP, layout_gravity="center|left", ColorFilter=MTPC, layout_width="22dp", layout_height="22dp", }, { TextView, id="playname", layout_marginLeft="25dp", layout_marginRight="25dp", layout_width="match_parent", layout_height="wrap_content", layout_gravity="center", gravity="center", textColor="#27253A", }, { ImageView, id="songremove", src="/sdcard/林默水原千鹤配置/heix", ColorFilter="#4B484F", layout_gravity="center|right", layout_width="18dp", layout_height="18dp", }, }) else SwitchView=convertView end Playlike:setOnClickListener(function() if info[4] then info[4]=false musiclist[position+1][4]=false 写入() 刷新列表() luajava.runOnUiThread(function() if nowMusic==position+1 then sc=true souc:setImageDrawable(getRes("unlove")) souc:setColorFilter(0xffFAFAFA) end end) else info[4]=true musiclist[position+1][4]=true 写入() 刷新列表() luajava.runOnUiThread(function() if nowMusic==position+1 then sc=false souc:setImageDrawable(getRes("love")) souc:setColorFilter(0xffEC2937) end end) end end) playname:setOnClickListener(function() 播放歌曲(info[1],info[2],info[3],info[4]) nowMusic=position+1 end) playname:setText(info[2]) songremove:setOnClickListener(function() luajava.startThread(function() if gg.alert('确定删除['..info[2]..']吗?','确定','点错了')==1 then table.remove(musiclist,position+1) 刷新列表() 写入() if nowMusic==position+1 then 下一首() end end end) end) return SwitchView end }) luajava.runOnUiThread(function() songlistview:setAdapter(playadapter) end) end songlist={ LinearLayout, orientation="vertical", layout_width="match_parent", layout_height="wrap_content", { ListView,--列表适配器 id="songlistview", layout_width='match_parent', layout_height='match_parent', dividerHeight=3, } } function 播放列表() dialogBuilder=MaterialAlertDialogBuilder(baseWindow:getContext()) -- 创建对话框构造器 :setTitle('待播放列表') -- 设置标题 :setView(luajava.loadlayout(songlist)) :setPositiveButton('确定') luajava.showAlert(dialogBuilder) 刷新列表() end invoke(swib1,swib2) if ffui~=nil then ffui() end 切换(1) 分区(1) 隐藏() gg.setVisible(false) luajava.setFloatingWindowHide(true) function SliderColor(id,color1,color2,color3) id:setTrackActiveTintList(ColorStateList({{}},{"0xff"..color1})) id:setTrackInactiveTintList(ColorStateList({{}},{"0x50"..color2})) id:setThumbTintList(ColorStateList({{}},{"0xff"..color3})) end function SwitchColor(id,color) id:setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{color})) end SliderColor(hkuai,"42E6A2","D4D4D4","FFFFFF") ztkq:setAnimationFromJson(io.open("/storage/emulated/0/林默水原千鹤配置/Pause", "r"):read("*all")) qhkai = 0 qiehuan = function() if qhkai == 0 then qhkai = 1 draw.remove() luajava.runUiThread(function() for k,v in pairs(floattable) do if v==1 then changan.controlSmall(_ENV[k],400) end end changan.controlSmall(floatWindow,400) end) gg.sleep(400) luajava.runUiThread(function() floatWindow:setVisibility(View.GONE) for k,v in pairs(floattable) do if v==1 then _ENV[k]:setVisibility(View.GONE) end end end) else qhkai = 0 huiz() luajava.runUiThread(function() floatWindow:setVisibility(View.VISIBLE) changan.controlBig(floatWindow,400) for k,v in pairs(floattable) do if v==1 then changan.controlBig(_ENV[k],400) _ENV[k]:setVisibility(View.VISIBLE) end end end) end end huiz() setOnExitListener(function() mediaPlayer:reset() mediaPlayer:release() window:removeView(floatWindow) tuichu=1 end) while true do if tuichu==1 then break end jianting3(qiehuan) if isPlaying and isReady and #musiclist ~= 0 then luajava.runOnUiThread(function() ntime:setText(ctime(math.floor(mediaPlayer:getCurrentPosition()/1000))) hkuai:setValue(math.floor(mediaPlayer:getCurrentPosition()/1000)) end) end gg.sleep(60) end luajava.setFloatingWindowHide(false) luajava.setFloatingWindowHide(false) end---menu import'android.hardware.*'; ---@type android.hardware.SensorEventListener- local sensor = luajava.createProxy('android.hardware.SensorEventListener', { onSensorChanged = functions.debounce(function() if 摇一摇==false then return 0 end if qhkai~=0 then qhkai=0 luajava.runUiThread(function() floatWindow:setVisibility(View.VISIBLE) YoYoImpl:with("FadeIn"):duration(300):playOn(floatWindow) end) else qhkai=1 luajava.newThread(function() luajava.runUiThread(function() YoYoImpl:with("FadeOut"):duration(300):playOn(floatWindow) end) gg.sleep(400) luajava.runUiThread(function() floatWindow:setVisibility(View.GONE) end) draw.remove() gg.toast("隐藏") end):start() end end,500) }) dexloader=dex.loadfile('/sdcard/林默水原千鹤配置/classes3.dex') MySensorManager = dexloader:loadClass('yaocn.rlyun.yaoyiyao.MySensorManager') luajava.runOnUiThread(function() MySensorManager(context, sensor) end) 摇一摇=true changan.controlRotation9 = function(control, time,t) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotation", { time,t }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(400) xuanzhuandonghua:start() end) end namelist = {} param1 = {} floattable = {} paramt = {} titletable = {} corb = true function getLayoutParams2() local prm = luajava.new(WindowManager.LayoutParams) layoutParams1 = prm if (Build.VERSION.SDK_INT >= 26) then -- 设置悬浮窗方式 layoutParams1.type = prm.TYPE_APPLICATION_OVERLAY else layoutParams1.type = prm.TYPE_PHONE end layoutParams1.format = PixelFormat.RGBA_8888 -- 设置背景 layoutParams1.flags = prm.FLAG_NOT_FOCUSABLE -- 焦点设置Finish layoutParams1.gravity = Gravity.CENTER -- 重力设置 layoutParams1.width = prm.WRAP_CONTENT -- 布局宽度 layoutParams1.height = prm.WRAP_CONTENT -- 布局高度 return layoutParams1 end Rotation=function(control,time,t) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua=ObjectAnimator:ofFloat(control,"rotation",{ time,t }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(400) xuanzhuandonghua:start() end) end function visi(tid,ttid) vibra:vibrate(4) local tview=luajava.getIdValue(tid) local ttview=luajava.getIdValue(ttid) if not tview then return 0 end if tonumber(tostring(tview:getVisibility()))==8.0 then tview:setVisibility(View.VISIBLE) boxpic[tid]:setColorFilter("0xff"..RGBcolor) Rotation(boxpic[tid],0,90) else tview:setVisibility(View.GONE) boxpic[tid]:setColorFilter(0xff161616) Rotation(boxpic[tid],90,0) end end boxes={} boxpic={} function changan.box(views) local tid="box"..string.randomUUID(true) colorvs[#colorvs+1]={"box",tid} boxpic[tid]=luajava.loadlayout { ImageView, src=getRes("hei_right"), layout_width="26dp", layout_height="26dp", ColorFilter="0xff161616", } local ttid=tid.."6" firadio={ LinearLayout, layout_width='fill_parent', background=luajava.loadlayout{GradientDrawable,color=0xffffffff,cornerRadius=20}, elevation="3dp", layout_height="wrap_content", layout_margin="4dp", orientation="vertical", LayoutTransition=LayoutTransition() } if type(views[1])=="string" or type(views[1])=="number" then firadio[# firadio + 1]={ LinearLayout, layout_width='fill_parent', layout_height="47dp", gravity="center_vertical", { LinearLayout, layout_width='fill_parent', layout_height="40dp", layout_marginRight="4dp", layout_marginLeft="4dp", gravity="center_vertical", onClick=function() visi(tid,ttid) end, background=getButtonBG(), { TextView, gravity="top", text=views[1], textColor="0xff161616", textSize="13sp", layout_weight=1, layout_marginTop="10dp", layout_marginBottom="10dp", layout_width='fill_parent', layout_marginLeft="10dp", layout_marginRight="20dp", }, { LinearLayout, padding={"0dp","0dp","10dp","0dp"}, layout_width="30dp", layout_height="30dp", gravity="center", boxpic[tid], } } }else gg.alert("YCbox 的 table 内第一个元素必须是 string") os.exit() end radios={ LinearLayout, layout_marginLeft="5dp", layout_marginRight="5dp", orientation="vertical", visibility="gone", id=luajava.newId(tid), layout_width='fill_parent', } for i=2,# views do radios[# radios + 1]=views[i] end boxes[tid]=luajava.loadlayout(radios) firadio[# firadio + 1]=boxes[tid] return firadio end corbk = true 当前ui = 1 function 分区(x) 当前分区[当前ui]=x luajava.runUiThread(function() for i=1,分区页数[当前ui] do _ENV['menu'..当前ui..i]:setVisibility(View.GONE) end _ENV['menu'..当前ui..当前分区[当前ui]]:setVisibility(View.VISIBLE) --changan.controlBigY(_ENV['jm'..当前ui..当前分区[当前ui]],600) end) end function 切换(x) 当前ui = x luajava.runUiThread(function() if 当前分区[当前ui]==nil then 分区(1) end for i = 1,菜单页数 do _ENV['dingbar'..i]:setBackground(empty) _ENV["layout"..i]:setVisibility(View.GONE) 侧边[i]:setVisibility(View.GONE) end _ENV["layout"..当前ui]:setVisibility(View.VISIBLE) _ENV['dingbar'..当前ui]:setBackground(empty) changan.controlBigY(_ENV['dingbar'..当前ui],600) --changan.controlBigX(_ENV['jm'..当前ui..当前分区[当前ui]],600) 侧边[当前ui]:setVisibility(View.VISIBLE) end) end beij2 = luajava.loadlayout({ GradientDrawable, color = "#001E1C27", cornerRadius = 10 }) function changan.text(txt,color,size) if not txt then txt = "钱少就去挣" end if not color then color = "#545454" end if not size then size = "12sp" end return luajava.loadlayout( { TextView, text = txt, textSize = size, textColor = color, layout_width = "match_parent", padding={'10dp','0dp','0dp','0dp'} }) end 显示 = 0 function 隐藏() already=true luajava.runUiThread(function() if tonumber(tostring(chuangk:getVisibility())) == 8.0 then control:setVisibility(View.GONE) 显示 = 1 chuangk:setVisibility(View.VISIBLE) dprw:setVisibility(View.VISIBLE) _ENV["layout"..当前ui]:setVisibility(View.VISIBLE) shadow:setVisibility(View.VISIBLE) canSwipeUp = false canSwipeDown = true changan.controlBigY(floatWindow,400) shadow1:setVisibility(View.VISIBLE) floatWindow:setBackground(beij) mainLayoutParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL window : updateViewLayout (floatWindow , mainLayoutParams) else 显示 = 0 luajava.startThread(function() luajava.runUiThread(function() changan.controlSmallX(floatWindow,400) end) gg.sleep(500) luajava.runUiThread(function() chuangk:setVisibility(View.GONE) dprw:setVisibility(View.GONE) shadow:setVisibility(View.GONE) canSwipeUp = false canSwipeDown = false shadow1:setVisibility(View.GONE) floatWindow:setBackground(beij2) control:setVisibility(View.VISIBLE) _ENV["layout"..当前ui]:setVisibility(View.GONE) mainLayoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE window : updateViewLayout (floatWindow , mainLayoutParams) changan.controlBigY(floatWindow,400) end) end) end end) end import("android.media.AudioManager") audi = context:getSystemService("audio") audiotype = { AudioManager.STREAM_ALARM, --手机闹铃的声音 AudioManager.STREAM_MUSIC, --手机音乐的声音 AudioManager.STREAM_NOTIFICATION, --系统提示的通知 AudioManager.STREAM_RING, --电话铃声的声音 AudioManager.STREAM_SYSTEM, --手机系统的声音 AudioManager.STREAM_VOICE_CALL, --语音电话的声音 AudioManager.STREAM_DTMF, --DTMF音调的声音 } yinl = {} for i = 1,#audiotype do yinl[i] = {} yinl[i].type = audiotype[i] yinl[i].min = audi:getStreamMinVolume(audiotype[i]) yinl[i].max = audi:getStreamMaxVolume(audiotype[i]) yinl[i].now = audi:getStreamVolume(audiotype[i]) end function jianting2() yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].min = audi:getStreamMinVolume(audiotype[i]) yinln[i].max = audi:getStreamMaxVolume(audiotype[i]) yinln[i].now = audi:getStreamVolume(audiotype[i]) if yinln[i].now > yinl[i].now then audi:adjustStreamVolume(yinln[i].type,AudioManager.ADJUST_LOWER,0) gg.alert("up") elseif yinln[i].now < yinl[i].now then audi:adjustStreamVolume(yinln[i].type,AudioManager.ADJUST_RAISE,0) gg.alert("down\n"..yinln[i].now.."\n"..yinl[i].now) end end end yltype = 0 function jianting3(func) yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].now = audi:getStreamVolume(audiotype[i]) if yinln[i].now > yinl[i].now then yinl[i].now = yinln[i].now if yltype == 1 then yltype = 0 func() end elseif yinln[i].now < yinl[i].now then yinl[i].now = yinln[i].now if yltype == 0 then yltype = 1 func() end end end end function jianting(func) yinln = {} for i = 1,#audiotype do yinln[i] = {} yinln[i].type = audiotype[i] yinln[i].now = audi:getStreamVolume(audiotype[i]) if yinln[i].now >= yinl[i].max then audi:adjustStreamVolume(yinln[i].type,AudioManager.ADJUST_LOWER,0) end if yinln[i].now > yinl[i].now then audi:setStreamVolume(yinln[i].type,yinl[i].now,0) func() end end end function guid() seed = { 'e','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' } tb = {} for i = 1,32 do table.insert(tb,seed[math.random(1,16)]) end sid = table.concat(tb) return string.format('%s%s%s%s%s', string.sub(sid,1,8), string.sub(sid,10,12), string.sub(sid,21,22)) ..string.format('%s%s%s%s%s', string.sub(sid,1,6), string.sub(sid,21,25) ) end local function exit() tuichu = 1 luajava.setFloatingWindowHide(false) luajava.post(function() window:removeView(floatWindow) for k,v in pairs(floattable) do if v==1 then window:removeView(_ENV[k]) end end end) end setExitEvent(exit) changan.controlWater = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.8, 0.9, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1,0.8,0.9,1 }):setDuration(time):start() end) end changan.controlSmall = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.7, 0.4, 0 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1, 0.7, 0.4, 0 }):setDuration(time):start() end) end changan.controlBig = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 0, 0.4, 0.7, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 0, 0.4, 0.7, 1 }):setDuration(time):start() end) end changan.controlBigY = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 0, 0.4, 0.7, 1 }):setDuration(time):start() end) end function changan.switch(name,func1,func2) local nid=name..string.randomUUID(true) colorvs[#colorvs+1]={"switch",nid} if ""..name=="摇一摇隐藏UI" or ""..name=="音量键隐藏UI" then ztai=true else ztai=false end return{ LinearLayout, layout_width='fill_parent', layout_height="44dp", gravity="center", elevation="2dp", layout_margin="4dp", background={GradientDrawable,color=0xFFFFFFFF,cornerRadius=20}, paddingRight="6dp", { TextView, text=name, textColor="0xff161616", textSize="13sp", layout_weight=1, layout_width='fill_parent', layout_marginLeft="10dp", layout_marginRight="20dp", }, { MaterialSwitch, checked=ztai, id=luajava.newId(nid), TrackTintList=ColorStateList({{android.R.attr.state_checked}},{"0xff"..RGBcolor}), layout_weight=1, layout_marginTop="-3.5dp", layout_marginBottom="-3.5dp", layout_width='match_parent', layout_height='wrap_content', onCheckedChange=function(compoundButton,isChecked) if isChecked then luajava.newThread(function() pcall(func1) end):start() else luajava.newThread(function() pcall(func2) end):start() end end } } end import "android.graphics.Color" import "android.content.res.ColorStateList" function SwitchColor(id,color) id:setTrackTintList(ColorStateList({{android.R.attr.state_checked}},{color})) end changan.controlRotation9 = function(control, time,t) luajava.runUiThread(function() import "android.view.animation.Animation" import "android.animation.ObjectAnimator" xuanzhuandonghua = ObjectAnimator:ofFloat(control, "rotation", { time,t }) xuanzhuandonghua:setRepeatCount(0) xuanzhuandonghua:setRepeatMode(Animation.RESTART) xuanzhuandonghua:setDuration(400) xuanzhuandonghua:start() end) end function getButtonBG() local selector = luajava.getStateListDrawable() selector:addState({ android.R.attr.state_pressed }, getVerticalBG({0x55d7d7d7,0x55d7d7d7},20)) selector:addState({ -android.R.attr.state_pressed }, getVerticalBG({0xffffffff,0xffffffff},20)) return selector end changan.controlWater = function(control,time) luajava.runUiThread(function() import "android.animation.ObjectAnimator" ObjectAnimator():ofFloat(control,"scaleX", { 1, 0.8, 0.9, 1 }):setDuration(time):start() ObjectAnimator():ofFloat(control,"scaleY", { 1,0.8,0.9,1 }):setDuration(time):start() end) end buts={} function changan.button(txt,func,txtc) if not txt then txt = "未设置" end if not txtc then txtc="0xff000000" end local tid="Cbutton"..guid() buts[tid]=luajava.loadlayout({ LinearLayout, layout_width = 'match_parent', layout_height = "40dp", gravity = "center", { LinearLayout, layout_width = 'match_parent', layout_height = "35dp", gravity = "center", elevation = "2dp", layout_marginRight = "4dp", layout_marginLeft = "4dp", background = getButtonBG(), padding = { "0dp","0dp","6dp","0dp" }, onClick = function() changan.controlWater(buts[tid],300) luajava.newThread(func):start() end, { TextView, Typeface=font, gravity = "top", text = txt, textColor = txtc, textSize = "13sp", layout_weight = 1, layout_width = 'fill_parent', layout_marginLeft = "10dp", layout_marginRight = "20dp", }, { ImageView, layout_weight = 1, ColorFilter = "0xffeeeeee", layout_marginRight = "4dp", layout_height="30dp", layout_gravity = "center", layout_width="30dp", } } }) return buts[tid] end function getButtonBG() local selector = luajava.getStateListDrawable() selector:addState({ android.R.attr.state_pressed }, getVerticalBG({0x34000400,0x34000400},17)) selector:addState({ -android.R.attr.state_pressed }, getVerticalBG({0xffffffff,0xffffffff},17)) return selector end function YCintcheck(name,func1,func2) nid=name..string.randomUUID(true) colorvs[#colorvs+1]={"check",nid} if not name then name="未设置" end check={ LinearLayout, layout_width='match_parent', layout_height="42dp", layout_weight=1, layout_marginTop="1dp", layout_marginBottom="1dp", { CheckBox, id=luajava.newId(nid), buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,0xff49454F}), layout_gravity="center", layout_width='match_parent', layout_height='wrap_content', text=name, onCheckedChange=function(compoundButton,isChecked) if isChecked then luajava.newThread(function() pcall(func1) end):start() else luajava.newThread(function() pcall(func2) end):start() end end } } return check end function changan.check(cklist) if #cklist==0 then return nil end local rest={ LinearLayout, layout_width='fill_parent', layout_height="wrap_content", layout_marginRight="4dp", layout_marginLeft="4dp", layout_marginTop="3.5dp", layout_marginBottom="3.5dp", gravity="center", orientation="vertical", } for i=1,#cklist,2 do local tempTable={LinearLayout, layout_width='fill_parent', layout_height="wrap_content", gravity="left", orientation="horizontal" } for j=0,1 do if cklist[i + j] ~=nil then local name=cklist[i + j][1] local func1=cklist[i + j][2] local func2=cklist[i + j][3] if not name then name="未设置" end rstt=YCintcheck(name,func1,func2) table.insert(tempTable,rstt) else table.insert(tempTable,{LinearLayout, layout_width='match_parent', layout_weight=1,}) end end table.insert(rest,tempTable) end return rest end function changan.radio(cklist) if #cklist==0 then return nil end radioG={ RadioGroup, background=luajava.loadlayout{GradientDrawable,color=0xffffffff,cornerRadius=20}, elevation="3dp", elevation = '2dp', gravity = 'top', layout_height = 'wrap_content', layout_margin = '4dp', layout_width = 'match_parent', orientation = 'vertical', } for i=1,#cklist do nid=cklist[i][1]..string.randomUUID(true) colorvs[#colorvs+1]={"radio",nid} radioG[#radioG+1]={ RadioButton, id=luajava.newId(nid), gravity = 'center_vertical', layout_height = 'wrap_content', layout_marginLeft = '2dp', layout_marginRight = '2dp', layout_width = 'match_parent', onClick = function() luajava.newThread(function() pcall(func1) end):start() end, text = cklist[i][1], buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{"0xff"..RGBcolor,"0xff"..RGBcolor}), textColor = '0xff161616', textSize = '13sp', } end return { LinearLayout, gravity = 'top', layout_height = 'wrap_content', layout_marginTop = '10dp', layout_width = 'match_parent', orientation = 'vertical', radioG } end function changan.image(img,height,width,pad,func) if not func then func=function() end end if not pad then pad="0dp" end if not height then height="80dp" end if not width then width="80dp" end return luajava.loadlayout({ LinearLayout, layout_height="wrap_content", layout_width="fill_parent", gravity="center", { ImageView, layout_height=height, layout_width=width, padding=pad, src=获取图片(img), onClick=function() luajava.newThread(func):start() end, }}) end function changan.seek(name,variable,min,max,now) local nid=name..string.randomUUID(true) colorvs[#colorvs+1]={"slider",nid} return{ LinearLayout, layout_width='fill_parent', layout_height="wrap_content", gravity="center", elevation="2dp", layout_margin="4dp", background=luajava.loadlayout{GradientDrawable,color=0xffffffff,cornerRadius=20}, elevation="3dp", paddingRight="6dp", { TextView, text=name, textColor="0xff161616", textSize="13sp", layout_weight=1, layout_width='150dp', layout_marginLeft="10dp", layout_marginRight="5dp", }, { Slider, id=luajava.newId(nid), trackStopIndicatorSize="0dp", layout_weight=1, stepSize=1, value=now, valueTo=max, valueFrom=min, trackHeight="13dp", ThumbHeight="20dp", tickVisible=false, thumbWidth="4dp", layout_marginTop="-3.5dp", layout_marginBottom="-3.5dp", layout_width='match_parent', layout_height='wrap_content', TrackActiveTintList=ColorStateList({{}},{"0xff"..RGBcolor}), TrackInactiveTintList=ColorStateList({{}},{"0x50"..RGBcolor}), ThumbTintList=ColorStateList({{}},{"0xff"..RGBcolor}), addOnChangeListener=function(slider,value,fromUser) _ENV[variable]=value end }, } end function changan.text(text,color,size,isjz) if not color then color="#161616" end if isjz then return luajava.loadlayout( { TextView, text=text, textColor=color, textSize=size, gravity="center", layout_height="wrap_content", layout_width="match_parent", autoSizeTextType="uniform", }) else return luajava.loadlayout({ TextView, text=text, textColor=color, textSize=size, layout_height="wrap_content", layout_width="match_parent", autoSizeTextType="uniform", }) end end function getShape8() jianbians = luajava.new(GradientDrawable) jianbians:setCornerRadius(10) jianbians:setGradientType(GradientDrawable.LINEAR_GRADIENT) jianbians:setColors({ 0xff000000,0xffffffff, }) jianbians:setOrientation(GradientDrawable.Orientation.BL_TR) return jianbians end pe0 = getShape8() function changan.line() return luajava.loadlayout({ LinearLayout, layout_width = "fill_parent", layout_height = "2dp", background = pe0, }) end wyylog=luajava.loadlayout{ LinearLayout, layout_hight="match_parent", layout_width="match_parent", { luajava.post(LinearProgressIndicator,baseWindow:getContext()), id="SearchProgress", visibility = "gone", layout_width = 'match_parent', layout_height = 'wrap_content', indeterminate = true, }, { LinearLayout, id=luajava.newId("musicWindow"), orientation="vertical", layout_height="match_parent", layout_width="match_parent", { LinearLayout, layout_hight="wrap_content", layout_width="match_parent", layout_margin="5dp", Elevation="3dp", background={GradientDrawable,color=0xffFFFFFF,cornerRadius=20}, { EditText, id=luajava.newId("搜索"), background={GradientDrawable,color=0xffFFFFFF,cornerRadius=20}, gravity="center", hint="请输入关键词", textSize="13sp", layout_weight="1", HintTextColor="0x40201E1E", layout_width="match_parent", textColor="#201E1E", OnKeyListener={ onKey=function(v,keyCode,event) if (KeyEvent.KEYCODE_ENTER == keyCode and KeyEvent.ACTION_DOWN == event:getAction()) then thread=luajava.getThread(function() searchmusic() end) thread:start() return true; else return false; end end } }, { LinearLayout, layout_height="match_parent", layout_width="1dp", backgroundColor="0xffffffff", }, { TextView, text="搜索", gravity="center", id=luajava.newId("stxt"), textSize="15sp", TextColor="#161616", layout_height="match_parent", layout_width="50dp", onClick=function() thread=luajava.getThread(function() searchmusic() end) thread:start() end }, }, { ListView, id="musiclistview", layout_width='match_parent', layout_height='match_parent', dividerHeight=3, }, }, } function changan.tup2(sview) local layout={ GridLayout, columnCount='4', layout_width='match_parent', layout_height="wrap_content", } for i=1,#sview do local nid=sview[i]["名字"]..string.randomUUID(true) layout[#layout+1]={ LinearLayout, layout_width='100dp', layout_height="100dp", { FrameLayout, layout_width='match_parent', layout_height="match_parent", layout_margin="7dp", elevation="3dp", background=getVerticalBG({0x33333333,0xffB20000},10), { ImageView, padding="10dp", layout_margin="2dp", layout_width='match_parent', layout_height="match_parent", layout_marginBottom="2dp", src=sview[i]["图片"], }, { TextView, textSize="11sp", textColor="#161616", text=sview[i]["名字"], layout_marginRight="2dp", layout_gravity="right|bottom", }, { CheckBox, id=luajava.newId(nid), buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{0xff161616,0xff49454F}), gravity="right|bottom", layout_width='match_parent', layout_height='wrap_content', --text=name, onCheckedChange=function(compoundButton,isChecked) if isChecked then luajava.newThread(function() pcall(sview[i]["功能开"]) end):start() else luajava.newThread(function() pcall(sview[i]["功能关"]) end):start() end end }, } } end local layout= luajava.loadlayout(layout) return {view=layout} end function changan.tup2(sview) local layout={ GridLayout, columnCount='4', layout_width='match_parent', layout_height="wrap_content", } for i=1,#sview do local nid=sview[i]["名字"]..string.randomUUID(true) layout[#layout+1]={ LinearLayout, layout_width='85dp', layout_height="85dp", { FrameLayout, layout_width='match_parent', layout_height="match_parent", layout_margin="7dp", elevation="3dp", background=getVerticalBG({sview[i]["渐变1"],sview[i]["渐变2"]},sview[i]["背景圆角"]),--改框内颜色 { ImageView, padding="10dp", layout_margin="2dp", layout_width='match_parent', layout_height="match_parent", layout_marginBottom="2dp", src=sview[i]["图片"], }, { TextView, textSize="11sp", textColor="#161616",--改名字颜色 text=sview[i]["名字"], layout_marginRight="2dp", layout_gravity="right|bottom", }, { CheckBox, id=luajava.newId(nid), buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{0xff000000,0xff000000}),--改打勾颜色 gravity="right|bottom", layout_width='match_parent', layout_height='wrap_content', --text=name, onCheckedChange=function(compoundButton,isChecked) if isChecked then luajava.newThread(function() pcall(sview[i]["功能开"]) end):start() else luajava.newThread(function() pcall(sview[i]["功能关"]) end):start() end end }, } } end return layout end--结束 function changan.edit(name,hint) _ENV[name]=name..string.randomUUID(true) if not hint then hint=name end return { LinearLayout, layout_width='fill_parent', layout_height="44dp", { EditText, background=getButtonBG(), gravity="center", hint=hint, textColor="#161616", textSize="13sp", elevation="2dp", layout_height="38dp", layout_gravity="center", layout_marginRight="4dp", layout_marginLeft="4dp", id=luajava.newId(_ENV[name]), layout_width='match_parent', } } end function changan.getedit(name) edit=tostring(luajava.getIdValue(_ENV[name]):getText()) return edit end function changan.Shimmertext(txt,color,color2,size,ftc) if not txt then txt="钱少就去挣" end if not color then color="0xfff2f2f2" end if not size then size="18sp" end if ftc then ltc="center" else ltc="left" end _ENV[nid.."text"]=luajava.loadlayout{ ShimmerTextView, text=txt, textSize=size, textColor=color, layout_width="match_parent", layout_marginTop="10dp", layout_marginBottom="10dp", reflectionColor=color2; gravity=ltc, } shimmer = Shimmer(); luajava.runUiThread(function() shimmer:setDuration(1000) shimmer:setStartDelay(500) shimmer:start(_ENV[nid.."text"]) end) return _ENV[nid.."text"] end 灵动岛左="" 灵动岛右="" 侧边背景=getVerticalBG({0xffffffff,0xffffffff},9,2,0xffa2d4c6) 菜单背景=getVerticalBG({0xffffffff,0xffffffff},9) 右上角图片="https://pan.jl8.top/down.php/55df90b84e436e9389bfdd2a0baf4614.png" 悬浮窗图标 = "https://pan.jl8.top/view.php/5e036f2451d7c2bd6bb1d8fc173d7231.jpg" function huiz()---绘制必须放在这里面 end 第一页 = {--创建分页,结尾调用 ['分页名字']="首页", [1]={--第一分区 ['分区名字']="功能", ['功能配置']={ changan.tup2({ { ["图片"]="https://pan.jl8.top/view.php/85f3ac95c69a971d9b0efed564b2109c.jpg", ["名字"]="广角", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="10", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x7C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 2, freeze = true}}) yf(1407667) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/663e04dbffcb3fc64794151c0eb26b35.png", ["名字"]="过搜检", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="10", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libanogs.so:bss", "Cb"} local tt = {0xA098, 0x8} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 131328, freeze = true}}) yf(1406971) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/5495368bdbd39166a7d624cfec068597.png", ["名字"]="据点", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="50", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0x868,0xC2C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}})---手持据点 yf(1407103) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/8fb450c334fbf512e05c559509fbdb71.png", ["名字"]="伤害显示", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="100", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0xA1C}--伤害显示 local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 4, value = 2, freeze = true}}) yf(1407259) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/8a64042b49c811f184a8817e827aede9.png", ["名字"]="无后", ["渐变1"]="0xffee0000", ["渐变2"]="0xffffffff", ["背景圆角"]="10", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0xF98,0x210} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 0, freeze = true}}) yf(1407366) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/d0944203788da6b662213e88a89efa01.png", ["名字"]="锁帧", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="10", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x2A20,0x1C} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 120, freeze = true}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x2A20,0x18} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 120, freeze = true}}) yf(1407512) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/27aa1f825597033cd75c7a5632859b3c.png", ["名字"]="微加速", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="50", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x1168} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 7, freeze = true}}) yf(1407140) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/1a1318c06d36b997cec338ec7d1de58e.png", ["名字"]="范围拾取", ["渐变1"]="0xffffffff", ["渐变2"]="0xffee0000", ["背景圆角"]="100", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x1EC4} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = 1000, freeze = true}}) yf(1407142) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end },{ ["图片"]="https://pan.jl8.top/view.php/f500e90d18d8f49d82e28eb888a2d9ed.png", ["名字"]="防抖", ["渐变1"]="0xffee0000", ["渐变2"]="0xffffffff", ["背景圆角"]="10", ["功能开"]=function() function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0x868,0xCF4} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, freeze = true}})---手持防抖 local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0x868,0xCF0} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, freeze = true}})---手持防抖 local t = {"libUE4.so:bss", "Cb"} local tt = {0x56CFF0,0x30,0x4B8,0x2AF0,0x868,0xCEC} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, freeze = true}})---手持防抖 yf(1406872) gg.playMusic("https://pan.jl8.top/view.php/b61f87c69137cac3d56221cc2fae2b2c.mp3") gg.sleep(5000)--等待五秒 yf(0) gg.playMusic("https://pan.jl8.top/view.php/d770ddf701b9796a9284b0dd6820f25b.mp3") end, ["功能关"]=function() end }, }), }}, [2]={--第二分区 ['分区名字']="功能2", ['功能配置']={ changan.box({ "box菜单", changan.check({ { "例子", function() end }, { "例子", function() end, function() end }, { "测试1", function() end, function() end }, }), changan.switch( "开关事例", function() end, function() end ), changan.switch( "开关事例", function() end, function() end ), changan.switch( "开关事例", function() end, function() end ), changan.switch( "开关事例", function() end, function() end ), }), }}, [3]={--第三分区 ['分区名字']="防", ['功能配置']={ changan.text("野鸡" , "0xff000000" , "20sp" ) , changan.line(), changan.radio({ { "过检测", function() end, function() end,"[图标开]"},{ "待开发", function() end, function() end,"[大厅界面开启,可连打]" },{ "待开发", function() end, function() end,"[测试]" },{ "待开发", function() end, function() end,"[退出时必开]" }, }) }}, [4]={--第四分区 ['分区名字']="待开发", ['功能配置']={ changan.seek("拉条演示","ltxx",1,20,1),--“ltxx”为此拉条变量名字,使用时每个拉条不可重复 changan.button( "调用拉条", function() gg.alert(ltxx) end), }}, [5]={--第五分区 ['分区名字']="待开发", ['功能配置']={ changan.check({ { "例子", function() end }, { "例子", function() end, function() end }, { "测试1", function() end, function() end }, }), }}, [6]={--第六分区 ['分区名字']="待开发", ['功能配置']={ },} } 第二页 = { ['分页名字']="音乐", [1]={--第一分区 ['分区名字']="搜索音乐", ['功能配置']={ changan.button("暂停", function() toMusic("已暂停") end), wyylog, },}, [2]={--第二分区 ['分区名字']="推荐音乐", ['功能配置']={ },} } 第三页={ ['分页名字']="反馈", [1]={ ['分区名字']="反馈", ['功能配置']={ },} } 第四页 = { ['分页名字']="设置", [1]={--第一分区 ['分区名字']="UI设置", ['功能配置']={ changan.switch("音量键隐藏UI", function() volumeKey=true end, function() volumeKey=false end), changan.switch("摇一摇隐藏UI", function() 摇一摇=true end, function() 摇一摇=false end), changan.button("加入总群", function() gg.QQgroup("1108317924") end), changan.button( "退出", function() tuichu=1 end), },} } changan.menu({ 第一页,--调用上边的分页配置 第二页, 第三页, 第四页 })