ExpandableListView  shows items in a vertically scrolling two-level list.the levels can individually be expanded to show its children. When a child in this expandable list has been clicked ExpandableListView.OnChildClickListener Interface is  invoked. Let see an example: Code :   Code for Activity: MettleTech BlogUSA info@mettletech.in

In a Listview two different color can be set for odd row and even row.By creating a custom adapter  and by extending the ArrayAdapter and overriding  the getView method it can be handled. And inside the getView method based on the condition   the color of the text  can be changed using  setBackgroundcolor attribute. let see

Expandable ListView

Wednesday, 14 August 2013 by

ExpandableListView shows items in a vertically scrolling two-level list. This differs from the ListView by allowing two levels: groups which can individually be expanded to show its children. The items come from the ExpandableListAdapter associated with this view. Expandable lists are able to show an indicator beside each item to display the item’s current state

ListView is a view group that displays a list of scrollable items.The background of the ListView can be set with a color gradient both dynamically or defining in drawable xml file. Code for layout: Code for background_inner in res drawable folder: Code for set gradient color background dynamically: Code in Adapter class:  

Custom ListView

Tuesday, 13 August 2013 by

ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that’s placed into the list.A subclass of the AdapterView class

How to create a ListView?

Tuesday, 13 August 2013 by

ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that’s placed into the list. The Adapter behaves as a

Tagged under: ,

create a spinner

Monday, 05 August 2013 by

Spinners provide a quick way to select one value from a set. In the default state, a spinner shows its currently selected value. Touching the spinner displays a dropdown menu with all other available values, from which the user can select a new one. let see an example: Code for layout: code for strings.xml: code

TOP