Android ActionBar title does not change from PageChangeListener
<p>I got a <code>SlidingTabLayout</code> and I want to change the ActionBar's title every time I change tabs. I tried this:</p>

<pre><code>tabs.setOnPageChangeListener(new OnPageChangeListener() 
{

        @Override
        public void onPageSelected(int position) 
        {

             switch(position)
             {
               case 0:
               getActivity().getActionBar().setTitle("title 0");
               case 1:
               getActivity().getActionBar().setTitle("title 1")
               case 2:
               getActivity().getActionBar().setTitle("title 2");
               case 3:
               getActivity().getActionBar().setTitle("title 3");       
            } 

        @Override
        public void onPageScrolled(int arg0, float arg1, int arg2) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void onPageScrollStateChanged(int pos) {
                    // TODO Auto-generated method stub

                }
});
</code></pre>

<p>When debugging I do see the code being called, but the title does not change. When trying to set the title from other places in the code, it does work. 
What's the problem with what I did?</p>