Pacific Regmi November 13, 2019
In this tutorial, I am going to show how to use android CheckBox in android application. CheckBox is a two state button that user can select or unselect. Users can check one or more option from a set. Following is the simple steps to show and control CheckBox.

Android Radio Button Example
Android SeekBar Example
Android WebView Tutorial with Example

Android Example: How to use Android CheckBox

Create a new Android Project

Let’s start by creating a new android project with following information to use android CheckBox

Application Name: Android CheckBox Example
Company Domain: viralandroid.com
Package Name: com.viralandroid.androidcheckboxexample
Minimum SDK: Android 2.2 (API 8 Froyo)

XML Layout File

Following is the xml layout file with many CheckBox and added onClick attribute in all CheckBox.

Java Activity File

In java activity file we control the CheckBox select and the code looks like this.

Default content of strings.xml file

Now, run your application which looks like below.


Android CheckBox Example

Pacific Regmi November 13, 2019
Android ListView is a group view that is used to display a list of items in vertical scrollable format and parallax header view means the effect shown during screen scrolling like hide and show header view with animation effect. In this tutorial, you will learn to implement parallax header view with listview in android application. Before android developed some layouts and widgets like CoordinatorLayout, AppBarLayout, CollapsingToolbarLayout, Toolbar etc it was very difficult to make parallax header view in android because you need to write a lot of code for that. Now using these layouts and widgets, you can make parallax header view within few minutes.

I have already posted some tutorials like simple android listview tutorial, android listview with image and text, simple gridview example and so on including lots of material design and design support library tutorial. If you are familiar with android design support library it will be very easy to make parallax header view.

Android ListView with Image and Text
Animated Android Toolbar (Expanding and Collapsing)
Simple Android ListView Example

Android Example: How to Make Parallax Header with ListView

Open your app build.gradle file and add design support and appcompat library dependencies. Build.gradle file will look like below.


Change App Theme

If your app theme is not appcompact then change it to Theme.AppCompat.Light.DarkActionBar. Styles.xml file will look like below.


XML Layout File

Open your app XML layout file and add CoordinatorLayout, AppBarLayout, CollapsingToolbarLayout using design support library and inside CollapsingToolbarLayout add an ImageView for header parallax image and Toolbar for appbar/actionbar. Following is the complete content of XML layout file.


Java Activity File

Here, you have to add different method to make collapsing/animated/parallax header view and for listview. Following is the complete code snippet of java activity file.


Now, run your Parallax Header with Android ListView Example application and scroll the screen, you will see that the header image is collapsing slowly and app title text will be shown at toolbar. Like this, you can add TabLayout and customize it according to your needs.

Google has given several service promises to Android. In the Android Security report of 2015 Google announced that Android Security has been taken very seriously and now more than 400 million devices and 6 billion installed apps will be scanned each day.

According to Last Year Stats- Google claimed that there is a huge jump from 2014 to 2015 in having the number of Potential Harmful Apps reduced. Google stated that the number of devices installing apps only from Google Play and getting in contact with PHA was 0.15%, while only 0.5% devices that were installing from Google Play and other sources had installed harmful app.

With the launch of Android 6.0 Marshmallow came better security protection-including verified boot, updated permission controls, and full disk encryption. Google also admitted last year that despite company’s efforts, all Android devices were still not receiving monthly updates but promised on increasing its efforts. For mobile app development guidelines and assistance, contact VeztekUSA.

Android App Security is enhanced on Google Play-Google Reveals

According to This Year’s Stats- Google claims on investing in services and tools for helping developers design secure Android applications. Open source testing tools, Security APIs in Google Play Services, and application sandbox and security APIs in platform.

What is Google Play App Security Improvement Program? – The Google Play App Security Improvement Program is claimed to be the first of its kind, having two main components: help developers identify potential security enhancement and provide developers with security tips for helping them build securer apps.

How Does Google Play App Security Program works? – Every app that goes for acceptance from Google Play gets scanned for potential security issues, and for security and safety. Over 1 million apps are rescanned on Google Play for additional threats. If the app gets flagged by Google Play for security concerns, you promptly get notified for the issue so you can address the issue and help your users stay safe.

Once the security issue has been highlighted, you will receive emails alerts via Google Play Developer Console. You will also receive emails with links on how to improve the app security. Before any other app update gets published, and as per the given timeline the issue will require an action. You confirm addressing of the issue by uploading the latest and secure version of your app on Google Play Developer Console.

Always increment the fixed apps version number. If you do not receive any more security alerts after few hours, it means you’re good to go. The developers of apps on Google Play and Google have to work hand in hand in order to ensure the success of the program, and of course the security community has to work along as well. Google believes that it’s a joint responsibility of the two to provide users with safe and secure apps.

Sani is a business professional with proven success in project and program management, business process improvement and conversion.
Sani Abdul Jabar

