android Programming Glossary: sherlockfragment
Switching fragments within tab http://stackoverflow.com/questions/10502786/switching-fragments-within-tab classes My main class public class TreinVerkeer extends SherlockFragmentActivity @Override public void onCreate Bundle savedInstanceState.. with some minor changes public class TabListener T extends SherlockFragment implements com.actionbarsherlock.app.ActionBar.TabListener private.. com.actionbarsherlock.app.ActionBar.TabListener private SherlockFragment mFragment private final Activity mActivity private final String..
how can i update view when fragment change? http://stackoverflow.com/questions/13687280/how-can-i-update-view-when-fragment-change page is just blank public class VpiAbsTestActivity extends SherlockFragmentActivity private static final String CONTENT new String 1 2 TestFragmentAdapter.. page but not show public class customlistnotuser extends SherlockFragment All static variables static final String URL url XML node keys..
Using ActionBarSherlock With the New SupportMapFragment http://stackoverflow.com/questions/13721929/using-actionbarsherlock-with-the-new-supportmapfragment import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener.. import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener.. import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener public class SherlockDialogFragment..
Initialize MapFragment programmatically with Maps API v2 http://stackoverflow.com/questions/13733299/initialize-mapfragment-programmatically-with-maps-api-v2 extends BaseDBFragment BaseDBFragment is just a SherlockFragment with custom utility methods. private static final String MAP_FRAGMENT_TAG..
Android Viewpager as Image Slide Gallery http://stackoverflow.com/questions/13796382/android-viewpager-as-image-slide-gallery your Viewpager public class PlaceDetailsFragment extends SherlockFragment PlaceSlidesFragmentAdapter mAdapter ViewPager mPager PageIndicator..
Android customize action bar with api<11 http://stackoverflow.com/questions/16398188/android-customize-action-bar-with-api11 the same names but prefixed with Sherlock SherlockActivity SherlockFragment etc. To access the actionbar in code you call getSupportActionBar..
Replace one Fragment with another in ViewPager http://stackoverflow.com/questions/18588944/replace-one-fragment-with-another-in-viewpager FragmentActivity public class TabsFacturasActivity extends SherlockFragmentActivity private MyAdapter mAdapter private ViewPager mPager.. Fragment public class DetallesFacturaFragment extends SherlockFragment @Override public void onCreate Bundle savedInstanceState super.onCreate.. FragmentActivity public class TabsFacturasActivity extends SherlockFragmentActivity public void onBackPressed if mPager.getCurrentItem 0..
java.lang.IllegalStateException: Activity has been destroyed using fragments http://stackoverflow.com/questions/19239175/java-lang-illegalstateexception-activity-has-been-destroyed-using-fragments class twice . public class MapActivity extends SherlockFragmentActivity implements LocationListener TabListener LatLng mLocation.. super.onPause public class CustomMapFragment extends SherlockFragment private SupportMapFragment fragment private GoogleMap map public..
Switching fragments within tab http://stackoverflow.com/questions/10502786/switching-fragments-within-tab Can anyone help me with this For clarity some significant classes My main class public class TreinVerkeer extends SherlockFragmentActivity @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState setupTabs savedInstanceState.. from Adding Navigations Tabs on the Android developer site with some minor changes public class TabListener T extends SherlockFragment implements com.actionbarsherlock.app.ActionBar.TabListener private SherlockFragment mFragment private final Activity mActivity.. public class TabListener T extends SherlockFragment implements com.actionbarsherlock.app.ActionBar.TabListener private SherlockFragment mFragment private final Activity mActivity private final String mTag private final Class T mClass Constructor used each..
how can i update view when fragment change? http://stackoverflow.com/questions/13687280/how-can-i-update-view-when-fragment-change when the app runs only one list view is displayed the other page is just blank public class VpiAbsTestActivity extends SherlockFragmentActivity private static final String CONTENT new String 1 2 TestFragmentAdapter mAdapter ViewPager mPager PageIndicator mIndicator.. when change pages the customlistnotuser page likes customlist page but not show public class customlistnotuser extends SherlockFragment All static variables static final String URL url XML node keys static final String KEY_TEST test parent node static final..
Using ActionBarSherlock With the New SupportMapFragment http://stackoverflow.com/questions/13721929/using-actionbarsherlock-with-the-new-supportmapfragment import com.actionbarsherlock.view.MenuItem import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener.. com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener.. import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener public class SherlockDialogFragment extends DialogFragment implements OnCreateOptionsMenuListener..
Initialize MapFragment programmatically with Maps API v2 http://stackoverflow.com/questions/13733299/initialize-mapfragment-programmatically-with-maps-api-v2 ideas Here is my testing code so far public class ParadaInfoFragment extends BaseDBFragment BaseDBFragment is just a SherlockFragment with custom utility methods. private static final String MAP_FRAGMENT_TAG map private GoogleMap mMap private SupportMapFragment..
Android Viewpager as Image Slide Gallery http://stackoverflow.com/questions/13796382/android-viewpager-as-image-slide-gallery than text. Here is the sample code This is how you setup your Viewpager public class PlaceDetailsFragment extends SherlockFragment PlaceSlidesFragmentAdapter mAdapter ViewPager mPager PageIndicator mIndicator public static final String TAG detailsFragment..
Android customize action bar with api<11 http://stackoverflow.com/questions/16398188/android-customize-action-bar-with-api11 Fragments you use ones from the Sherlock Library. They have the same names but prefixed with Sherlock SherlockActivity SherlockFragment etc. To access the actionbar in code you call getSupportActionBar . This returns either the regular actionbar for Honeycomb..
Replace one Fragment with another in ViewPager http://stackoverflow.com/questions/18588944/replace-one-fragment-with-another-in-viewpager should continue displaying DetallesFacturaFragment . Code FragmentActivity public class TabsFacturasActivity extends SherlockFragmentActivity private MyAdapter mAdapter private ViewPager mPager private PageIndicator mIndicator @Override protected void onCreate.. dialog int which TODO Auto generated method stub Fragment public class DetallesFacturaFragment extends SherlockFragment @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState setRetainInstance true public.. to another it doesn't change its Fragment . Here is my code FragmentActivity public class TabsFacturasActivity extends SherlockFragmentActivity public void onBackPressed if mPager.getCurrentItem 0 if mAdapter.getItem 0 instanceof DetallesFacturaFragment ..
java.lang.IllegalStateException: Activity has been destroyed using fragments http://stackoverflow.com/questions/19239175/java-lang-illegalstateexception-activity-has-been-destroyed-using-fragments code and my fragment class. just for test I put CustoMapFragment class twice . public class MapActivity extends SherlockFragmentActivity implements LocationListener TabListener LatLng mLocation GoogleMap map CustomMapFragment fragment1 new CustomMapFragment.. void onResume super.onResume @Override public void onPause super.onPause public class CustomMapFragment extends SherlockFragment private SupportMapFragment fragment private GoogleMap map public CustomMapFragment super @Override public View onCreateView..
|