Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

SubItems feature status? #796

Open
Alexwijn opened this issue Feb 26, 2014 · 11 comments
Open

SubItems feature status? #796

Alexwijn opened this issue Feb 26, 2014 · 11 comments

Comments

@Alexwijn
Copy link

Some while ago I noticed the SubItems code and asked about it. I have been told that it will be implemented. But I'm wondering at what timeframe it can be realized at the moment?

@Prototik
Copy link
Owner

At least 70%... I'll try to finish impl in couple days.

@Alexwijn
Copy link
Author

Ok, thanks. I'm looking forward to it.

@Prototik
Copy link
Owner

Prototik commented Mar 3, 2014

I'm a lazy bastardo.
screenshot from 2014-03-03 16 08 41

But I'll write it! :)

@Alexwijn
Copy link
Author

Alexwijn commented Mar 6, 2014

Looks great! I assume the subitems are layouts that can be adjust like their parents.

Prototik pushed a commit that referenced this issue Mar 18, 2014
@Prototik
Copy link
Owner

When I said basic - I mean really basic... I have not enough time for make it quickly, sorry.
screenshot from 2014-03-18 20 01 19

@Alexwijn
Copy link
Author

I just attempt to update to the master version, replaced all files. But I get the following exception: Couldn't bind menu on view.

I guess the view he is talking about is menu.xml (http://pastebin.com/8fNnpaEE). That will be called from my code: SliderMenu sliderMenu = addonSlider().obtainDefaultSliderMenu(R.layout.menu);. Is there anything I need to change to match the new version?

@Prototik
Copy link
Owner

@Alexwijn yep, listview's id should be @+id/slider_menu, not @android:id/list

@Alexwijn
Copy link
Author

Thanks. It opens now without any errors about it.

Could you give me a code snippet? Since I'm unable to add any subitems to an existing item.
SliderItem categories = sliderMenu.add(R.string.betting_categories, BetsFragment.class, background); categories.add(categoriesText[0], FootballFragment.class, background);

I'm not receiving any errors but there is no arrow like on your screenshot and when I click on the "categories" SliderItem it just showing me BetsFragment and it does not expand.

@Prototik
Copy link
Owner

... oh shit. Of course, I forgot about subitems :-/
Two ways:

  • Replace ListView with ViewStubHolo (addon automatically replace it with needed view) (but then you lose support of layout attrs) (but you can avoid this by using FrameLayout)
  • Replace ListView with ExpandableListView

@Alexwijn
Copy link
Author

Thanks for the quick reply. I tried both methods. The first method does not change anything and the second only adds an arrow at the start of the button. I only change ListView at my menu.xml, you mean that one right?

@scott2014
Copy link

After read this,l solved my problem too,thank you so much

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

No branches or pull requests

3 participants