Pacific Regmi November 01, 2019
In this tutorial, I will show how to use ToggleButton in android application. Generally, ToggleButton is used in the setting of android application like WiFi, Bluetooth, Data Connection, Sound On/Off, Alram On/Off, etc. You can find lots of attributes and classes of ToggleButton in android developer site.

Android Switch Button Example
Android CheckBox Example
Android Time Picker Example

Android Example: How to use ToggleButton in Android App

XML Layout File


Java Activity File


Strings.xml File


Now, run your application which will look like output given below.


Android ToggleButton Example

Pacific Regmi October 14, 2019
Google announced Material Design Support Library for Android Developers with the release of new OS, Android Lollipop 5.0 (API 21). This library includes navigation drawer view, floating action buttonsnackbarfloating labels in EditText, tabs and motion and scroll framework. These tools help us to make our android application good looking with simple step and you can easily use these tools with the help of Android Design Support Library.

Android Navigation Drawer View: Material Design Support Library

Android Navigation View Material Design Support Library


Android Navigation View

Making navigation drawer is very difficult and time consuming before Google announced this material design support library. With this library, you can make your navigation drawer in simple step and less time.

Android Material Design with Design Support Library
Navigation Drawer View User Interface (UI) Design for Android
Best Android Navigation Drawer Libraries Collection
Android Menus: Best Practice and Awesome Android Menu Libraries

Here I will show you how to make a Navigation Drawer with the help of android Design Support Library. Let’s start step by step.

Create a Project

Create a new project with following information.
Application name: Navigation View
Company Domain: viralandroid.com
Package name: com.viralandroid.navigationview
Minimum SDK: Android 2.2 (API 8 Froyo)

Add Design Support Library Dependency

You have to add design support library dependency to your build.gradle file to make navigation drawer view.

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:design:22.2.0'
Now, to add a navigation view in your activity layout, you have to setup your application theme from styles.xml file and your styles.xml file looks like this:

And add PrimaryColor and PrimaryDarkColor to your colors.xml file and it looks like this:

    <color name="PrimaryColor">#ff1b6bae</color>
    <color name="PrimaryDarkColor">#ff134a88</color>

Create Navigation Header View and Navigation Menu



You can add more menu items according to your wish and also can design your custom menu. Here I have created simple navigation view with a header view and menu item.

Add Navigation View to your Activity Layout

After adding navigation view design support library to your activity layout, it looks like this:

And do not forget to update your strings.xml file.

    <string name="app_name">Navigation View</string>

    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="navigation_view_item_1">Navigation Item 1</string>
    <string name="navigation_view_item_2">Navigation Item 2</string>
    <string name="navigation_view_item_3">Navigation Item 3</string>
    <string name="navigation_view_item_4">Navigation Item 4</string>
    <string name="navigation_view_item_5">Navigation Item 5</string>
    <string name="navigation_view_item_6">Navigation Item 6</string>
    <string name="navigation_view_category_1">Navigation View Category</string>
    <string name="navigation_view_category_2">Navigation View Category</string>

Modify Your Activity File

Finally, you have to add java code to your Activity file to make navigation drawer working. Your MainActivity.java file should look like this:

This is how you can make your Navigation Drawer View. Then, run your application and see how it looks.

Pacific Regmi October 14, 2019
Android EditText widget is used to get user inputs like message box, login form, etc. In this tutorial, I am going to show how to use/create android EditText to control and get input from user.

Here, I have used two EditText to get input from the users, one for first name and next one for last name. After entering first name and last name you can see full name by clicking DISPLAY button.

Android Floating Labels for EditText Using Design Support Library
Android WebView Tutorial with Example
Android Layouts Tutorial

EditText Example: How to Get User Inputs in Android

XML Layout File

Following xml file contain two EditText widgets, one for first name and another for last name.


Java Activity File


Now, run your EditText android application and enter your first and last name then click DISPLAY button you will see your full name(what you enter above) like below.

Android EditText Example

Android EditText Example

Pacific Regmi August 12, 2019
Circular progress bar/ loader can be shown at the time of loading content from the server/internet like twitter android app has, refreshing the page like gmail android app. Not only that circular progress/loader can be used to show downloading, uploading progress and many other purpose. In this tutorial, you will learn to make material design progress bar for android application/game.

Implementing material design progress bar in android is not much difficult to implement in apps or game if you have some knowledge of android app development.

Material Design Horizontal ProgressBar Android Example
Simple Creating Circular ProgressBar in Android
Dashboard UI Design for Android App

Android Example: How to Make Material Design Progress/Loader

Let’s start by adding compile 'com.github.rey5137:material:1.2.2' dependency to your app build.gradle file. Build.gradle file will look like below.


XML Layout File

I am making this material design progress using ProgressView widget so open your app’s XML layout file and add ProgressView widgets. Following is the complete content of XML layout file.


Java Activity File

Following is the modified code of java activity file.


Android Example: How to Make Material Design Progress/Loader

Now run your Material Design Circular ProgressBar For Android application, the progress/loading will start automatically after running app.
Powered by Blogger.