Android UI使用HTML布局方法实例
很多时候我们用HTML布局会更方便直接,记录一下。
我现在主要是直接调用服务器的网页(实际上是jsp的,只是返回的是html),所以需要联网,第一步添加权限。
<uses-permissionandroid:name="android.permission.INTERNET"/>
布局文件直接用一个WebView,如下:
<?xmlversion="1.0"encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<WebView android:id="@+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent"/>
</LinearLayout>
热门推荐
10 儿子立冬祝福语简短独特
11 对当兵的祝福语简短
12 侄儿高考试祝福语简短
13 伴郎红包祝福语朋友简短
14 媳妇生日简短祝福语朋友
15 公司年会祝福语简短最好
16 元旦感恩祝福语简短大全
17 红包祝福语简短10字
18 周六早晨祝福语简短