-
-
Save vekexasia/33fa5a66c6c10fd5b042 to your computer and use it in GitHub Desktop.
Footer adding to NavigationView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyFragment extends Fragment { | |
/* ... */ | |
@Override | |
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); | |
ListView listView = (ListView) navigationView.getChildAt(0); | |
View toRet = LayoutInflater.from(view.getContext()).inflate(R.layout.drawer_footer, listView, false); | |
// Manipulate the view (if you need to) before calling addFooterView. | |
listView.addFooterView(toRet, null, false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment