當前位置: 首頁>>代碼示例>>Java>>正文


Java SherlockFragment類代碼示例

本文整理匯總了Java中com.actionbarsherlock.app.SherlockFragment的典型用法代碼示例。如果您正苦於以下問題:Java SherlockFragment類的具體用法?Java SherlockFragment怎麽用?Java SherlockFragment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SherlockFragment類屬於com.actionbarsherlock.app包,在下文中一共展示了SherlockFragment類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    repository = getSerializableExtra(EXTRA_REPOSITORY);

    setContentView(layout.commit_compare);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setSubtitle(repository.generateId());
    avatars.bind(actionBar, repository.getOwner());

    fragment = (SherlockFragment) getSupportFragmentManager()
            .findFragmentById(android.R.id.list);
}
 
開發者ID:huibinfeng0810,項目名稱:github-v2,代碼行數:17,代碼來源:CommitCompareViewActivity.java

示例2: getItem

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public Fragment getItem(int position) {
	SherlockFragment fragment = null;

	if (position == 0) {
		fragment = new PSettingsOptionsFragment();
	} else if (position == 1) {
		fragment = new PAboutFragment();
	}

	return fragment;
}
 
開發者ID:LeonardoCardoso,項目名稱:Silence-Please,代碼行數:13,代碼來源:PSettingsFragment.java

示例3: getFragment

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
/**
 * Get selected fragment
 *
 * @return fragment
 */
protected SherlockFragment getFragment() {
    FragmentProvider provider = getProvider();
    if (provider != null)
        return provider.getSelected();
    else
        return null;
}
 
開發者ID:huibinfeng0810,項目名稱:github-v2,代碼行數:13,代碼來源:PagerActivity.java

示例4: onOptionsItemSelected

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
    SherlockFragment fragment = getFragment();
    if (fragment != null)
        return fragment.onOptionsItemSelected(item);

    return super.onOptionsItemSelected(item);
}
 
開發者ID:huibinfeng0810,項目名稱:github-v2,代碼行數:9,代碼來源:PagerActivity.java

示例5: onCreateOptionsMenu

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    SherlockFragment fragment = getFragment();
    if (fragment != null)
        fragment.onCreateOptionsMenu(menu, getSupportMenuInflater());

    boolean created = super.onCreateOptionsMenu(menu);
    menuCreated = true;
    return created;
}
 
開發者ID:huibinfeng0810,項目名稱:github-v2,代碼行數:11,代碼來源:PagerActivity.java

示例6: onTabSelected

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
	SherlockFragment toShow = null;
	if (tab.getPosition() == 0){
		toShow = new LoginFragment();
	}else{
		toShow = new RegisterFragment();
	}
	ft.replace(android.R.id.content, toShow); // <----- Content view is set here

}
 
開發者ID:KinveyApps,項目名稱:tictac-android,代碼行數:12,代碼來源:UserActivity.java

示例7: onOptionsItemSelected

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	switch (item.getItemId()) {
	case MENU_REFRESH:
		SherlockFragment fragment = getFragmentByPosition(viewPager
				.getCurrentItem());
		if (fragment != null) {
			fragment.onOptionsItemSelected(item);
		}
		return true;
	default:
		return super.onOptionsItemSelected(item);
	}
}
 
開發者ID:Consoar,項目名稱:zhangshangwuda,代碼行數:15,代碼來源:NewsFragmentSupport.java

示例8: createStartGameFragment

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
private SherlockFragment createStartGameFragment() {
	SherlockFragment f = new StartGameFragment();
	if (getIntent().hasExtra("cards")) {
		f.setArguments(getIntent().getExtras());
	}
	return f;
}
 
開發者ID:rykerwilliams,項目名稱:androminion,代碼行數:8,代碼來源:MenuActivity.java

示例9: PhotoHandler

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
public PhotoHandler(Context context, BaseRawContactEditorView editor, int photoMode, RawContactDeltaList state, 
        SherlockFragment fragment) {

    super(context, editor.getPhotoEditor(), photoMode, false, state, fragment);
    mEditor = editor;
    mRawContactId = editor.getRawContactId();
    mPhotoEditorListener = new PhotoEditorListener();
}
 
