-
Notifications
You must be signed in to change notification settings - Fork 3
youxilua/android_URI4Resource
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
5.18 更新: 支持手动指定某个view执行脚本命令 例如 1,在视图里面 <Button android:onClick="execTags" android:tag="cmd://hint/#Hello,World" <!--一下忽略 --> /> 2,绑定的activity 实现 ExecTagListener 接口 重写: @Override public void execTags(View v) { new TagListener(this).doExecUrl(v, v.getTag().toString()); } 视图引擎: 为view 打上map值 map:key //表达式部分 未来网络部分支持: 1,post,get post://packageName@className:port/?id0=editText1&id1=editText2 5.14 完成取得视图数据模块 添加一个脚本命令的步骤 InitViewTag -> TagCheck //这两步是初始化过程 tagListener 更新: 1,支持act之间的跳转 完整命令写法: act://com.achai@com.achai.main.TargetActivity:FLAG/?id=1234&json=xxxx 一:命令体系 1.基于URI的tag写法 (1) TAG结构组成 一个完整的tag应该是这样写的 scheme://host:port/path?query#fragment 或者 scheme://userInfo@host:port/path?query#fragment (2)目前支持以下几种写法 1, scheme://host/#fragment Ex1, 如果只是改变view的状态可以这么写 view://text/#Hello,World! Ex2, 执行一个Toast命令 cmd://hint/#Hello,World! 2,scheme://host/?query#fragment Ex3, 指定一个view的状态 cmd://setview/?id=textview1&attribute=text#Hello,World! 3,scheme://host/#fragment\nscheme://host/?query#fragment Ex4, 执行多行命令 view://text/#Hello,World!\n cmd://setview/?attribute=visibility#gone 附录: 当前支持 1,scheme (1) cmd://host/ 执行一定操作 1,host -> hint Toast 显示 2,host -> setview 控制指定ID的view状态,没有就控制自身 3,host -> finish finish (2) view://host/#framgent 设置view的状态 1, host -> 为android:attribute 其中attribute为将要支持的参数 2, fragment -> 为android:attribute=xxx 其中xxx为将要支持的参数 (3) act:// 跳转到某个activity 简单教程 博客: http://www.cnblogs.com/youxilua/archive/2012/05/06/2485975.html 1,setView view://界面属性/#值 界面属性:与android的一致! # 的参数 也是与android的一致! 例如:设置一个view是否可见 view://visibility/#gone 设置这个tag的view 隐藏了