GTU DE Sem6 – 3360704 – 7 – Create an application that will change color of the screen based on selected options from the menu

GTU DE Sem6 – 3360704 – 7 – Create an application that will change color of the screen based on selected options from the menu

 GTU DE Sem6 - 3360704 - 7 - Create an application that will change color of the screen, based on selected options from the menu

This Android example explains how we can add menu options to any Activity along with how to manage Click event of the Menu. Menu is the most common input options to display about us, feedback and rating kind of options, here I have taken example of the Menu to change background color of the Activity.

 

FileName:MainActivity.java

 

FileName: activity_main.xml

 

FileName for Menu: main.xml

 

Output 1

GTU DE Sem6 - 3360704 - 7 - Create an application that will change color of the screen, based on selected options from the menu

 

Output After Click on Red Menu Option

GTU DE Sem6 - 3360704 - 7 - Create an application that will change color of the screen, based on selected options from the menu

 

Output After click on Green Menu Item

GTU DE Sem6 - 3360704 - 7 - Create an application that will change color of the screen, based on selected options from the menu

 

Output After Click on Blue Menu Item

GTU DE Sem6 - 3360704 - 7 - Create an application that will change color of the screen, based on selected options from the menu

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative