i stuck with a unusual problem
i have a restaurant application which includes menu icons fixed at the bottom of every layout,
my problem is i dont want to create onsetclicklistner() method of every icon on each of my activity class….
please give some suggestion so that i can make a common class where i can put all my footer icon click event and activities in it and use it on my every activity class with different setcontentview…
hope you all get my question…
looking forward for your reply
i stuck with a unusual problem i have a restaurant application which includes menu
Share
You don’t need to setup onClickListeners programmatically. You can also put them in the layout XML like this:
Then you can declare a base activity class that contains this method in it, like this:
Then you write all of your activity classes so that they derive from BaseActivity instead of Activity.