Skip to content

Cannot remove replace HeaderView1 with with HeaderView2 #29

Description

@erikswed

Just wanted to have two different HeaderView.xml to switch between but I cannot remove them

Here´s what I try:

        SublimeNavigationView navigate = (SublimeNavigationView) findViewById(R.id.navigation_view);
        if (navigate.getHeaderView() != null)
            navigate.removeHeaderView(navigate.getHeaderView());
        navigate.addHeaderView((View)getLayoutInflater().inflate(R.layout.nav_header, null, false));
        

This code only add one more HeaderView.xml and display them as a header list
Is there some replace method or switsh method to change header?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions