Convert Any Website into Professional Android App in 2020 (PART-1)


Convert Any Website into Professional Android App in 2020 (PART-1).

This is Part-1 of the Convert Any Website into Professional Android App in 2020 means there will be more posts on Convert Any Website into Professional Android App in 2020.

So let's get started...



Learn this Convert Any Website into Professional Android App in 2020 (PART-1) from this Youtube Video...



Source Codes:

MainActivity.java 

package coding.apps.fiverr;

public class MainActivity extends AppCompatActivity {

    WebView webView;
    private String webpage = "https://www.fiverr.com";

  @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        webView = findViewById(R.id.myWebView);
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
}


activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">
<WebView
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:id="@+id/myWebView"/>
</LinearLayout>


AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="coding.apps.fiverr">
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".SplashScreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".MainActivity">

        </activity>
    </application>

</manifest>


So this was our Convert Any Website into Professional Android App in 2020 (PART-1).

Post a Comment

Previous Post Next Post