I want to implement a collapsing toolbar with navigation bar in it (dots). User can swipe over the image to go next image in the collapsing toolbar layout . How do I go with it?? I searched a lot many tutorials but I am able implement just collapsing toolbar layout. Many Thanks for any thoughts on it.
Try the below code
//actionbar.setNavigationIcon(R.drawable.ic_arrow);
Toolbar actionbar = (Toolbar) findViewById(R.id.actionbar);
if (null != actionbar) {
actionbar.setNavigationIcon(R.drawable.ic_arrow);
actionbar.setTitle(R.string.title_activity_settings);
actionbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// your implementation here
}
});
// Inflate a menu to be displayed in the toolbar
actionbar.inflateMenu(R.menu.menu);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.