Alternative design pattern to ListView. One of the ready made widget available in android UI widget set in which contents arranged like rows and columns(2D). Space conscious and eye catcher. Thus popular in mobile devices. GridView is commonly seen in content arrangement where single item needs to be projected like in media galleries and Calendar. […]
How To Add Library Project In Android Studio
This tutorial will teach you an alternative way to add library project to your android project without using built-in user interface of Android Studio. Maybe this is an older way to do but in certain cases it is still relevant. Now many developers are migrating to gradle based build automation system and new open source libraries are […]
How To Auto Increment Build Number Using Gradle
What Is A Build Number? A build number uniquely identifies unreleased or released application and we can find out build number in version name. Most commonly used Version Name format is MAJOR.MINOR.REVISION.BUILDNUMBER. The change in the respective places signifies type of the release, i.e, major, minor or revision. Where build number is total number of build […]
How To Set Up Calabash Android On Windows
What is Calabash? Calabash is a cross-platform automated testing technology for Android and iOS (native/hybrid) apps. Calabash is a free open source project, developed and maintained by Xamarin. How does it do? Like every other automation testing tool calabash has a test server and test script. This test script will perform on server and return […]
Create Splash Screen In Android
What Is A Splash Screen? Splash screen is the initial screen when user opens the app. It basically contains branding items like logo, slogan and company name etc. It also known as the boot screen. If you want to execute a long task and get the result to show as the content of the next […]
Create Custom Spinner In Android
Custom Spinner means a spinner with different look and feel other than it’s default look. It is a part of adding our own branding to an Android Application. Spinner is a common UI element in a form and unlike TextViews, EditTexts and Buttons customization of Spinner requires few steps. In this article we will change […]
Create Simple Listview In Android
Here i explain to you how to create a simple listview which uses built-in Arrayadapter. 1. Add listview container to layout 2. Create an listview adapter with items 3. Set adapter to listview 4. Catch click event 5. Build & Run Add listview container to layout Create an listview adapter Set adapter to listview Catch […]
How To Create Custom ActionBar In Android
In some cases we want to give our own branding to ActionBar For example, if you want to change the color. Unfortunately native action bar does not allow us a deep modification and ToolBar is a replacement for ActionBar but it only supported from Lollipop (Android OS version 5). Here in this post i will […]
Create your first android app – Hello Android! using Android Studio
Here i am going to split entire process of Hello Android application creation into 5 steps. Which are as follows, Step 1: Create a new project Step 2: Create an activity Step 3: Create a layout for the activity Step 4: Add activity to AndroidManifest.xml Step 5: Build & Run Create a new project Here […]
How to create circular gradient programmatically in Android
In Android we can create gradient effect in two ways. First one is by creating a drawable xml file and second method is by program. Here in this article i will explain the second method. Creating circular gradient programmatically does not require you to add graphics in your application. Thus it can save your precious […]
How To Get Screen Dimensions Programmatically In Android
Get Screen Dimensions Programmatically In Android In Pixels The following source code shows how to get dimensions or screen sizes of the Android device your application is running on: Create an activity class called MainActivity.java and write the following code into onCreate method In dp unit
Android How To Create Rectangle Shape Drawable Using XML
This tutorial show you how to create a rectangle shape using drawable xml resource. It is extremely easy method and consumes less APK size when you compare it with image formats like JPG, PNG, WebP etc that are being bundled within APK. I recommend you to replace all these simple shapes with corresponding shape drawables […]
How To Create Circle Shape Using XML In Android
Android allows us to create shapes using shape drawable. The basic shapes supported in shape drawables are Line, Oval, Rectangle and Ring. This tutorial focuses on how to create circle shape. The drawable created using android shapes are scalable and highly maintainable compared to pre graphics bundled with APK. Here we use Oval. If you […]
How To Disable Back Press In Android
I think you know the architecture of application where activities are being added like stack i.e, LIFO (Last In First Out). Backpress will pop last activity from the memory stack and you are able to view previous activity. In Android we can make changes to this default behavior of an android activity by either overriding […]
How to play mp3 file programmatically
There are some cases where you need to play play mp3 file. Here it is achieving with the help of MediaPlayer Class. Here are the steps Step 1: Create asset folder under java directory Step 2: Save your mp3 file in asset Step 3: write the following code in your activity class