当前位置: 首页>>代码示例>>Java>>正文


Java FragmentTransaction.setTransition方法代码示例

本文整理汇总了Java中android.app.FragmentTransaction.setTransition方法的典型用法代码示例。如果您正苦于以下问题:Java FragmentTransaction.setTransition方法的具体用法?Java FragmentTransaction.setTransition怎么用?Java FragmentTransaction.setTransition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.app.FragmentTransaction的用法示例。


在下文中一共展示了FragmentTransaction.setTransition方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toggleCallControlFragmentVisibility

import android.app.FragmentTransaction; //导入方法依赖的package包/类
private void toggleCallControlFragmentVisibility() {
  if (!iceConnected || !callFragment.isAdded()) {
    return;
  }
  // Show/hide call control fragment
  callControlFragmentVisible = !callControlFragmentVisible;
  FragmentTransaction ft = getFragmentManager().beginTransaction();
  if (callControlFragmentVisible) {
    ft.show(callFragment);
    ft.show(hudFragment);
  } else {
    ft.hide(callFragment);
    ft.hide(hudFragment);
  }
  ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
  ft.commit();
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:18,代码来源:CallActivity.java

示例2: toggleCallControlFragmentVisibility

import android.app.FragmentTransaction; //导入方法依赖的package包/类
private void toggleCallControlFragmentVisibility() {
    if (!iceConnected || !callFragment.isAdded()) {
        return;
    }
    // Show/hide call control fragment
    callControlFragmentVisible = !callControlFragmentVisible;
    FragmentTransaction ft = getFragmentManager().beginTransaction();
    if (callControlFragmentVisible) {
        ft.show(callFragment);
        ft.show(hudFragment);
    } else {
        ft.hide(callFragment);
        ft.hide(hudFragment);
    }
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
    ft.commit();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:18,代码来源:CallActivity.java

示例3: onGoalDetailsDownloaded

import android.app.FragmentTransaction; //导入方法依赖的package包/类
private void onGoalDetailsDownloaded(String dataString, GoalItem goalItem) {
    goalDetailProgressDialog.dismiss();
    Bundle bundle = new Bundle();
    bundle.putString(GOAL_ITEM_KEY, new Gson().toJson(goalItem, GoalItem.class));
    bundle.putString(GOAL_DATA_KEY, dataString);

    GoalsDetailFragment fragment = new GoalsDetailFragment();
    fragment.setOnDeleteListener(this);
    fragment.setArguments(bundle);

    if (isLargeDevice) {
        fragment.show(getActivity().getFragmentManager(), GD_TAG);
    } else {
        FragmentTransaction fragmentTransaction = getActivity().getFragmentManager().beginTransaction();
        fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
        fragmentTransaction.add(android.R.id.content, fragment).addToBackStack(null).commit();
    }
}
 
开发者ID:Protino,项目名称:CodeWatch,代码行数:19,代码来源:GoalsFragment.java

示例4: clearFragment

import android.app.FragmentTransaction; //导入方法依赖的package包/类
/**
 * Metodo statico per eliminare il fragment, quando non sono disponibili parcheggi
 */
public static void clearFragment(MainActivity activity) {
    if(activity.getFragmentAttivo() != null) {
        // inizializza la fragmentTransaction per l'eliminazione
        ParcheggiFragment fragAttivo = activity.getFragmentAttivo();
        FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
        ft.remove(fragAttivo);
        ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
        ft.commit();

        // elimina il riferimento al fragment in MainActivity
        activity.setFragmentAttivo(null);
    }
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidApp,代码行数:17,代码来源:ParcheggiFragment.java

示例5: reloadFragment

import android.app.FragmentTransaction; //导入方法依赖的package包/类
public static void reloadFragment(FragmentManager fragmentManager, Fragment fragment, int containViewId) {
	if (fragment != null){
		FragmentTransaction ft = fragmentManager.beginTransaction();
		ft.setTransition(-1);
//		ft.replace(containViewId, fragment);
		ft.detach(fragment);
		ft.attach(fragment);
		ft.commitAllowingStateLoss();
	}
}
 
开发者ID:WowWeeLabs,项目名称:CHIP-Android-SDK,代码行数:11,代码来源:FragmentHelper.java

示例6: closeFragment

import android.app.FragmentTransaction; //导入方法依赖的package包/类
private void closeFragment() {
    FragmentManager fm = getFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    ft.remove(fragment);
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE);
    ft.commit();
    addParticipantContainer.setVisibility(View.GONE);
    isFragmentOpen = false;
}
 
开发者ID:StringflowServer,项目名称:Beach-Android,代码行数:10,代码来源:GroupDetailsActivity.java

示例7: onPreferenceTreeClick

import android.app.FragmentTransaction; //导入方法依赖的package包/类
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
    final String key = preference.getKey();
    switch (key) {
        case KEY_CHECK_UPDATE:
            mTask = CheckUpdateTask.getInstance(false);
            if (!mTask.getStatus().equals(AsyncTask.Status.RUNNING)) {
                mTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, getActivity());
            }
            return true;
        case KEY_CHANGELOG:
            ChangelogFragment changelogFrag = new ChangelogFragment();
            FragmentTransaction transaction = getFragmentManager().beginTransaction();
            transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
            transaction.replace(this.getId(), changelogFrag);
            transaction.addToBackStack(this.getClass().getName());
            transaction.commit();
            return true;
        default:
            OTALink link = LinkConfig.getInstance().findLink(key, getActivity());
            if (link != null) {
                OTAUtils.launchUrl(link.getUrl(), getActivity());
            }
            break;
    }
    return super.onPreferenceTreeClick(preferenceScreen, preference);
}
 
开发者ID:DroidThug,项目名称:VulcanOTA,代码行数:28,代码来源:SlimOTAFragment.java

示例8: newInstance

import android.app.FragmentTransaction; //导入方法依赖的package包/类
/**
 * Metodo statico per instanziare più facilmente il fragment quando necessario
 */
public static void newInstance(MainActivity activity) {
    // inizializza la FragmentTransaction
    ParcheggiFragment newFragment = new ParcheggiFragment();
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    ft.replace(R.id.fragment_parcheggi_container, newFragment, "indirizzoParcheggio");
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
    ft.commit();

    // imposta un riferimento al fragment in MainActivity
    activity.setFragmentAttivo(newFragment);
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidApp,代码行数:15,代码来源:ParcheggiFragment.java


注:本文中的android.app.FragmentTransaction.setTransition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。