BidVertiser

Categories

Follow Us @web_learners

BidVertiser

Wednesday, March 25, 2020

How to Remove Action Bar in Android app | Webview App Development Series Part 2

Hi friends, Last webview post I have shown how to setup Webview for convert website into an android app, Today I will show you how to remove the action bar in android or title bar from all android activity and how to program for the back button so that when the user will click on the back button in-app the app will go the previous page. Watch the below video or follow my posts.


For removing the action bar in android  from Webview App first you need to go "app--->res--->values--->styles.xml" folder from the left side. In styles.xml files, you will see there is a style called "DarkActionBar", you need to replace "DarkActionBar" with "NoActionBar".

Code:



Action Bar

That's it for action bar in android. Only this piece of code will remove action bar in android from all activity in Webview App. Now we will program for the back button. For that, you need to write an override function onBackPressed() in the MainActivity.java file. 
Code:





That's All. Now you can run your project.

In Bangla                                                                   In English

   

In Next Post I will show you 
Open Url within the webview Android App Not in Browser . Thank you.


No comments:

Post a Comment