Reputation: 39
I make this code with base in ActionBarSherlokFragment Demo. I wish that when the user click the Button inside the Tab1 he be directed to Tab2 with this implementation because this implementation contains PageView. Is possible ?
Look the code Home: http://pastebin.com/GU63pYM6
Event Button RelatorioFragment:
bt_vergrafico.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(getActivity(), "Click", Toast.LENGTH_SHORT).show();
}
});
Upvotes: 0
Views: 125
Reputation: 11509
Try this
@Override
public void onClick(View v) {
mViewPager.setCurrentItem(position);
}
Upvotes: 1