Android Settings Menu - Learning

Making step by step progress over the SunShine app.

This learn log covers how settings menu was added.

After listing the climate details from API using URL,URI and ASyncTask next step was to open new activity on clicking a list item.

It can be achieved using setOnItemClickListener of the ListView

To get the list item details use getItem(index) where index is the parameter of onItemClick overrided function.

###Opening New Acitivity New activity can be opened using Intents.

Intent <intentName>=new Intent(<context>,<NewActivityclassName>.class);
startActivity(<intentName>);

To pass the details to the intent

intentName.putExtra(<keyname>,value)

###Settings Menu

To add a new settings menu

####Settings activity