设为首页 加入收藏

TOP

Android--在程序里浏览网页/Webview的使用
2014-11-24 08:24:43 来源: 作者: 【 】 浏览:1
Tags:Android-- 程序 浏览 网页 /Webview 使用



在程序中需要一个Webview控件用于显示网页,下方的两个按钮一个是回到前一页,一个是去往下一页,保存在混村中。


下面给出程序的实现代码:


1.布局文件


< xml version="1.0" encoding="utf-8" >
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"


android:layout_width="fill_parent"
android:layout_height="fill_parent"
>





android:id="@+id/myEditText1"
android:layout_width="267px"
android:layout_height="60px"
android:layout_x="13dp"
android:layout_y="38dp"
android:ems="10"
android:textSize="18sp" />


android:id="@+id/myImageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="206dp"
android:layout_y="38dp"
android:background="@drawable/white"
android:src="@drawable/go" />


android:id="@+id/myWebView1"
android:layout_width="match_parent"
android:layout_height="340dp"
android:layout_x="0dp"
android:layout_y="79dp"
android:background="@drawable/black"
android:focusable="false" />


android:id="@+id/buttonback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="38dp"
android:layout_y="426dp"
android:text="Back " />


android:id="@+id/buttonfoward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="179dp"
android:layout_y="426dp"
android:text="Forward" />


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android--调用内置的浏览器 下一篇Android--EditText控件属性汇总

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·如何理解c语言指针和 (2025-12-27 01:19:11)
·为什么C标准库没有链 (2025-12-27 01:19:08)
·玩转C语言和数据结构 (2025-12-27 01:19:05)
·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)