Android

Android

Testing in Android : Part 4 : Instrumented Unit Test

These are unit tests that run on real devices instead of JVM . Using instrumented Unit Tests, we can have real implementation of an Android Framework component like SharedPreferences objects, context of an Activity etc. Also , we will not have to mock any objects.1.  Add the following Dependencies :.

Read
Android

Android - Material Design Tutorial : 10 ( Password visibility toggle )

Recently , Android support library 24.2.0 is released and  "Password Visibility Toggle " is introduced. )'

Read
Android

Testing in Android : Part 3 : Using Mockito

By default , local unit tests are executed against a modified version of android.jar library. This library does not contain any actual code. So, if we make any call to android classes, it will throw an exception. We can use Mocking Framework mockito to mock objects and define outputs of certain method calls.

Read
Android

Testing in Android : Part 2 : Using Hamcrest

public void additionisCorrect() throws Exception {

Read
Android

Testing in Android : Part 1 : Unit Testing

Unit testing is used to test each of the smallest testable parts (units) individually and independently . By using unit tests, we can easily verify that logic of the individual units is correct. i.e. we should run unit tests after every build to detect software regressions. For android application unit testing, we can create two types of unit tests :.

Read
Android

Retrofit 2 Tutorial

Retrofit is one of the most popular REST client library for android developed by Square . For HTTP requests, retrofit uses OkHttp library. Also we can process the return values easily using custom converters. Following converters are supported by Retrofit :.

Read
Android

Android - DayNight View Tutorial

Support Library 23.2 has introduced a new DayNight theme for Android Apps using which will automatically change the application theme to day or night mode based on the time of day and user's last known location. Also, this theme can be used back up to Android Ice Cream Sandwich devices.

Read
Android

Android-Working with Vector Drawable (Part 2)

In our previous tutorial , we have discussed  what is a Vector, what is VectorDrawable , difference between svg and Vector and different ways to convert svg images to vectorDrawable.This tutorial will be mainly focused on how to support VectorDrawable on preLollipop android devices.

Read
Android

Android - Working with VectorDrawable (Part 1)

Introduction :** To represent an image in android, we use bitmaps. But the main problem with a bitmap image is that we cannot scale it without losing its quality. That's why we need to create different bitmap images for different screen devices. With api level 21 ( android 5.0) , google has introduced support for vectorDrawable.

Read
Android

Android - Material Design Tutorial -9 ( RecyclerView with grid )

This tutorial is on recyclerview with grid. We will learn how to create grid recyclerview with GridLayoutManager and we will load pictures from resource directory. We will also use the Palette API for styling.

Read