I have an activity with 2 fragments. I've decided to use a PageAdapter to swipe between the two views, but, to stay close to the android design best practices, i've also decided to use the action bar tabs (fixed ones). I'm using ActionBarSherlock and some code from the here to implement the tabs. With just the pageadapter the activity worked wonderfully, now i'm having two issues: 1) the first fragment (MatchRugbyButtonFragment) superimpress an image of himself, so if i touch it and move or change something, i see the image above the working fragment. 2) when i go to the second fragment, the first lose all the variables (timer reset, counters reset, ecc). I had to create to tablistener because one fragment is a SherlockFragment and the other one is a SherlockListFragment and that caused an error where it couldn't cast the fragment to a SherlockListFragment. Here is the Activity:

  import java.util.ArrayList;
  import java.util.Arrays;
   import java.util.List;
    import java.util.Vector;

    import android.content.Intent;
    import android.os.Bundle;
     import android.support.v4.app.Fragment;
    import android.support.v4.app.FragmentManager;
     import android.support.v4.app.FragmentTransaction;
    import android.support.v4.app.ListFragment;
    import android.support.v4.view.ViewPager;
    import android.view.View;
    import android.widget.ArrayAdapter;
    import android.widget.Toast;

      import com.actionbarsherlock.app.ActionBar;
    import com.actionbarsherlock.app.ActionBar.Tab;
    import com.actionbarsherlock.app.SherlockFragment;
    import com.actionbarsherlock.app.SherlockFragmentActivity;
    import com.actionbarsherlock.view.Menu;
    import com.actionbarsherlock.view.MenuInflater;
    import com.actionbarsherlock.view.MenuItem;


    public class MatchRugbyFragments extends SherlockFragmentActivity implements
Edit
Report