Category: Android

Android Gallery GridView Example

Android Gallery Grid Example 1) Fragment of Grid 2) Layout of Fragment 3) Image Adapter File 4) Item file for adapter 5) Add permission in...

Android HTTP POST / GET Url Call using Custom Library

Android HTTP POST / GET Url Call using KaushalUtils Call Any HTTP URL With KaushalUtil Custom Library. URL – https://github.com/kaushal2406/KaushalUtils Functionality Available Date Functions, Progress Dialog,...

Aandroid pdf viewer native

Android pdf viewer Without any library using android PdfRenderer class to view pdf file on android version api 19+. Android View XML file   Activity....

Android Check internet connectivity

Android Check internet connectivity. Below android code to check if mobile is connected to internet or not ? public static boolean isConnectingToInternet(Context context) { try...

Android Date functions

Android most common functions to use for date. Add Days to Date public static Date addDaystoDate(Date today,int days) { final Calendar c = Calendar.getInstance(); c.setTime(today);...

Email Validation function in Android.

Email Validation function in Android.   public static boolean isValidEmailAddress(String email) { String expression=”^[\\w-\\+]+(\\.[\\w]+)*@[\\w-]+(\\.[\\w]+)*(\\.[a-z]{2,})$”; CharSequence inputStr = email; Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher...