Back to project page soundheap.
The source code is released under:
Copyright (c) 2014, Nicholas Wertzberger All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are...
If you think the Android project soundheap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ideaheap.sound.control; //from w w w . j a v a 2s .com import android.support.v4.app.FragmentTransaction; import android.util.Log; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.ActionBar.Tab; import com.actionbarsherlock.app.SherlockFragment; public class TabListener implements ActionBar.TabListener { private static final String TAG = TabListener.class.toString(); public final SherlockFragment fragment; private final int elementId; public TabListener(SherlockFragment fragment, int elementId) { this.fragment = fragment; this.elementId = elementId; } @Override public void onTabSelected(Tab tab, FragmentTransaction ft) { if (fragment == null) Log.v(TAG, "fragment is null"); if (ft == null) Log.v(TAG, "fragment TRANSACTION is null"); ft.replace(elementId, fragment); } @Override public void onTabUnselected(Tab tab, FragmentTransaction ft) { } @Override public void onTabReselected(Tab tab, FragmentTransaction ft) { } }