In myweb->res-> layout->activity.xml
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
In myweb->res-> layout->Android.manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myweb"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_ak123"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Web"
android:label="@string/title_activity_web" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
in src->web.java
package com.example.myweb;
import com.example.myweb.R;
import android.os.Bundle;
import android.app.Activity;
import android.webkit.WebView;;
public class Web extends Activity {
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web);
webView = (WebView) findViewById (R.id.webView1);
webView.loadUrl("http://arunphp.blogspot.in/load.php");
}
}
output:

<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
In myweb->res-> layout->Android.manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myweb"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_ak123"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Web"
android:label="@string/title_activity_web" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
in src->web.java
package com.example.myweb;
import com.example.myweb.R;
import android.os.Bundle;
import android.app.Activity;
import android.webkit.WebView;;
public class Web extends Activity {
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web);
webView = (WebView) findViewById (R.id.webView1);
webView.loadUrl("http://arunphp.blogspot.in/load.php");
}
}
output:



oh
ReplyDelete