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

Change mList menu #45

Closed
johngamarra opened this issue Apr 13, 2015 · 10 comments
Closed

Change mList menu #45

johngamarra opened this issue Apr 13, 2015 · 10 comments

Comments

@johngamarra
Copy link

Hi,

Is there an easy way to change the mList, when some action is made in the header, I can change it creating a new adapter, BUT, the selection status is lost in the mList

        ListView mList = this.getListView();
        List<Integer> mListExtra = new ArrayList<>();
        mListExtra.add(0, mNewSelector);
        mListExtra.add(1, mColorDefault);
        mListExtra.add(2, mColorIcon);
        mListExtra.add(3, mColorName);
        mListExtra.add(4, mColorSeparator);

        NavigationLiveoAdapter mNavigationAdapter = new NavigationLiveoAdapter(this, NavigationLiveoList.getNavigationAdapter(mListNameItem, null,
                null, null, mColorSelected, mRemoveSelector, this), mRemoveAlpha, mListExtra);

        mList.setAdapter(mNavigationAdapter);
@johngamarra
Copy link
Author

@rudsonlive can you help me with this? I'm sure It's something simple

@zirouan
Copy link
Owner

zirouan commented Apr 13, 2015

you can use the "01" method to get the last position in the list and then
re-create your list u can set the position in the method "02"

01: public int getCurrentPosition(){}
02: public void setDefaultStartPositionNavigation(int position){}

2015-04-13 17:43 GMT-03:00 John Gamarra notifications@github.com:

@rudsonlive https://github.com/rudsonlive can you help me with this?
I'm sure It's something simple


Reply to this email directly or view it on GitHub
#45 (comment)
.

Rudson Lima ( live-O ) Desenvolvedor Android
Contato +55 85 87050560* - Fortaleza-ce
*Google Play *CepLive-O e Navigation Drawer - Live-O
https://play.google.com/store/apps/developer?id=Rudson+Lima
*Social
facebook https://www.facebook.com/rudsonlive | google+
http://google.com/+RudsonLima-O | linkedin
http://br.linkedin.com/in/rudsonlive/

@johngamarra
Copy link
Author

Still not working, as I said, I can recreate the list using the code in the original post, but, the gray item selection is lost, do you know why?

there is no way to delete a item in the list?

@johngamarra
Copy link
Author

hello @rudsonlive?

@johngamarra
Copy link
Author

I think this can be easily solved if you add a way to repaint the mList, by adapter, please consider this enhacement, thanks.

@zirouan
Copy link
Owner

zirouan commented Jun 3, 2015

Now you can customize your list in version 2.3.2.

//{optional} - List Customization "If you remove these methods and the list will take his white standard color"
.selectorCheck(R.drawable.selector_check) //Inform the background of the selected item color
.colorItemDefault(R.color.nliveo_blue_colorPrimary) //Inform the standard color name, icon and counter
.colorItemSelected(R.color.nliveo_purple_colorPrimary) //State the name of the color, icon and meter when it is selected
.backgroundList(R.color.nliveo_black_light) //Inform the list of background color
.colorLineSeparator(R.color.nliveo_transparent) //Inform the color of the subheader line

@johngamarra
Copy link
Author

I think you didn't understand me,

I need to do this:

For example my Drawer is like this:

[header]
Inbox
trash
[footer]

I need to change it like this (a totally diferent list)

[header]
something
another
[footer]

don't care about color or other stuff, I need to change the list @rudsonlive

@zirouan
Copy link
Owner

zirouan commented Jul 18, 2015

Mine is built on "HelpLiveo", then the order you create the object is the
order that will be your menu

The header and footer is standard, so their interaction is only with the
list items.

ex;

