in this android studio tutorial we will how to use WebView to Convert website into android app ..
//////////////////////////////////////////////////////////////////////////////////////////////
java file :-
package com.example.gaurang.website;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
private WebView website;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
website=findViewById(R.id.website);
website.loadUrl(“https://www.apple.com/imac/”);
website.setWebViewClient(new WebViewClient());
}
@Override
public void onBackPressed() {
if (website.canGoBack()) {
website.goBack();
} else {
super.onBackPressed();
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
permission to be given in Android_Menifest file :-
uses-permission android:name=”android.permission.INTERNET”
#convert_website_into_android_app
#website_to_app
#webview in android studio
source
A YouTube to MP4 conversion software is a software or on-the-web tool designed to download…
Cooking is an art, and each artist needs the right equipment to bring their masterpiece…
Hey there, scooter enthusiast! Whether you're a seasoned rider or just thinking about zipping around…
Hey there, massage fans! If you're in Busan and also searching for a way to…
Hey there! If you're planning a trip to Busan, or if you're already here and…
Are you looking for ways to get more followers on your social media accounts to…