FrameLayout in Android

Introduction Framelayout in Android is a ViewGroup subclass. It is used to specify the position of View instances it contains on the top of each other to display only single View inside the FrameLayout. It is designed to block out an area on the screen to display a single item. [...]

2020-09-17T14:29:41+05:30Categories: Android|

Relative Positioning in ConstraintLayout

Relative positioning in ConstraintLayout is the basic building blocks of creating layouts. Constraints used in relative positioning allow to position a given widget relative to another one. A widget can be constrained on both the horizontal and vertical axis i.e. Horizontal Axis: It allows to constraint left, right, start and [...]

2020-08-16T20:56:52+05:30Categories: Android|

GuideLine and Barrier in ConstraintLayout

A ConstraintLayout is a android.view.ViewGroup used to position and size widgets in a flexible way. GuideLine and Barrier in ConstraintLayout are special helper objects to help you with your layout. Both are used to constraint layout. Guideline Guidelines are invisible lines that you can place at particular positions in your [...]

2020-08-16T17:16:23+05:30Categories: Android|

Layout Editor in Android Studio

Layout Editor in Android Studio is used for building layouts. It enables you to build layouts by dragging UI elements into a visual design editor instead of writing layout XML. The design editor can preview layout on different Android devices and versions. You can position the elements in the layout, [...]

2020-08-16T13:09:01+05:30Categories: Android|Tags: |

Unique Device ID for Android Devices

There are several occasions when the unique identifier of a device is required. For instance to generate encryption keys or to track installations. On Android there are several ways to get such an ID. This tutorial examines various solution to associate unique identifier to a android device. Using IMEI, MEID [...]

2020-07-12T16:26:06+05:30Categories: Android|

Changing Build Variant in Android Studio

By default, Android Studio builds the debug version of app, which is intended for use only during development, when you click Run. To change the build variant, go to Build > Select Build Variant in the menu bar. Select Build Variant menu item will be grayed out if project-level build.gradle [...]

2020-07-12T14:50:48+05:30Categories: Android|

postDelayed | Android

Introduction postDelayed() causes the runnable to be added to the message queue, to be run after the specified amount of time elapses. The runnable will be run on the thread to which this handler is attached. This API can be accessed from Handler.postDelayed(Runnable r, long delayMillis) View.postDelayed(Runnable action, long delayMillis) [...]

2020-01-01T11:37:48+05:30Categories: Android|

setContentView and LayoutInflater | Android

setContentView Activity has one ViewRoot and usually one Window attached to it. Activity is used for screen display the entire Window. Views are attached to this Window. Every Window has a Surface and Surface uses Canvas to draw on the surface. setContentView(View) is a method exclusively available for Activity. Internally it calls [...]

2019-12-31T23:35:26+05:30Categories: Android|

Theme | Android

Introduction A style (similar to stylesheets in web design) is a collection of attributes that specify the appearance for a single View. It can specify attributes such as font color, font size, background color, and much more. A theme is a type of style that's applied to an entire app, [...]

2019-12-29T16:09:19+05:30Categories: Android|

Cannot find symbol class Intent | Android

This error may come when using Intent, and compiler throws above error. Possible solution for the above are Check the import statements at the top and make sure it includes the line: import android.content.Intent; Make sure both Activities are defined in your Manifest file. Intent intent = new Intent(this, NextActivity.class); [...]

2019-12-28T18:46:01+05:30Categories: Android|
Go to Top