android - Table Layout with WebView -
i adding webview
in table row
, loading data, data not displaying me, can tell problem. if linear layout
working not working in table layout
table row?
*main.xml*
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <tablelayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <tablerow android:layout_width="fill_parent" android:layout_height="wrap_content"> <webview android:id="@+id/link4_view" android:layout_width="fill_parent" android:layout_height="wrap_content"/> </tablerow> </tablelayout> </linearlayout>
samplewebcheckactivity.java
package com.samplecheck; import android.app.activity; import android.content.intent; import android.net.uri; import android.os.bundle; import android.text.util.linkify; import android.view.view; import android.webkit.webview; import android.widget.button; import android.widget.textview; public class samplewebcheckactivity extends activity { /** called when activity first created. */ public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); webview wv=(webview)findviewbyid(r.id.link4_view); string data="sample 1234 2345 5678 123456 "; wv.loaddatawithbaseurl(null, data, "text/html", "utf-8", null); // wv.loaddatawithbaseurl(baseurl, data, mimetype, encoding, failurl)(data, "text/html", "utf-8"); } }
even used loaddata it's not working.
you can refer link
http://developer.android.com/reference/android/webkit/webview.html
Comments
Post a Comment