Giter Club home page Giter Club logo

Comments (27)

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Just looked at everything and I don't think it should be too difficult. Plan of action :

  • extend Window (it's an abstract class) with a class "custom window"
  • instantiate it in the Activities' onCreate methods and pass it the "actual window" and the SlidingMenu from the Activity
  • override getDecorView in custom window to return an arbitrary view
  • all other abstract methods should be passed to the actual window
  • override getWindow in the Activities to return the custom window

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Check up time!
Status : completed, kind of...
Why the "kind of..."? Well, doing this is more complicated than I had planned. Doing everything in my comment above turned out to be relatively easy and I could trick ABS into installing the ActionBar into any view I wanted. The only problem is that integrating involves more steps than that. In order to get the ActionBar to slide with the above view, 2 more steps have to happen and they are
1 - The ABS/res/values-v11 and ABS/res/values/v-14 folders have to be deleted
2 - The ActionBarSherlock class must point to ActionBarSherlockCompat and never use ActionBarSherlockNative
This is as far as I know right now. These steps were taken in the patched version of ABS included with SlidingMenu. I'm going to try to dig farther down and see if I can get this to work with the native ActionBar as well.

from slidingmenu.

ramdroid avatar ramdroid commented on August 28, 2024

Maybe you should get in touch with Jake Wharton about this?

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

The usages of a customized ActionBarSherlock library is the only thing stopping the library from being great.

Also, just because a project is using the ActionBarSherlock, doesn't mean that we necessarily want the Action Bar to move with the "CustomViewAbove".

I'd love to be able to use this with stock ActionBarSherlock, even (especially) if it mean a stationary Action Bar. Perhaps make this the default, and have the custom one as a separate option?

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

The only thing different in the patched version of ABS is the the values-v11 and values-v14 folders have been deleted and the ActionBarSherlockNative file is not registered in ActionBarSherlock.java.

Writing non Sherlock dependent Activities would be doable, just more work on my plate.

If you want to use it with any project for now, you can definitely just manage the SlidingMenu yourself as you would manage a ViewGroup because that's really what it is. Does that make sense for the interim?

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

Thanks for the reply and awesome work. I can definitely code around this (and I have), but it would be nice if I didn't have to. :)

Just to be clear, I am not asking for non-sherlock dependent activities, but rather ones that don't require a modified ABS library. It appears that the only reason for the patched ABS is to allow the action bar to shift with the above content, correct? I just started looking into the library, so please excuse my ignorance.

The amount of polish in here is great, and with a few minor adjustments, this could definitely become the go-to library for Nav Drawers (similar to the way ABS is for Action Bars). The only thing stopping me from recommending it to everyone is this ABS issue.

Keep up the great work!

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Thank you so much for the appreciation. I definitely need those recommendations :)
Ah, I'm sorry about the way I worded that. Just to clarify, non-Sherlock dependent activities would be the same thing as what you asked for, I just worded it differently.
Also, do you think the current form of the Activities would be good to keep for the new regular Activity wrappers that I write? (i.e. setContentView, setBehindContentView, getSlidingMenu, etc.).
It just may get incredibly complicated having to maintain regular Activities (those that don't have sliding ActionBars, whether SherlockActivities or not) and then SherlockActivities that have sliding ActionBars. I definitely want to expose the sliding ActionBar Activities to users as well. Any recommendations?

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

The move off my patched version is almost complete. There is just one bug left where the Behind View will be drawn under the notification bar. If anybody knows how to fix this, please let me know!

from slidingmenu.

derekbrameyer avatar derekbrameyer commented on August 28, 2024

I wouldn't have the first idea, but maybe setting a top margin? That seems like a really ugly solution, though, but I'm really glad to hear that this library might be standalone soon!

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Yeah, that was the plan for now until I can find a more permanent solution

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Done-ish. With a hack for that top margin. There is a method that does exactly what I want but it's only exposed on API 14 and later. It's called setFitsSystemWindows(boolean b). If anybody has any ideas about this please let me know.
I've also been using it recently with stock ABS and HoloEverywhere for a project.
Soooo, about those recommendations... :P

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

Awesome work with the latest update. Sorry I wasn't able to get back sooner, you know how these things go.

I just posted on Google+ recommending this project, and the response is already very positive: https://plus.google.com/u/0/113406723988623654387/posts/iB18AhbWJTS.

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Thanks a lot and thanks for the post! I think it brought in around 20 watchers so far. Super exciting :)

Definitely still a ways to go, but this was an awesome round of refactoring.

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

My pleasure! The recognition is well-deserved. 20 watchers = tip of the iceberg. :-)

I'm actually now having an issue with ABS integration. I created copies of SlidingFragmentActivity and SlidingActivityHelper to extend SherlockFragmentActivity. This works perfectly with the native Action Bar in ICS and JB (surfaced from ABS), but the Action Bar is not showing up on anything below ICS (including Honeycomb).

This is observed on a Nexus One running stock 2.3.6, and a 3.2 Emulator (my Galaxy Tab is dead in more ways than one).

Is there some other modification that I am overlooking, or is this a bug?

EDIT
I should note that I am also using ViewPagerIndicator and HoloEverywhere in this project. The tabs are showing and working correctly in all API versions tested.

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Hmmm what theme are you using?

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

Theme.HoloEverywhereLight.DarkActionBar.Sherlock but the same is happening with Theme.HoloEverywhereLight.Sherlock and Theme.HoloEverywhereDark.Sherlock.

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

And you're using a stock version of ABS, not the one that I had in the repo before?

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Hmmm I just tested on a 2.3.4 Bionic and it seems fine there

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

Correct. I'm guessing that you're not seeing this?


Paul Burke
ipaul.pro
On Jul 25, 2012 4:54 PM, "Jeremy Feinstein" <
[email protected]>
wrote:

And you're using a stock version of ABS, not the one that I had in the
repo before?


Reply to this email directly or view it on GitHub:
#6 (comment)

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Nope. How are your dependencies set up?

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

Added all stock libraries linked through Eclipse as Android Library
Projects. Using only the libraries mentioned above.

Could you share your setup with ABS, and ViewPagerIndicator that is working
for you?


Paul Burke
ipaul.pro

On Wed, Jul 25, 2012 at 5:04 PM, Jeremy Feinstein <
[email protected]

wrote:

Nope. How are your dependencies set up?


Reply to this email directly or view it on GitHub:
#6 (comment)

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Is there a way that I could do that without sharing the project itself?

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

Not really, but I'm sure your followers would benefit from an "example-abs-vpi" project in the repo that shows how to use this with ActionBarSherlock and ViewPagerIndicator. :-)

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Yeah, better examples need to come soon.
Can you get the View Hierarchy of your application and send that to me? I'm not too familiar with the Eclipse tool for doing this. Or just call getWindow().getDecorView() and then trace down to where the ActionBarContainers are and let me know what their parent view is.

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

From the View Hierarchy, it looks like the ActionBarContainer is either removed by me (oops, if it was) or was never generated. Is the ActionBar fine if you activity doesn't extend Sliding_Activity?
If it is, then I'd like to see your code so I can check it out.

from slidingmenu.

iPaulPro avatar iPaulPro commented on August 28, 2024

I figured it out! Setting setSlidingActionBarEnabled(false) causes the Action Bar to disappear completely when using ABS. I will create a new, separate Issue for this.

from slidingmenu.

jfeinstein10 avatar jfeinstein10 commented on August 28, 2024

Awesome! ... well not awesome that it happens, but awesome that now we know the cause. I'll get on it as soon as I can. Thanks for rooting this issue out :)

from slidingmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.