3

I want to add a button in titlebar .I googled but all code is with xml.I want to do programmatically.Can anybody get some reference ?

Can anybody help me?

THX.

DuyguK
  • 4,250
  • 9
  • 33
  • 46
  • 3
    why must you do it PROGRAMMATICALLY?! – Stealth Rabbi Dec 13 '11 at 14:58
  • 2
    I will do some dinamic actions.so i dont want with xml and i want to learn this way. – DuyguK Dec 13 '11 at 15:01
  • What do you think the "titlebar" is? Do you mean the action bar on Android 3.0+ devices? Do you mean something else? – CommonsWare Dec 13 '11 at 15:28
  • 1
    I am thinking http://stackoverflow.com/questions/3538546/custom-title-bar-with-progress-in-android someone is pin with yellow. I want to add buton here. – DuyguK Dec 13 '11 at 15:37
  • 1
    the link which u posted is not a custom title bar, they have used theme NoTitleBar, and added a `tableRow/LinearLayout` at the top...even u can achieve something like that – Pratik Bhat Dec 13 '11 at 16:39

1 Answers1

0

Maybe you will find this useful. The post talks about using the application window to set a custom title bar. This title bar is an xml layout.

Custom TitleBar Runtime

Community
  • 1
  • 1
R.daneel.olivaw
  • 2,681
  • 21
  • 31