Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThemeHolo for honeycomb #47

Open
benuch opened this issue Jan 5, 2012 · 11 comments
Open

ThemeHolo for honeycomb #47

benuch opened this issue Jan 5, 2012 · 11 comments

Comments

@benuch
Copy link

benuch commented Jan 5, 2012

Hello,

I'm beginning with your great implementation of ActionBar. I have more a bug and a request.

You recently add Theme.Holo compatibility for >V14. I'm interested by have also compatibility for tablet (v11 and more).
If I modify source to change theme with V11, it works on Honecomb. The only problems that I encounter is that the menu button on the bottom disappear and I have no access to menu. It would be interesting to add on you ActionBar a menu button on the right, that open on a list the menu for android V11 to V13. (Similar to the ActionBar of Android)

This bug is due to compiled for target greater than V11, the menu button disappear on Honeycomb, instead I use the classic theme.

Thanks

Benuch

@johannilsson
Copy link
Owner

I haven't done much testing on honeycomb, simply missed that holo is available there. However, its a good practice to have your own app theme. You can simply do this by referencing the style attr for the actuonbar in your own theme.

The target problem you describes is more an android.issue, and you can still use the holo theme and have.the.target set to 11 just make sure you have the 12+ sdk.

Also, I just want to be clear that this ab does not intend to replace the native one.

@benuch
Copy link
Author

benuch commented Jan 5, 2012

Hello,

I use a link to style theme and modify value to actionbar theme derived
from classic or holo theme depend on android version as in your example. (
Work fine)

For the problem of menu on honeycomb, this is not specific to our widget.
When you make target to android 11 or more, and compiled with the same SDK,
the menu button disappear from bottom and you could not access to our menu.
Normally, this menu is present in stock actionbar.

I understand that this widget is not design to replace the original. Just a
request to enhanced integration. I test the actionbar compatibility from
Google, action bar sherlock and our widget done the Best result for me.

Ben
Le 5 janv. 2012 08:15, "Johan Nilsson" <
reply@reply.github.com>
a crit :

I haven't done much testing on honeycomb, simply missed that holo is
available there. However, its a good practice to have your own app theme.
You can simply do this by referencing the style attr for the actuonbar in
your own theme.

The target problem you describes is more an android.issue, and you can
still use the holo theme and have.the.target set to 11 just make sure you
have the 12+ sdk.

Also, I just want to be clear that this ab does not intend to replace the
native one.


Reply to this email directly or view it on GitHub:

#47 (comment)

@johannilsson
Copy link
Owner

I struggled with the menu too in my recent project, I didn't come up with a good solution for it. But the thing is that I don't want to assume that the user wants the menu added to the actionbar by default. If one wants that, then that can be done programtically instead.

@benuch
Copy link
Author

benuch commented Jan 5, 2012

Yes, I understand, but I tried to do it programtically without success. I
can add specifically for v11-V13 a button to ActionBar for expand menu, but
the classical function on activity (openOptionsMenu ()) seems that work on
honeycomb. If you have some better result, I'm interesting. Instead, I'm
going to propose a ListDialog with the menu but I preferred to limited the
specific code on class and make compatibility between android version with
the resources.

May be an option to inflate the classical menu on a button of the
ActionBar, which on clic show the menu as a list similarly to the Stock
ActionBar would be interesting? May be we can do it with the actual version
of your widget?

Ben

Le 5 janvier 2012 09:54, Johan Nilsson <
reply@reply.github.com

a crit :

I struggled with the menu too in my recent project, I didn't come up with
a good solution for it. But the thing is that I don't want to assume that
the user wants the menu added to the actionbar by default. If one wants
that, then that can be done programtically instead.


Reply to this email directly or view it on GitHub:

#47 (comment)

@rfgamaral
Copy link

I'm not sure this is relevant to this issue but maybe it's helpful in some way...

I too noticed those commits to add compatibility for the Holo theme on V14 but a similar change is missing for Honeycomb. It's an easy fix and maybe it will help with the issue here described. Or maybe not, I don't know. Still, this should be added anyway.

Here's a fairly easy to understand article on the Holo theme support for every Android version:
http://www.chainfire.eu/articles/109/Themes_across_Android_versions/

@johannilsson
Copy link
Owner

@rfgamaral My bad on the Holo theme, should work by just renaming values-v14 to values-v11 right?

@rfgamaral
Copy link

No, not exactly.

You need both with different content. But the idea is the same, you can read more about it in the official development blog if you missed it: http://android-developers.blogspot.com/2012/01/holo-everywhere.html

I just find the link I posted above a little more helpful on the actual implementation. The one on the Android Developers Blog has more history and justifications on the whole theme thing.

If you are still confused, I can try and take a look for you... Then push a change to my fork and do a pull request if you're interested.

P.S: This is totally unrelated but it's a minor detail, no need to open a new issue, but the 'default.properties' file is not needed anymore. You removed it from the "actionbar" folder but missed it on "actionbarexample".

@johannilsson
Copy link
Owner

I think I understand the differences now, but if you have the time to do a pull request for it that would be very appreciated. My main problem is that I haven't got the emulator for honeycomb to work and I don't have an actual device at hands anymore to test on.

@rfgamaral
Copy link

Ah, I don't have anything of that either.

I was just going to do it as stated and if it compiles, assume it's working lol... I'll see if I can find the time to install it...

@benuch
Copy link
Author

benuch commented Jan 9, 2012

For me, HoloTheme work fine either in honeycomb emulator and nexus S on
ICS. And I love to give theme of the plateform for my application.

For my problem of menu, I workarround by adapt interface of my application.
Otherwise, you can use PopupMenu for Android >3.0.

Thanks for this great widget. I'm really happy with it.
Le 8 janv. 2012 23:03, "Ricardo Amaral" <
reply@reply.github.com>
a crit :

Ah, I don't have anything of that either.

I was just going to do it as stated and if it compiles, assume it's
working lol... I'll see if I can find the time to install it...


Reply to this email directly or view it on GitHub:

#47 (comment)

@johannilsson
Copy link
Owner

@benuch I think it's a better idea to let the dev choose to show an PopupMenu, Dialog or an options menu instead of having that logic in the action bar. If you have an example of your workaround, you might want to share that by an example in the example project? Guess there's others looking for some similar solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants