local file = require("file") xfc配置="https://image.rlyun.fun/down.php/59d98a498b32f98096f92c6897930144.xfc" 字体="https://www.cccimg.com/down.php/792a041b77b53e2594c084e5da34c48c.ttf" 海报="https://www.cccimg.com/view.php/9c467c5b1fcd524f9356c800a28a0e06.jpg" local root_path = "/sdcard/中野四叶ELGG/" local mk = {"UI3资源"} for i=1,#mk do file.mkdir(root_path..mk[i]) end local 资源 = {xfc配置,字体,海报} local respath = { "UI3资源/.xfc", "UI3资源/字体.ttf", "UI3资源/海报" } for i=1,#资源 do local full_path = root_path .. respath[i] if not file.exists(full_path) then gg.toast("正在努力下载文件中....") gg.downloadFile(资源[i], full_path) end end gg.toast("文件检测通过,加载UI...") function 切换图标形式() luajava.runOnUiThread(function() visi1("圆形图标") visi1("矩形图标") end) end luajava = require("luajava") import "android.app.*" import "android.os.*" import "android.widget.*" import "android.view.*" import "android.content.*" import "android.*" import "android.graphics.drawable.*" import "android.ext.*" import "android.graphics.drawable.GradientDrawable" import "android.graphics.*" import "android.graphics.drawable.ColorDrawable" import "android.content.Context" import "android.media.AudioManager" import "android.webkit.MimeTypeMap" import "android.app.*" import "android.os.*" import "android.widget.*" import "android.view.*" import "android.graphics.drawable.*" import "android.animation.ObjectAnimator" import "android.view.animation.*" import "android.graphics.*" import "android.text.style.*" import "android.text.SpannableString" import "android.text.Spanned" import "android.widget.Toast" import "java.io.File" import "android.graphics.Color" import "android.content.res.ColorStateList" import 'androidx.core.widget.NestedScrollView' import 'android.widget.ScrollView' import 'android.widget.RadioGroup' import("android.animation.LayoutTransition") local material3 = elgg.import("material3") context = material3:getContext() context.setTheme(0x7f090069) gg.setVisible(false) import "android.os.*" import "android.view.*" import "android.widget.*" import "android.graphics.PixelFormat" import "android.graphics.Color" import "android.graphics.drawable.GradientDrawable" import "android.graphics.drawable.StateListDrawable" import "com.google.android.material.materialswitch.MaterialSwitch" import "android.graphics.Color" import "android.content.res.ColorStateList" import "android.animation.LayoutTransition" import 'com.google.android.material.slider.Slider' import "android.animation.ObjectAnimator" import "android.animation.AnimatorSet" import "android.view.animation.DecelerateInterpolator" import "android.animation.LayoutTransition" import "android.view.animation.RotateAnimation" import "android.view.animation.Animation" import "android.graphics.drawable.BitmapDrawable" import "android.view.animation.AccelerateInterpolator" import "android.view.animation.DecelerateInterpolator" import "android.view.animation.OvershootInterpolator" import "android.view.animation.BounceInterpolator" import "android.view.animation.LinearInterpolator" import "android.view.animation.PathInterpolator" elgg.import("toast") elgg.import("HiddenApiBypass") local HotPoint = luajava.bindClass("android.ext.HotPoint") local HP = HotPoint.getMethod("d") HotPoint = HotPoint.instance HotPoint.f() import "android.view.ViewRootImpl" import "android.view.View" import "android.graphics.BlurMaskFilter" import "android.graphics.drawable.BitmapDrawable" import "android.graphics.Canvas" import "android.graphics.Paint" import "android.graphics.Bitmap" import "android.view.ViewRootImpl" window = context.getSystemService("window") import("com.google.android.material.card.MaterialCardView") 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("androidx.constraintlayout.utils.widget.ImageFilterView") import "com.romainpiel.shimmer.Shimmer" import "com.romainpiel.shimmer.ShimmerTextView" import "android.os.Handler" import "android.os.Looper" local BlurMaskFilter = luajava.bindClass("android.graphics.BlurMaskFilter") local Blur = luajava.bindClass("android.graphics.BlurMaskFilter$Blur") local RectShape = luajava.bindClass("android.graphics.drawable.shapes.RectShape") local ShapeDrawable = luajava.bindClass("android.graphics.drawable.ShapeDrawable") local Color = luajava.bindClass("android.graphics.Color") function 绑定模糊(view) if view == nil then print("错误:绑定模糊视图为nil") return end view.post(function() local viewRootImpl = touch.getViewRootImpl() -- 越过安卓限制,调用安卓隐藏 API view.setBackgroundDrawable( HiddenApiBypass.getDeclaredMethod(ViewRootImpl, "createBackgroundBlurDrawable", {}) .invoke(viewRootImpl, {}) .setBlurRadius(20) .setCornerRadius(30) ) end) end local typeface = import("android.graphics.Typeface") local FontPath = "/storage/emulated/0/中野四叶ELGG/UI3资源/字体.ttf" local font = typeface.createFromFile(FontPath) function miaobian(d, r, t, y) local drawable = GradientDrawable() drawable.setShape(GradientDrawable.RECTANGLE) drawable.setColor(t) drawable.setCornerRadii({ r, r, r, r, r, r, r, r }); drawable.setStroke(d,y) return drawable end function getShepeBackground(color, radiu) drawable = luajava.new(GradientDrawable) drawable.setShape(GradientDrawable.RECTANGLE) drawable.setColor(color) drawable.setCornerRadii({ radiu, radiu, radiu, radiu, radiu, radiu, radiu, radiu }) return drawable 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 function getShepeBackground2(color, radiu, size, bk_color) drawable = luajava.new(GradientDrawable) drawable.setShape(GradientDrawable.RECTANGLE) drawable.setColor(color) drawable.setStroke(size, tonumber(bk_color)) drawable.setCornerRadii({ radiu, radiu, radiu, radiu, radiu, radiu, radiu, radiu }) return drawable end function alert(text) local function material3_test() local function show_alert() local alertBuilder = MaterialAlertDialogBuilder(context) alertBuilder.setTitle("提示:").setMessage(text).setPositiveButton("确定") local LayoutParams = luajava.bindClass('android.view.WindowManager$LayoutParams') local alert = alertBuilder.create() alert.getWindow().setType(gg.ANDROID_SDK_INT >= 26 and LayoutParams.TYPE_APPLICATION_OVERLAY or LayoutParams.TYPE_PHONE) alert.show() end local success, err = pcall(show_alert) if not success then print("错误信息:" .. err) end end material3_test() end 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 layoutParams.gravity = Gravity.TOP|Gravity.LEFT layoutParams.width = LayoutParams.WRAP_CONTENT layoutParams.height = LayoutParams.WRAP_CONTENT return layoutParams end function 变大(view) local scaleXAnimator = ObjectAnimator.ofFloat(view, "scaleX", 0, 0.4, 0.7, 1) local scaleYAnimator = ObjectAnimator.ofFloat(view, "scaleY", 0, 0.4, 0.7, 1) local animatorSet = AnimatorSet() animatorSet.playTogether(scaleXAnimator, scaleYAnimator) animatorSet.setDuration(600) animatorSet.setInterpolator(DecelerateInterpolator()) animatorSet.start() end function 变小(view) local scaleXAnimator1 = ObjectAnimator.ofFloat(view, "scaleX", 1, 0.7, 0.4, 0) local scaleYAnimator1 = ObjectAnimator.ofFloat(view, "scaleY", 1, 0.7, 0.4, 0) local animatorSet1 = AnimatorSet() animatorSet1.playTogether(scaleXAnimator1, scaleYAnimator1) animatorSet1.setDuration(600) animatorSet1.setInterpolator(DecelerateInterpolator()) animatorSet1.start() end function luajava.newThread(回调函数) local Thread = luajava.bindClass("java.lang.Thread") local Runnable = luajava.bindClass("java.lang.Runnable") local myRunnable = luajava.createProxy("java.lang.Runnable", { run = 回调函数 }) local thread = luajava.new(Thread, myRunnable) return thread end function 添加触控(id, lay, params) if id == nil then -- print("错误:触控"..id.."为nil") return end function id.onTouch(v, event) local Action = event.getAction() if Action == MotionEvent.ACTION_DOWN then RawX = event.getRawX() RawY = event.getRawY() x = params.x y = params.y elseif Action == MotionEvent.ACTION_MOVE then params.x = tonumber(x) + (event.getRawX() - RawX) params.y = tonumber(y) + (event.getRawY() - RawY) window.updateViewLayout(lay, params) end end end function createBlurDrawable() -- 绑定必要的 Java 类 local BlurMaskFilter = luajava.bindClass("android.graphics.BlurMaskFilter") local Blur = luajava.bindClass("android.graphics.BlurMaskFilter$Blur") local RectShape = luajava.bindClass("android.graphics.drawable.shapes.RectShape") local ShapeDrawable = luajava.bindClass("android.graphics.drawable.ShapeDrawable") local Color = luajava.bindClass("android.graphics.Color") -- 创建模糊效果 local blur = BlurMaskFilter(12000, Blur.NORMAL) -- 创建形状 local shape = luajava.new(RectShape) local shapeDrawable = luajava.new(ShapeDrawable, shape) -- 设置画笔 local paint = shapeDrawable.getPaint() paint.setMaskFilter(blur) paint.setColor(Color.parseColor("#aaFFFFFF")) -- 半透明蓝色 return shapeDrawable end function applyBestBlurEffect(view, radius) -- Android 12+ 使用RenderEffect if Build.VERSION.SDK_INT >= 31 then import "android.graphics.RenderEffect" import "android.graphics.Shader" local blurEffect = RenderEffect.createBlurEffect( radius, radius, Shader.TileMode.CLAMP ) view.setRenderEffect(blurEffect) return true end -- Android 8-11 使用RenderScript if Build.VERSION.SDK_INT >= 26 then local rootView = activity.getWindow().getDecorView().getRootView() if 安卓12吗 then local blurredBg = applyFullResBlur(rootView, radius) end view.setBackgroundDrawable(BitmapDrawable(activity.getResources(), blurredBg)) return true end -- 旧版本使用简单模糊 local drawable = GradientDrawable() drawable.setColor(0x80000000) -- 半透明黑色 drawable.setCornerRadius(35) view.setBackgroundDrawable(drawable) return false end function 海报背景1() local filePath = "/sdcard/中野四叶ELGG/UI3资源/海报" local bmp = BitmapFactory.decodeFile(filePath) if bmp then return BitmapDrawable(activity.getResources(), bmp) end end changan = {} changan = changan function changan.menu(sview) function 隐藏() if tonumber(tostring(load("return 悬浮")().getVisibility())) == 8.0 then 变大(悬浮) visi("触摸") visi("悬浮") mainLayoutParams.flags = LayoutParams.FLAG_NOT_FOCUSABLE else 变大(触摸) visi("触摸") visi("悬浮") mainLayoutParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL end end Lock.Ui(function() function 切换(x) 主页面.showPage(x-1) end local LayoutParams = WindowManager.LayoutParams mainLayoutParams = getLayoutParams(LayoutParams.FLAG_NOT_FOCUSABLE) 悬浮球 = loadlayout({ LinearLayout, layout_width = "fill", layout_height = "fill", visibility = "visible", id = "悬浮", { LinearLayout, layout_width = "50dp", layout_height = "50dp", visibility = "visible", id = "圆形图标", onClick = function() 隐藏() end, { ImageFilterView, layout_width = "50dp", src = "/sdcard/中野四叶ELGG/UI3资源/.xfc", round="90", layout_height = "50dp", onClick = function() 隐藏() end, } },{ LinearLayout, layout_width = "107dp", layout_height = "47dp", visibility = "gone", id = "矩形图标", gravity = "center", background = miaobian(5, 30, "0xFFFFFFFF", "0xFF000000"), onClick = function () 隐藏() end, { ImageFilterView, layout_width = "43dp", src = "/sdcard/中野四叶ELGG/UI3资源/.xfc", round = 90, layout_height = "43dp", layout_margin = "1dp", }, { TextView, text = 矩形文字, Typeface=font, textColor = "0xFF000000", layout_marginLeft = "3dp", } } }) 添加触控(圆形图标, 悬浮球, mainLayoutParams) 添加触控(矩形图标, 悬浮球, mainLayoutParams) 侧边栏 = { LinearLayout, layout_width = "75dp", orientation = "vertical", layout_height = "fill", layout_marginTop = "3dp", id = "侧边", layout_marginLeft = "4dp", elevation = "3dp", background = getShepeBackground("0xFFffffff", 30), { LinearLayout, gravity = "center", id = "主页面图标", layout_width = "75dp", layout_height = "75dp", -- elevation = "3dp", onClick = function() 隐藏() end, -- background = getShepeBackground("0xFFffffff", 90), { ImageFilterView, layout_width = "70dp", src = "/sdcard/中野四叶ELGG/UI3资源/.xfc", round="90", -- elevation = "3dp", layout_height = "70dp", }, }, } for i=1,#stab do 侧边栏[#侧边栏+1] = { LinearLayout, id = "jm"..i, layout_height = "25dp", layout_width = "65dp", layout_marginTop = "10dp", layout_marginBottom = "3dp", layout_marginRight = "5dp", orientation = "horizontal", elevation='2dp', layout_marginLeft = "5dp", gravity = "center", onClick = function() luajava.runOnUiThread(function() 切换(i) end)end, { TextView, Typeface=font, text = stab[i], gravity = "center", layout_weight = 15, id="jmt"..i, textColor = "0xff000000", layout_height = "20dp", layout_width = "60dp", }, } end 侧边栏 = { ScrollView, layout_height = "fill", layout_width = "80dp", 侧边栏 } page = {} for i = 1, #stab do page[#page + 1] = { LinearLayout, layout_height = "match_parent", layout_width = "match_parent", orientation = "vertical", } for k = 1, #sview[i] do page[#page][#page[i] + 1] = sview[i][k] end page[#page] = { ScrollView, layout_height = "match_parent", layout_width = "80dp", page[#page] } end 悬浮窗 = { LinearLayout, layout_height = "fill", layout_width = "fill", orientation = "horizontal", visibility = "gone", id = "触摸", { LinearLayout, layout_width = "330dp", layout_height = "300dp", background = miaobian(5, 30, "0xFFFFFFFF", "0xff000000"), -- elevation='2dp', id = "桌面", 侧边栏, { PageView, layout_width = "235dp", id = "主页面", layout_height = "265dp", pages = page, }, }, } 悬浮窗 = loadlayout(悬浮窗) 添加触控(主页面图标, 悬浮窗, mainLayoutParams) xm=1 变大(悬浮球) huiz() window.addView(悬浮球, mainLayoutParams) window.addView(悬浮窗, mainLayoutParams) gg.hide(true) end,nil,function(err) print(err) luajava.exit() end) end function changan.switch(name,func1,func2) if name == "隐藏GG图标" or name == "Emoji背景" then get = true else get = false end BSKJ = { LinearLayout, layout_height = "47dp", layout_width = "fill_parent", layout_marginTop = "3dp", layout_marginLeft = "5dp", layout_margin = "3dp", elevation = "3dp", background = getShepeBackground(0xffffffff,30), { TextView, Typeface=font, text = name, gravity = "center|left", layout_weight = 25, textColor = "0xff000000", layout_marginLeft = "5dp", layout_marginTop = "5dp", layout_height = "40dp", layout_width = "60dp", },{ MaterialSwitch, gravity = "center|right", layout_marginRight = "5dp", layout_height = "40dp", layout_width = "60dp", checked = get, __onFinish=function(v) v.setOnCheckedChangeListener({ onCheckedChanged = function(buttonView,isChecked) luajava.newThread(function() if isChecked then local success, err = pcall(func1) if not success then print("错误信息:" .. err) end else local success, err = pcall(func2) if not success then print("错误信息:" .. err) end end end):start() end }) end, }, } BSKJ=loadlayout(BSKJ) return BSKJ end function changan.NoTswitch(name,func1,func2) get = false BSKJ = { LinearLayout, layout_height = "47dp", layout_width = "fill_parent", layout_marginTop = "3dp", layout_marginLeft = "5dp", layout_margin = "3dp", elevation = "3dp", background = getShepeBackground(0xffffffff,30), { TextView, Typeface=font, text = name, gravity = "center|left", layout_weight = 25, textColor = "0xff000000", layout_marginLeft = "5dp", layout_marginTop = "5dp", layout_height = "40dp", layout_width = "60dp", },{ MaterialSwitch, gravity = "center|right", layout_marginRight = "5dp", layout_height = "40dp", layout_width = "60dp", checked = get, __onFinish=function(v) v.setOnCheckedChangeListener({ onCheckedChanged = function(buttonView,isChecked) if isChecked then local success, err = pcall(func1) if not success then print("错误信息:" .. err) end else local success, err = pcall(func2) if not success then print("错误信息:" .. err) end end end }) end, }, } BSKJ=loadlayout(BSKJ) return BSKJ end BSKJ1={} function changan.button(name,func,color) tid=name if not color then color = 0xff000000 end BSKJ1[tid] = { LinearLayout, layout_height = "47dp", layout_width = "fill_parent", layout_marginTop = "5dp", layout_marginLeft = "5dp", layout_margin = "3dp", gravity = "center", elevation = "3dp", background = getShepeBackground(0xffffffff,30), onClick = function() luajava.newThread(function() local success, err = pcall(func) if not success then print("错误信息:" .. err) end end):start() end, { TextView, Typeface=font, text = name, gravity = "center|left", layout_weight = 25, textColor = color, layout_marginLeft = "5dp", layout_height = "40dp", layout_width = "60dp", },{ ImageView, src="/sdcard/中野四叶ELGG/UI3资源/侧边图标", layout_height = "25dp", layout_width = "35dp", }, } return loadlayout(BSKJ1[tid]) end function 海报栏() local diyui = { LinearLayout, layout_height = "100dp", layout_width = "match", layout_margin = "5dp", orientation = "vertical", { CardView, background = getShepeBackground(0xffffffff, 25), elevation = "2dp"; { RelativeLayout, { PageView, layout_width = "match", layout_height = "match", id = "bannerView", pages = { { LinearLayout, layout_height = "match", orientation = "vertical", layout_width = "match", { RelativeLayout, { LinearLayout, layout_height = "match", layout_width = "match", background=海报背景1(), id = "oooxfc1", }, { LinearLayout, layout_height = "80dp", layout_width = "match", { LinearLayout, layout_height = "100dp", layout_width = "match", background=海报背景1(), } }, }, }, }, }, }, { RelativeLayout, layout_height = "20dp", layout_width = "match", layout_marginTop = "80dp", id = "模糊栏", { TextView, layout_height = "20dp", text=矩形文字, Typeface=font, TextSize="5sp", gravity="center"; TextColor="0xffffffff", singleLine=true, layout_width = "match", layout_marginButtom = "80dp", }, }, }, } local diyui = loadlayout(diyui) return diyui end function visi(id) if tonumber(tostring(load("return "..id)().getVisibility())) == 8.0 then load("return "..id)().setVisibility(View.VISIBLE) else load("return "..id)().setVisibility(View.GONE) end end function visi1(id) if tonumber(tostring(load("return "..id)().getVisibility())) == 8.0 then load("return "..id)().setVisibility(View.VISIBLE) else load("return "..id)().setVisibility(View.GONE) end end function hide(id) load("return "..id)().setVisibility(View.GONE) end function view(id) load("return "..id)().setVisibility(View.VISIBLE) end setOnAudioListener(function(str) if str == "增加" then gg.toast("view") load("return 触摸")().post(function() 变大("悬浮") hide("触摸") view("悬浮") end) else gg.toast("hide") load("return 触摸")().post(function() hide("触摸") hide("悬浮") end) end end) function changan.box(views) radios = { LinearLayout , orientation = "vertical" , visibility = "gone" , id = "radios"..views[1], layout_width = 'fill_parent' , } for i = 2,# views do radios [# radios + 1] = views [i] end firadio = { LinearLayout , layout_width = 'fill_parent' , layout_height = "wrap_content" , gravity = "center_horizontal" , orientation = "vertical" , layout_margin = "3dp", layout_marginTop = "3dp", layout_marginLeft = "5dp", background=getShepeBackground(0xffffffff,30), elevation='4dp', LayoutTransition=LayoutTransition(), { LinearLayout , layout_width = '225dp' , layout_height = "50dp" , gravity = "center_vertical" , padding="10dp", onClick=function() visi("radios"..views[1]) end, { TextView, Typeface=font, text = views [1] , layout_width = "match_parent" , layout_weight = 25, textColor = "#000000" , gravity = "top|left" , }, }, radios, } BSKJ=loadlayout(firadio) return BSKJ end function changan.radio(cklist) radioG={ RadioGroup, elevation = '2dp', gravity = 'top', layout_height = 'wrap_content', layout_margin = '4dp', layout_width = 'match_parent', orientation = 'vertical', } for i=1,#cklist do radioG[#radioG+1] = { RadioButton, gravity = 'center_vertical', layout_height = 'wrap_content', layout_marginLeft = '2dp', layout_marginRight = '2dp', layout_width = 'match_parent', onClick = function() luajava.newThread(function() pcall(cklist[i][2]) end):start() end, text = cklist[i][1], buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{0xff161616,0xff303030}), textColor = '0xff161616', } end BSKJ = { LinearLayout, layout_height = "wrap_content", layout_width = "fill_parent", layout_marginTop = "3dp", layout_marginLeft = "5dp", layout_margin = "3dp", elevation = "3dp", orientation = "vertical" , background = getShepeBackground(0xffffffff,30), radioG, } BSKJ=loadlayout(BSKJ) return BSKJ end function changan.check(cklist) BSKJ = { LinearLayout, layout_height = "wrap_content", layout_width = "fill_parent", layout_marginTop = "3dp", layout_marginLeft = "5dp", layout_margin = "3dp", elevation = "3dp", orientation = "vertical" , background = getShepeBackground(0xffffffff,30), } for i=1,#cklist do BSKJ[#BSKJ+1] = { CheckBox, gravity = 'center_vertical', layout_height = 'wrap_content', layout_marginLeft = '2dp', layout_marginRight = '2dp', layout_width = 'match_parent', __onFinish=function(v) v.setOnCheckedChangeListener({ onCheckedChanged = function(compoundButton,isChecked) if isChecked then luajava.newThread(function() pcall(cklist[i][2]) end):start() else luajava.newThread(function() pcall(cklist[i][3]) end):start() end end }) end, text = cklist[i][1], buttonTintList=ColorStateList({{android.R.attr.state_checked},{-android.R.attr.state_checked}},{0xff161616,0xff303030}), textColor = '0xff161616', } end BSKJ=loadlayout(BSKJ) return BSKJ end function huoqu(txt) return table.json(gg.makeRequest(wyyget.."song/url/v1?id="..txt.."&level=standard").content) 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=10").content) end function develo(tabb) gg.alert(tostring(tabb)) end function develo2(tabb) gg.copyText(tostring(tabb)) end function tablekIn(tbl, key) if tbl == nil then return false end for k, v in pairs(tbl) do if k == key then return true end end return false end function changan.text(text,size,color) if not size then size="15sp" color = 0xff000000 end SW = { LinearLayout, layout_height = "wrap_content", layout_width = "fill_parent", layout_marginTop = "5dp", layout_marginLeft = "4dp", layout_margin = "3dp", gravity = "center", elevation = "3dp", background = getShepeBackground(0xffffffff,30), { TextView, Typeface=font, text = text, gravity = "center", layout_weight = 25, textColor = color, layout_marginLeft = "5dp", layout_marginTop = "10dp", layout_height = "wrap_content", layout_width = "60dp", }, } SW=loadlayout(SW) return SW end 公告=[[ ]] 矩形文字 = "中野四叶" function huiz() end stab = { "主页", "测试", } changan.menu( { { changan.switch( "隐藏GG图标", function() gg.hide(true) end, function() gg.hide(false) end), changan.switch( "切换图标形式", function() 切换图标形式() end, function() 切换图标形式() end), changan.button( "退出", function() luajava.exit() gg.setVisible(true) end), },{ changan.switch( "隐藏GG图标", function() gg.hide(true) end, function() gg.hide(false) end), changan.switch( "切换图标形式", function() 切换图标形式() end, function() 切换图标形式() end), } })