Why doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

by quill » Wed, 29 Apr 2009 16:39:36 GMT


Sponsored Links
 Hi all,
I just want to set an icon in the right of titlebar, so I use:
        Window  w = getWindow();
        w.requestFeature(Window.FEATURE_RIGHT_ICON);
        setContentView(R.layout.main);
        w.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
                        R.drawable.icon);
but it doesn't work, the icon is still at left. Did I miss something?
Pls help me, thx!
--~--~---------~--~----~------------~-------~--~----~



Why doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

by Streets Of Boston » Wed, 29 Apr 2009 21:59:19 GMT


 It's a bug. I don't know if it's fixed in Cupcake, but in 1.1 and 1.0
this does not work. The icon will always be on the left.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Why doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

by quill » Thu, 30 Apr 2009 09:29:51 GMT


 Hi, Streets!
My sdk is cupcake1.5, the bug still remains...(if it is a bug)




--~--~---------~--~----~------------~-------~--~----~



Why doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

by Dianne Hackborn » Thu, 30 Apr 2009 10:12:04 GMT


 It's not a bug, you need to request all features before setContentView().








-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~



Why doesn't w.requestFeature(Window.FEATURE_RIGHT_ICON);work?

by quill » Thu, 30 Apr 2009 11:22:01 GMT


 Hi Dianne,
Do you mean I should put
w.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
                        R.drawable.icon);
before setContentView()? It still can't work.






--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Is there any reference implementation of MasterClear functionality?

Yep, I have googled all the groups and cupcake source code, the
FallbackCheckinService leaves it    empty ~

BRs
He
--~--~---------~--~----~------------~-------~--~----~

2. System log file size

Dear team,
I need a system log of the past three days. However I hove only the 3
past hours.
How can I change/configure the system log file size/location/name/
severity ?

 Thanks in advance,
                      AGA

--~--~---------~--~----~------------~-------~--~----~

3. Logcat View fails with "Could not create the view: 1"

4. DDM dispatch reg wait timeout

5. MediaPlayer(Streaming LiveTV from LinuxBox)

6. How to make the intent only launch one activity when more than one activity are matched?

7. How to port android for at91sam9261EK