This is my first question. I know that this question was asked before, but I did not find an answer / solution that really explains the answer for completely newbies like me.
I am creating a linear layout application that has many buttons, each button should lead the user to a different web page. Buttons work well, and each button goes to a specific web page, but in the default browser and not in the application.
This is my webview.xml file:
<WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webView1" android:layout_width="fill_parent" android:layout_height="fill_parent" />
This is the WebViewActivity.java file:
public class WebViewActivity extends Activity { private WebView webView; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webview); webView = (WebView) findViewById(R.id.webView1); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl( "http://egy-tech-droid.blogspot.com.eg/search/label/%D8%AA%D8%B7%D8%A8%D9%8A%D9%82%D8%A7%D8%AA%20%D8%AD%D8%B5%D8%B1%D9%8A%D8%A9"); }
In the manifest file, I added permission to access the Internet:
<uses-permission android:name="android.permission.INTERNET" />
This opens the webpage, but in the deviceβs default browser, and I want it to open in my application. Any help? (please give me a detailed answer / explanation)
source share