In this Tutorial I will teach you how to make Professional looking Android WebView Application.
Part I
Part II
Features:
Having Splash Screen
Loading Animation before Website Loads into App
Share Button on The Action Bar.
Requirements:
Windows or Mac Computer With
Android Studio & JDK 7 Installed
No need of Knowledge of Coding
Little Brain.
NOTE: In this guide i will be asking you to copy and paste code into your file. That indicates you first remove complete code particular file and paste my code.
Steps :
Open Android Studio and Select File=>New Project.
Follow Screens.....
Set Application Name and package name what ever you want.
Select Target SDK as per your Needs
Don't change these details
Now Navigate to MainActivity.java and double click on it.
Now Copy and Paste below Code into MainActivity.java file. Replace my project name with your's in 1st line of code. In Line No 27 replace "http://karthiktechfreak.blogspot.in/" with your url. Don't use www. prfix. paste in same same format you are looking. Next Change custom share data in red color with lines you want to sown share message in line numbers 71 & 72 and give your website url in line 27th Line
Now Right Click on your Project name udnder java folder and select create New Class and Name it Splash and copy and paste below code into Splash.java file. Replace my project name with your's in 1st line of codeNow Copy Below Code into activity_main.xml
Now Copy and Paste Below Code into activity_splash.xml
Now open menu_main.xml in menu folder and paste below code into it.
Now Open AndroidManifest.xml file From manifests folder and copy below code into it. replace project name with your project name in the 3rd line
Now Finally Open Values Folder and place below code in strings.xml and change app_name string value to yours in line number two.
By this we had finished all coding Part.
Now open computer and navigate to your Project folder YourProjectName\app\src\main\res, there will be four folders with name mipmap change ic_launcher.png with your icon but don't change name and only png format are supported. And place an image file with name vert_loading.png in all folders. vert_loading.png will be your Startup screen.
At last our Project structure looks like below image...
Now go to buil in top menu of Android Studio and select Generate signed Apk and epxort your Application. After Succesfull export copy it to your phone and install. Or Upload to play store.
Watch how to Generate Signed Apk in Android Studio.
25 comments:
Write comments