<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Android Studio Archives - Codeplaners</title>
	<atom:link href="https://codeplaners.com/tag/android-studio/feed/" rel="self" type="application/rss+xml" />
	<link>https://codeplaners.com/tag/android-studio/</link>
	<description>Code Solution</description>
	<lastBuildDate>Wed, 20 Oct 2021 09:31:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>

<image>
	<url>https://codeplaners.com/wp-content/uploads/2020/09/cropped-favicon-social-32x32.png</url>
	<title>Android Studio Archives - Codeplaners</title>
	<link>https://codeplaners.com/tag/android-studio/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Android WebView Open External links Example</title>
		<link>https://codeplaners.com/android-webview-open-external-links-example/</link>
					<comments>https://codeplaners.com/android-webview-open-external-links-example/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 20 Oct 2021 09:31:59 +0000</pubDate>
				<category><![CDATA[Android Studio]]></category>
		<category><![CDATA[Android Webview]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1333</guid>

					<description><![CDATA[<p>Hello, Today, i we will show you android webview open external links example. This article will give you simple example of android webview open external links example. you will android webview open external links example. In this article, we will implement a android webview open external links example. So let’s follow few step to create &#8230; <a href="https://codeplaners.com/android-webview-open-external-links-example/" class="more-link">Continue reading<span class="screen-reader-text"> "Android WebView Open External links Example"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/android-webview-open-external-links-example/">Android WebView Open External links Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hello,</p>
<p>Today, i we will show you android webview open external links example. This article will give you simple example of android webview open external links example. you will android webview open external links example. In this article, we will implement a android webview open external links example. </p>
<p>So let’s follow few step to create example of android webview open external links example.</p>
<h3 class="step_code">Example</h3>
<pre class="brush: java; title: ; notranslate">
      private class CustomWebViewClient extends WebViewClient {
        @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
              if(url.contains(&quot;codeplaners.com&quot;)) {
                view.loadUrl(url);
              } else {
                Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                startActivity(i);
              }
              return true;
            }
        }
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/android-webview-open-external-links-example/">Android WebView Open External links Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/android-webview-open-external-links-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Hide Status Bar In Android</title>
		<link>https://codeplaners.com/how-to-hide-status-bar-in-android/</link>
					<comments>https://codeplaners.com/how-to-hide-status-bar-in-android/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 19 Sep 2021 01:18:07 +0000</pubDate>
				<category><![CDATA[Android Studio]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1298</guid>

					<description><![CDATA[<p>This post was last updated on September 20th, 2021 at 04:16 amHi Dev, Today, i we will show you hide status bar in android. This article will give you simple example of hide status bar in android. you will hide status bar in android. So let’s follow few step to create example of hide status &#8230; <a href="https://codeplaners.com/how-to-hide-status-bar-in-android/" class="more-link">Continue reading<span class="screen-reader-text"> "How to Hide Status Bar In Android"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-hide-status-bar-in-android/">How to Hide Status Bar In Android</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="last-modified">This post was last updated on September 20th, 2021 at 04:16 am</p><p>Hi Dev,</p>
<p>Today, i we will show you hide status bar in android. This article will give you simple example of hide status bar in android. you will hide status bar in android. So let’s follow few step to create example of hide status bar in android.</p>
<h3 class="step_code">Example 1:</h3>
<pre class="brush: java; title: ; notranslate">
private void setupFullscreenMode() {
        View decorView = setFullscreen();
        decorView
                .setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
                    @Override
                    public void onSystemUiVisibilityChange(int visibility) {
                        setFullscreen();
                    }
                });
    }

    private View setFullscreen() {
        View decorView = getWindow().getDecorView();
        decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_FULLSCREEN
                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
        return decorView;
    }

    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        if (hasFocus) {
            setFullscreen();
        }
    }
</pre>
<p>I hope it will assist you…</p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-hide-status-bar-in-android/">How to Hide Status Bar In Android</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-hide-status-bar-in-android/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>NDK at C:\Users\dell\AppData\Local\Android\Sdk\ndk-bundle did not have a source.properties file</title>
		<link>https://codeplaners.com/ndk-at-cusersdellappdatalocalandroidsdkndk-bundle-did-not-have-a-source-properties-file/</link>
					<comments>https://codeplaners.com/ndk-at-cusersdellappdatalocalandroidsdkndk-bundle-did-not-have-a-source-properties-file/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 19 Aug 2021 04:56:18 +0000</pubDate>
				<category><![CDATA[Android Studio]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1257</guid>

					<description><![CDATA[<p>Hi, Today, i we will show you how to slow NDK issue in Android studio. This article will give you simple example of how to slow NDK issue in Android studio. you will learn how to slow NDK issue in Android studio. So let’s follow few step to create example of how to slow NDK &#8230; <a href="https://codeplaners.com/ndk-at-cusersdellappdatalocalandroidsdkndk-bundle-did-not-have-a-source-properties-file/" class="more-link">Continue reading<span class="screen-reader-text"> "NDK at C:\Users\dell\AppData\Local\Android\Sdk\ndk-bundle did not have a source.properties file"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/ndk-at-cusersdellappdatalocalandroidsdkndk-bundle-did-not-have-a-source-properties-file/">NDK at C:\Users\dell\AppData\Local\Android\Sdk\ndk-bundle did not have a source.properties file</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi,</p>
<p>Today, i we will show you how to slow NDK issue in Android studio. This article will give you simple example of how to slow NDK issue in Android studio. you will learn how to slow NDK issue in Android studio. So let’s follow few step to create example of how to slow NDK issue in Android studio.</p>
<h3 class="step_code">Example :</h3>
<pre class="brush: java; title: ; notranslate">
android {
  defaultConfig {
     // ...
     ndkVersion = &quot;21.1.6352462&quot;
  }
}
</pre>
<p><img decoding="async" style="border: 3px solid #ff5722;" alt="how to slow NDK issue in Android studio" src="https://codeplaners.com/wp-content/uploads/2021/08/ndkandroid.png"></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/ndk-at-cusersdellappdatalocalandroidsdkndk-bundle-did-not-have-a-source-properties-file/">NDK at C:\Users\dell\AppData\Local\Android\Sdk\ndk-bundle did not have a source.properties file</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/ndk-at-cusersdellappdatalocalandroidsdkndk-bundle-did-not-have-a-source-properties-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Webview App Youtube Video Full Screen Example</title>
		<link>https://codeplaners.com/webview-app-youtube-video-full-screen-example/</link>
					<comments>https://codeplaners.com/webview-app-youtube-video-full-screen-example/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 27 Jul 2021 23:41:14 +0000</pubDate>
				<category><![CDATA[Android Studio]]></category>
		<category><![CDATA[Android Studio Webview]]></category>
		<category><![CDATA[WebView]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=1110</guid>

					<description><![CDATA[<p>Hi Dev, Today, i we will show you webview app youtube video full screen example. This article will give you simple example of webview app youtube video full screen example. you will learn webview app youtube video full screen example. So let’s follow few step to create example of webview app youtube video full screen &#8230; <a href="https://codeplaners.com/webview-app-youtube-video-full-screen-example/" class="more-link">Continue reading<span class="screen-reader-text"> "Webview App Youtube Video Full Screen Example"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/webview-app-youtube-video-full-screen-example/">Webview App Youtube Video Full Screen Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi Dev,</p>
<p>Today, i we will show you webview app youtube video full screen example. This article will give you simple example of webview app youtube video full screen example. you will learn webview app youtube video full screen example. So let’s follow few step to create example of webview app youtube video full screen example.</p>
<p><strong>MainActivity</strong></p>
<pre class="brush: java; title: ; notranslate">
WebView mWebView;


    @SuppressLint(&quot;SetJavaScriptEnabled&quot;)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        mWebView = (WebView) findViewById(R.id.webView);


        mWebView.setWebViewClient(new WebViewClient());
        mWebView.setWebChromeClient(new MyChrome());    // here
        WebSettings webSettings = mWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setAllowFileAccess(true);
        webSettings.setAppCacheEnabled(true);

       if (savedInstanceState == null) {
          mWebView.loadUrl(&quot;https://www.youtube.com/&quot;);
       }

    }


    private class MyChrome extends WebChromeClient {

        private View mCustomView;
        private WebChromeClient.CustomViewCallback mCustomViewCallback;
        protected FrameLayout mFullscreenContainer;
        private int mOriginalOrientation;
        private int mOriginalSystemUiVisibility;

        MyChrome() {}

        public Bitmap getDefaultVideoPoster()
        {
            if (mCustomView == null) {
                return null;
            }
            return BitmapFactory.decodeResource(getApplicationContext().getResources(), 2130837573);
        }

        public void onHideCustomView()
        {
            ((FrameLayout)getWindow().getDecorView()).removeView(this.mCustomView);
            this.mCustomView = null;
            getWindow().getDecorView().setSystemUiVisibility(this.mOriginalSystemUiVisibility);
            setRequestedOrientation(this.mOriginalOrientation);
            this.mCustomViewCallback.onCustomViewHidden();
            this.mCustomViewCallback = null;
        }

        public void onShowCustomView(View paramView, WebChromeClient.CustomViewCallback paramCustomViewCallback)
        {
            if (this.mCustomView != null)
            {
                onHideCustomView();
                return;
            }
            this.mCustomView = paramView;
            this.mOriginalSystemUiVisibility = getWindow().getDecorView().getSystemUiVisibility();
            this.mOriginalOrientation = getRequestedOrientation();
            this.mCustomViewCallback = paramCustomViewCallback;
            ((FrameLayout)getWindow().getDecorView()).addView(this.mCustomView, new FrameLayout.LayoutParams(-1, -1));
            getWindow().getDecorView().setSystemUiVisibility(3846 | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
        }
    }

}
</pre>
<p><strong>AndroidManifest.xml</strong></p>
<pre class="brush: java; title: ; notranslate">
&lt;activity
  android:name=&quot;.MainActivity&quot;
  android:configChanges=&quot;orientation|screenSize&quot; /&gt;
</pre>
<p>The post <a rel="nofollow" href="https://codeplaners.com/webview-app-youtube-video-full-screen-example/">Webview App Youtube Video Full Screen Example</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/webview-app-youtube-video-full-screen-example/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Android Webview App File Download</title>
		<link>https://codeplaners.com/android-webview-app-file-download/</link>
					<comments>https://codeplaners.com/android-webview-app-file-download/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 21 May 2021 23:26:09 +0000</pubDate>
				<category><![CDATA[Android Studio]]></category>
		<category><![CDATA[Android Studio Webview]]></category>
		<category><![CDATA[Android Webview]]></category>
		<category><![CDATA[Source Code]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=811</guid>

					<description><![CDATA[<p>Hi, Today, i we will show you android webview app file download. This article will give you simple example of android webview app file download. you will learn android webview app file download. So let&#8217;s follow few step to create example of android webview app file download. AndroidManifest.xml &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;manifest xmlns:android=&#34;http://schemas.android.com/apk/res/android&#34; package=&#34;com.codeplaners.myapplication&#34;&#62; &#60;!--add &#8230; <a href="https://codeplaners.com/android-webview-app-file-download/" class="more-link">Continue reading<span class="screen-reader-text"> "Android Webview App File Download"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/android-webview-app-file-download/">Android Webview App File Download</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi,</p>
<p>Today, i we will show you android webview app file download. This article will give you simple example of android webview app file download. you will learn android webview app file download. So let&#8217;s follow few step to create example of android webview app file download.</p>
<p><strong>AndroidManifest.xml</strong></p>
<pre class="brush: java; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    package=&quot;com.codeplaners.myapplication&quot;&gt;
 
    &lt;!--add internet permission--&gt;
    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
    &lt;!--add WRITE_EXTERNAL_STORAGE permsission for downloading--&gt;
    &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;
 
    &lt;application
        android:allowBackup=&quot;true&quot;
        android:icon=&quot;@mipmap/ic_launcher&quot;
        android:label=&quot;@string/app_name&quot;
        android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
        android:supportsRtl=&quot;true&quot;
        android:theme=&quot;@style/AppTheme&quot;&gt;
        &lt;activity android:name=&quot;.MainActivity&quot;&gt;
            &lt;intent-filter&gt;
                &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
 
                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
    &lt;/application&gt;
 
&lt;/manifest&gt;
</pre>
<p><strong>activity_main.xml</strong></p>
<pre class="brush: java; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:orientation=&quot;vertical&quot;
    tools:context=&quot;.MainActivity&quot;&gt;
    &lt;WebView
        android:id=&quot;@+id/web_view&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;match_parent&quot; /&gt;
 
&lt;/LinearLayout&gt;
</pre>
<p><strong>MainActivity.java</strong></p>
<pre class="brush: java; title: ; notranslate">
package com.codeplaners.myapplication;
 
 
import android.Manifest;
import android.app.DownloadManager;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.webkit.URLUtil;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;
 
public class MainActivity extends AppCompatActivity {
 
    WebView webView;
    String url = &quot;https://codeplaners.com&quot;;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
 
 
        //Runtime External storage permission for saving download files
        if (android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.M) {
            if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)
                    == PackageManager.PERMISSION_DENIED) {
                Log.d(&quot;permission&quot;, &quot;permission denied to WRITE_EXTERNAL_STORAGE - requesting it&quot;);
                String&#x5B;] permissions = {Manifest.permission.WRITE_EXTERNAL_STORAGE};
                requestPermissions(permissions, 1);
            }
        }
 
 
        webView = findViewById(R.id.web_view);
        webView.setWebViewClient(new WebViewClient());
        webView.getSettings().setLoadsImagesAutomatically(true);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
        webView.loadUrl(url);
 
        //handle downloading
        webView.setDownloadListener(new DownloadListener()
        {
            @Override
            public void onDownloadStart(String url, String userAgent,
                                        String contentDisposition, String mimeType,
                                        long contentLength) {
                DownloadManager.Request request = new DownloadManager.Request(
                        Uri.parse(url));
                request.setMimeType(mimeType);
                String cookies = CookieManager.getInstance().getCookie(url);
                request.addRequestHeader(&quot;cookie&quot;, cookies);
                request.addRequestHeader(&quot;User-Agent&quot;, userAgent);
                request.setDescription(&quot;Downloading File...&quot;);
                request.setTitle(URLUtil.guessFileName(url, contentDisposition, mimeType));
                request.allowScanningByMediaScanner();
                request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
                request.setDestinationInExternalPublicDir(
                        Environment.DIRECTORY_DOWNLOADS, URLUtil.guessFileName(
                                url, contentDisposition, mimeType));
                DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
                dm.enqueue(request);
                Toast.makeText(getApplicationContext(), &quot;Downloading File&quot;, Toast.LENGTH_LONG).show();
            }});
 
    }
 
}
</pre>
<p>The post <a rel="nofollow" href="https://codeplaners.com/android-webview-app-file-download/">Android Webview App File Download</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/android-webview-app-file-download/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to create WebView App using Kotlin</title>
		<link>https://codeplaners.com/how-to-create-webview-app-using-kotlin/</link>
					<comments>https://codeplaners.com/how-to-create-webview-app-using-kotlin/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 19 May 2021 00:29:02 +0000</pubDate>
				<category><![CDATA[Android Studio]]></category>
		<category><![CDATA[Android Studio Webview]]></category>
		<category><![CDATA[Android Webview]]></category>
		<category><![CDATA[Kotlin]]></category>
		<category><![CDATA[WebView]]></category>
		<category><![CDATA[Webview App]]></category>
		<guid isPermaLink="false">https://codeplaners.com/?p=763</guid>

					<description><![CDATA[<p>Hello Dev, Today, i we will show you How to create WebView App using Kotlin. This article will give you simple example of How to create WebView App using Kotlin. you will learn How to create WebView App using Kotlin. So let&#8217;s follow few step to create example of How to create WebView App using &#8230; <a href="https://codeplaners.com/how-to-create-webview-app-using-kotlin/" class="more-link">Continue reading<span class="screen-reader-text"> "How to create WebView App using Kotlin"</span></a></p>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-create-webview-app-using-kotlin/">How to create WebView App using Kotlin</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hello Dev,</p>
<p>Today, i we will show you How to create WebView App using Kotlin. This article will give you simple example of How to create WebView App using Kotlin. you will learn How to create WebView App using Kotlin. So let&#8217;s follow few step to create example of How to create WebView App using Kotlin.</p>
<p>Create a new project in Android Studio</p>
<h3>Step 1:- Add the following code to activity_main.xml</h3>
<pre class="brush: java; title: ; notranslate">
&lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
xmlns:tools=&quot;http://schemas.android.com/tools&quot;
   android:layout_width=&quot;match_parent&quot;
   android:layout_height=&quot;match_parent&quot;
   tools:context=&quot;.MainActivity&quot;&gt;
   &lt;WebView
      android:id=&quot;@+id/webView&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;&gt;
   &lt;/WebView&gt;
&lt;/RelativeLayout&gt;
</pre>
<h3>Step 2:- Add the following code to src/MainActivity.kt</h3>
<pre class="brush: java; title: ; notranslate">
import android.os.Bundle
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
   private val webView: WebView? = null
   override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_main)
      title = &quot;KotlinApp&quot;
      val webView = findViewById&lt;WebView&gt;(R.id.webView)
      webView.webViewClient = WebViewClient()
      webView.loadUrl(&quot;https://www.google.com&quot;)
      val webSettings = webView.settings
      webSettings.javaScriptEnabled = true
   }
   override fun onBackPressed() {
      if (webView!!.canGoBack()) {
         webView.goBack()
      } else {
         super.onBackPressed()
      }
   }
}
</pre>
<h3>Step 3:- Add the following code to androidManifest.xml</h3>
<pre class="brush: java; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;app.com.myapplication&quot;&gt;
   &lt;application
   android:allowBackup=&quot;true&quot;
   android:icon=&quot;@mipmap/ic_launcher&quot;
   android:label=&quot;@string/app_name&quot;
   android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
   android:supportsRtl=&quot;true&quot;
   android:theme=&quot;@style/AppTheme&quot;&gt;
      &lt;activity android:name=&quot;.MainActivity&quot;&gt;
         &lt;intent-filter&gt;
            &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
            &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
         &lt;/intent-filter&gt;
      &lt;/activity&gt;
   &lt;/application&gt;
&lt;/manifest&gt;
</pre>
<p>The post <a rel="nofollow" href="https://codeplaners.com/how-to-create-webview-app-using-kotlin/">How to create WebView App using Kotlin</a> appeared first on <a rel="nofollow" href="https://codeplaners.com">Codeplaners</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codeplaners.com/how-to-create-webview-app-using-kotlin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