HelpLiveo mHelpLiveo HelpLiveo = new ();
mHelpLiveo.add (Icon, "something");
mHelpLiveo.add (getString (icon, "another");

Then just tell your mHelpLiveo the method addAllHelpItem

ex
with (this) // default theme is dark
.startingPosition (0) // Starting position in the list
.addAllHelpItem (mHelpLiveo.getHelp ())

I hope this helps.

2015-07-18 13:17 GMT-03:00 John Gamarra notifications@github.com:

I think you didn't understand me,

I need to do this:

For example my Drawer is like this:

[header]
Inbox
trash
[footer]

I need to change it like this (a totally diferent list)

[header]
something
another
[footer]

don't care about color or other stuff, I need to change the list
@rudsonlive https://github.com/rudsonlive


Reply to this email directly or view it on GitHub
#45 (comment)
.

Rudson Lima ( live-O ) Desenvolvedor Android
Contato +55 85 87050560* - Fortaleza-ce
*Google Play *CepLive-O e Navigation Drawer - Live-O
https://play.google.com/store/apps/developer?id=Rudson+Lima
*Social
facebook https://www.facebook.com/rudsonlive | google+
http://google.com/+RudsonLima-O | linkedin
http://br.linkedin.com/in/rudsonlive/

@johngamarra
Copy link
Author

Unfortunately it does not work

I'm calling this in init

   mHelpLiveo = new HelpLiveo();
    mHelpLiveo.add(getString(R.string.inbox));
    mHelpLiveo.add(getString(R.string.trash));

    with(this, Navigation.THEME_LIGHT).
            with(this)
            .startingPosition(0)
            .addAllHelpItem(mHelpLiveo.getHelp())
            .footerItem(R.string.log_out, R.drawable.ic_logout_black_48dp)
            .customHeader(mCustomHeader)
            .setOnPrepareOptionsMenu(onPrepare)
            .setOnClickFooter(onClickFooter)
            .build();

and everything is OK, then in onClick on a button I'm calling this:

public void onClick(View v) {

        mHelpLiveo = new HelpLiveo();
        mHelpLiveo.add("something");
        mHelpLiveo.add("another");

        with(MainActivity.this)
                .startingPosition(0)
                .addAllHelpItem(mHelpLiveo.getHelp());
    }

NavigationDrawer is gone, lost.... it does not work

@zirouan
Copy link
Owner

zirouan commented Jul 18, 2015

Friend, now that understands your situation and I apologize for the
confusion.

Unfortunately today it is not possible.

We will soon release a new version and try to implement this functionality.

Once again I apologize and thank you for contact.

2015-07-18 13:58 GMT-03:00 John Gamarra notifications@github.com:

Unfortunately it does not work

I'm calling this in init

mHelpLiveo = new HelpLiveo();
mHelpLiveo.add(getString(R.string.inbox));
mHelpLiveo.add(getString(R.string.trash));

with(this, Navigation.THEME_LIGHT).
        with(this)
        .startingPosition(0)
        .addAllHelpItem(mHelpLiveo.getHelp())
        .footerItem(R.string.log_out, R.drawable.ic_logout_black_48dp)
        .customHeader(mCustomHeader)
        .setOnPrepareOptionsMenu(onPrepare)
        .setOnClickFooter(onClickFooter)
        .build();

and everything is OK, then in onClick on a button I'm calling this:

public void onClick(View v) {

    mHelpLiveo = new HelpLiveo();
    mHelpLiveo.add("something");
    mHelpLiveo.add("another");

    with(MainActivity.this)
            .startingPosition(0)
            .addAllHelpItem(mHelpLiveo.getHelp());
}

NavigationDrawer is gone, lost.... it does not work


Reply to this email directly or view it on GitHub
#45 (comment)
.

Rudson Lima ( live-O ) Desenvolvedor Android
Contato +55 85 87050560* - Fortaleza-ce
*Google Play *CepLive-O e Navigation Drawer - Live-O
https://play.google.com/store/apps/developer?id=Rudson+Lima
*Social
facebook https://www.facebook.com/rudsonlive | google+
http://google.com/+RudsonLima-O | linkedin
http://br.linkedin.com/in/rudsonlive/

@zirouan zirouan closed this as completed Feb 17, 2016
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

2 participants