Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (112.62 KB, 2 trang )
Trung tâm Tin học – ĐH KHTN
Mẹo nhỏ thể hiện hình ảnh
File main:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=" /> android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/webView1"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/englan11d" />
</LinearLayout>
File Activity:
package com.dac;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class TestNg21Th11Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView w = (WebView)findViewById(R.id.webView1);