android tips & tricks


April 2016

Frame Layout in Android|Easy Example

FrameLayout is one of the useful layout provided by android system, which allows User Interface widgets to be overlapped with each other.Simply , Frame Layout should be used to hold a single child view, because it can be difficult to organize child views in a way that’s salable to different screen sizes without the children overlapping each other.
webhead-Frame2 Continue reading “Frame Layout in Android|Easy Example”

TextView Example in Android

A TextView  is a complete text editor, however the basic class is configured to not allow editing.

TextView Attribute :-
1) android id: provide unique id
2) android text: text toDisplay
3) android gravity:Specifies how to align the text by the view’s x- and/or y-axis when the text is smaller than the view.
4) android hint: Hint text to display when the text is empty.
5) android inputType: The type of data being placed in a text field. Phone, Date, Time, Number, Password etc.
6) android password: password type-number password,text password…etc
7) android textColor: provide color
8) android typeface: Typeface (normal, sans, serif, monospace) for the text. Continue reading “TextView Example in Android”

Add Ripple Effect In Android

I’m going to show you to implement ripple effect in your android buttons. Now, you can easily add ripple effect in your buttons, layouts, textviews, etc. and you can also change its color. Note that, this ripple effect will only show on device running lollipop and above. Continue reading “Add Ripple Effect In Android”

Improve Layout Performance|Re-use Layout with Include Tag

When you are create Complex design in your project , that time making a  view hierarchy tree taller will also result in slowness in your application and increases complexity. Creating optimized layouts is fundamental to building an application that runs fast and is responsive to the user. use <include/> tag in your xml to resolve this situation. Continue reading “Improve Layout Performance|Re-use Layout with Include Tag”

Blog at

Up ↑