suponho que poderia criar um Adapter para expor só o listener que eu
queria, é isso que quer dizer?


2014-02-06 18:42 GMT-02:00 Rafael Gonzaga Camargo <notifications@github.com>
:

> In BusRoutes/src/com/example/busroutes/RouteDetailsActivity.java:
>
> > +		setContentView(R.layout.activity_route_details);
> > +
> > +        viewPager = (ViewPager) findViewById(R.id.pager);
> > +        actionBar = getActionBar();
> > +		actionBar.setHomeButtonEnabled(true);
> > +		//actionBar.setTitle(R.string.title_details);
> > +        tabsAdapter = new TabsPagerAdapter(getSupportFragmentManager());
> > +
> > +        viewPager.setAdapter(tabsAdapter);
> > +        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
> > +
> > +
> > +        actionBar.addTab(actionBar.newTab().setText(R.string.title_stops).setTabListener(this));
> > +        actionBar.addTab(actionBar.newTab().setText(R.string.title_departures).setTabListener(this));
> > +
> > +        viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
>
> Para evitar a implementação deste Listener com os dois métodos vazios,
> qual o pattern você sugere? Dessa forma a classe ficaria mais clara.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/pedro1412/busroutesapp/pull/2/files#r9517365>
> .
>