開發者ID:SilentCircle,項目名稱:silent-contacts-android,代碼行數:9,代碼來源:ContactEditorFragment.java

示例10: PhotoHandler19

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
public PhotoHandler19(Context context, BaseRawContactEditorView editor, int photoMode, RawContactDeltaList state,
                    SherlockFragment fragment) {

    super(context, editor.getPhotoEditor(), photoMode, false, state, fragment);
    mEditor = editor;
    mRawContactId = editor.getRawContactId();
    mPhotoEditorListener = new PhotoEditorListener();
}
 
開發者ID:SilentCircle,項目名稱:silent-contacts-android,代碼行數:9,代碼來源:ContactEditorFragment.java

示例11: PhotoSelectionHandler19

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
public PhotoSelectionHandler19(Context context, View photoView, int photoMode, boolean isDirectoryContact,
                               RawContactDeltaList state, SherlockFragment fragment) {

    mContext = context;
    mPhotoView = photoView;
    mPhotoMode = photoMode;
    mTempPhotoUri = ContactPhotoUtils19.generateTempImageUri(context);
    mCroppedPhotoUri = ContactPhotoUtils19.generateTempCroppedImageUri(mContext);
    mIsDirectoryContact = isDirectoryContact;
    mState = state;
    mPhotoPickSize = getPhotoPickSize();
    parentFragment = fragment;
}
 
開發者ID:SilentCircle,項目名稱:silent-contacts-android,代碼行數:14,代碼來源:PhotoSelectionHandler19.java

示例12: PhotoSelectionHandler

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
public PhotoSelectionHandler(Context context, View photoView, int photoMode, boolean isDirectoryContact, 
        RawContactDeltaList state, SherlockFragment fragment) {

    mContext = context;
    mPhotoView = photoView;
    mPhotoMode = photoMode;
    mIsDirectoryContact = isDirectoryContact;
    mState = state;
    mPhotoPickSize = getPhotoPickSize();
    parentFragment = fragment;
}
 
開發者ID:SilentCircle,項目名稱:silent-contacts-android,代碼行數:12,代碼來源:PhotoSelectionHandler.java

示例13: getItem

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public SherlockFragment getItem(int position) {
	if (Images.imageUrls[position].endsWith("audio")) {
		return ImageDetailFragment.newInstance(position+1);
	}
	if (galleryReference == -1) {
		Log.d(TAG, "SEtting IDF.id"); 
		return ImageDetailFragment.newInstance(position);
	} else {
		Log.d(TAG, "SEtting IDF.id and IDF.galleryref"); 
		return ImageDetailFragment.newInstance(position, galleryReference);        		
	}
}
 
開發者ID:museumsvictoria,項目名稱:mv-fieldguide-android,代碼行數:14,代碼來源:ImageDetailActivity.java

示例14: getFragment

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
public SherlockFragment getFragment(int position) {
	switch (position) {
	case 0:
		return new GuidesFragment();
	case 1:
		return new GuidesFragment();
	case 2:
		return new GuidesFragment();
	}
	return null;
}
 
開發者ID:raouldc,項目名稱:GTA-V-Companion,代碼行數:12,代碼來源:MainActivity.java

示例15: getItem

import com.actionbarsherlock.app.SherlockFragment; //導入依賴的package包/類
@Override
public SherlockFragment getItem(int position) {
	if (galleryReference == -1) {
		Log.d(TAG, "Setting IDF.id"); 
		return ImageDetailFragment.newInstance(position);
	} else {
		Log.d(TAG, "Setting IDF.id and IDF.galleryref"); 
		return ImageDetailFragment.newInstance(position, galleryReference);        		
	}
}
 
開發者ID:museumsvictoria,項目名稱:bunurong-fieldguide-Android,代碼行數:11,代碼來源:ImageDetailActivity.java


注:本文中的com.actionbarsherlock.app.SherlockFragment類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。