Operating System

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|

Split view in Layout | Android

android:layout_weight assigns weight to the children of LinearLayout. For example, if there are three child items within the LinearLayout, then the space assigned will be in proportion to the weight which means the child with larger weight will be allow to expand more. Be sure to set the layout_width to 0dp or your [...]

2019-12-24T11:32:06+05:30Categories: Android|

Relative Layout | Android

RelativeLayout is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or in positions relative to the parent RelativeLayout area (such as aligned to the bottom, left or center). Center [...]

2019-12-24T11:11:13+05:30Categories: Android|

Fragment | Android

Introduction A Fragment is a piece of an application's user interface or behavior that can be placed in an Activity. Interaction with fragments is done through FragmentManager. Fragments must be embedded in activities; they cannot run independently of activities. Like an Activity, a Fragment has its own lifecycle. An Activity [...]

2019-12-22T21:56:55+05:30Categories: Android|
Go to Top