0

Can anybody tell How to create common header for all activity with click event in android.I have heade button,title,button with click event available.I want use header with common for all activity can anybody tell how to do

Is it possible to create common code for click activity also?

Thanks

mohan
  • 13,035
  • 29
  • 108
  • 178
  • 1
    create `Header.xml` and `` it to any layout – M D May 14 '14 at 08:35
  • @Simple Plan for click event code also want to common in all activity – mohan May 14 '14 at 08:36
  • 1
    yes it is possible.for the common click that you have to create a Base activity and write a onClick() in it and extend BaseActivity to all other Activty. in other Activity's onClick menthod overeide the super.onClick() – GovindRathod May 14 '14 at 08:40
  • @GovindRathod can you provide some sample code snippet – mohan May 14 '14 at 08:44

1 Answers1

0

I think you can create one activity with header and content fragment. And change only fragment.

thealeksandr
  • 1,686
  • 12
  • 17