解说社区

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 322|回复: 4

[原创] 分享解说插件 破折号 破折号 调节进度话快(可以模拟调节常规不能操作的进度条)

[复制链接]
发表于 2023-10-30 16:52:54 来自手机 | 显示全部楼层 |阅读模式
打开解说/资源下载/扩展插件,搜索调节进度滑块,就能找到。
使用方法,首先要把焦点落在进度条上面,然后打开插件后。上面是输入百分比的编辑框。下面是5%每个按钮的选择,点击即可调节。
因为它是计算屏幕像素来得到进度条长度来调节的,这个计算过程有小数的部分,最后出来的结果都会变成整数,所以调节出来的进度跟实际的进度有些许差距。顺便请教大家。这个误差有什么办法解决呢?非常感谢



  来自解说社区客户端
回复

使用道具 举报

 楼主| 发表于 2023-10-30 16:53:29 来自手机 | 显示全部楼层
本帖最后由 hoibo 于 2023-11-9 00:50 编辑

if service.isSeekBar(node)
require "import"
import "android.graphics.Rect"
import "android.widget.*"
import "android.view.*"
local t={"0","5","10","15","20","25","30","35","40","45","50","55","60","65","70","75","80","85","90","95","100",}
layout=
{
LinearLayout,orientation=1,layout_width=-1,layout_height=-1,{
EditText,hint="请输入百分比",Gravity="center_horizontal",id="edit",InputType="phone",layout_width=-1,layout_weight=1,},
{Button,text="确定",onClick="zb",layout_width=-1,layout_weight=1,},
{GridView,id="grid",numColumns=4,Gravity="center_horizontal",layout_weight=1,}
}
dlg=LuaDialog(service)
dlg.View=loadlayout(layout)
grid.adapter=SingleLineAdapter(service,String(t))
dlg.show()
grid.onItemClick=function(l,v,p,i)
dlg.dismiss()
local p=Rect()
node.getBoundsInScreen(p)
service.click({{"["..tonumber(p.left)..","..tonumber(p.top+(p.bottom-p.top)/2)..","..tonumber(p.left+(p.right-p.left)/100*v.text)..","..tonumber(p.top+(p.bottom-p.top)/2)..",300]"}})
end
function zb()
local p=Rect()
node.getBoundsInScreen(p)
dlg.dismiss()
service.click({{"["..tonumber(p.left)..","..tonumber(p.top+(p.bottom-p.top)/2)..","..tonumber(p.left+(p.right-p.left)/100*edit.text)..","..tonumber(p.top+(p.bottom-p.top)/2)..",300]"}})
end
else
service.asyncSpeak("当前焦点不是进度滑块")
end
return true
回复

使用道具 举报

发表于 2023-10-30 22:47:40 来自手机 | 显示全部楼层
好样的,我下载下来看看能不能调节微信公众号。里面的音频



  来自解说社区客户端
回复

使用道具 举报

发表于 2023-10-30 22:54:52 来自手机 | 显示全部楼层
经过亲测,依然无法调节公众号内的音频进度条,解说本身的调进度条也没法调,经过这个插件依然无用



  来自解说社区客户端
回复

使用道具 举报

发表于 2023-11-18 23:41:34 来自手机 | 显示全部楼层
OK啊,那我试试看华为设置里面设置音量的那个进度条

来源,倾城乐园
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|解说社区

GMT+8, 2024-5-3 06:43 , Processed in 0.046787 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表