<?xml version="1.0" encoding="UTF-8" ?>
<TextView android:background="#ff00ff"
android:textColor="#000000"
android:layout_width="match_parent"
android:layout_height="20dp"
android:textSize="15dp"
android:gravity="center"
android:text="大齐"/>
<Button
android:text="关注"
></Button>
<Button
android:text="养号"
></Button>
<Button
android:text="开始"
></Button>
<ImageView android:layout_height="wrap_content"
android:layout_width="match_parent"
android:src="@drawable/start.png"
/>
</LinearLayout>
+
+
+ui.js
function main() {
// 参数设置 = main.html
// 使用说明 = intr.html
// 定时任务 = timer.html
// 其他 = other.html
// ui.layout(“参数设置”, “main.html”);
// ui.layout(“使用说明”, “intr.html”);
// ui.layout(“定时任务”, “timer.html”);
//ui.layout(“其他”, “other.html”);
let tag =‘124’;
ui.registeH5Function(‘of’,function () {
floaty.showFloatXml(tag,‘dialog2.xml’,1,100)
});
ui.registeH5Function(‘cf’,function () {
floaty.close(tag);
})
ui.layout(‘参数设置’,‘other.html’);
}
main();
other.html
<!doctype html>
<!-- head 中 -->
<link rel="stylesheet" href="css/materialize.min.css">
<title>H5 网页示例</title>
</head>
<body style="padding: 20px">
<div class="card-panel">
<span class="blue-text text-darken-2" id="service">说明文字</span>
</div>
<div class="col s6">
<button class="btn waves-effect waves-light" type="button" name="action"
onclick="openF()">
打开浮窗
</button>
</div>
<hr>
<div class="col s6">
<button class="btn waves-effect waves-light" type="button" name="action"
onclick="closeF()">
关闭浮窗
</button>
</div>
<!-- body 最后 -->
<script src="htmljs/jquery.min.js"></script>
<script src="htmljs/materialize.min.js"></script>
<script>
function openF() {
window.ec.toast('ss')
window.ec.call('of','')
}
function closeF() {
window.ec.call('cf','');
}
</script>
</body>
图片位置
更正一下图片位置