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


Java Fragment.isVisible方法代码示例

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


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

示例1: displayContact

import android.app.Fragment; //导入方法依赖的package包/类
public void displayContact(LinphoneContact contact, boolean chatOnly) {
	Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
	if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.CONTACT_DETAIL) {
		ContactDetailsFragment contactFragment = (ContactDetailsFragment) fragment2;
		contactFragment.changeDisplayedContact(contact);
	} else {
		Bundle extras = new Bundle();
		extras.putSerializable("Contact", contact);
		extras.putBoolean("ChatAddressOnly", chatOnly);
		changeCurrentFragment(FragmentsAvailable.CONTACT_DETAIL, extras);
	}
}
 
开发者ID:treasure-lau,项目名称:Linphone4Android,代码行数:13,代码来源:LinphoneActivity.java

示例2: onGoalAchieved

import android.app.Fragment; //导入方法依赖的package包/类
@Override
public void onGoalAchieved(DCGoal goal) {
    Fragment fragment = getFragmentManager().findFragmentByTag(DCMessageFragment.TAG);
    if (routine != null || (fragment != null && fragment.isVisible())) {
        return;
    }

    DCGoalDialogFragment goalFragment = new DCGoalDialogFragment();
    Bundle arguments = new Bundle();
    arguments.putSerializable(DCGoalDialogFragment.KEY_GOAL, goal);
    goalFragment.setArguments(arguments);
    goalFragment.show(getFragmentManager(), DCGoalDialogFragment.TAG);
    hideTutorials();
}
 
开发者ID:Dentacoin,项目名称:aftercare-app-android,代码行数:15,代码来源:DCDashboardActivity.java

示例3: displayHistoryDetail

import android.app.Fragment; //导入方法依赖的package包/类
public void displayHistoryDetail(String sipUri, LinphoneCallLog log) {
	LinphoneAddress lAddress;
	try {
		lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
	} catch (LinphoneCoreException e) {
		Log.e("Cannot display history details",e);
		//TODO display error message
		return;
	}
	LinphoneContact c = ContactsManager.getInstance().findContactFromAddress(lAddress);

	String displayName = c != null ? c.getFullName() : LinphoneUtils.getAddressDisplayName(sipUri);
	String pictureUri = c != null && c.getPhotoUri() != null ? c.getPhotoUri().toString() : null;

	String status;
	if (log.getDirection() == CallDirection.Outgoing) {
		status = getString(R.string.outgoing);
	} else {
		if (log.getStatus() == CallStatus.Missed) {
			status = getString(R.string.missed);
		} else {
			status = getString(R.string.incoming);
		}
	}

	String callTime = secondsToDisplayableString(log.getCallDuration());
	String callDate = String.valueOf(log.getTimestamp());

	Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
	if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.HISTORY_DETAIL) {
		HistoryDetailFragment historyDetailFragment = (HistoryDetailFragment) fragment2;
		historyDetailFragment.changeDisplayedHistory(lAddress.asStringUriOnly(), displayName, pictureUri, status, callTime, callDate);
	} else {
		Bundle extras = new Bundle();
		extras.putString("SipUri", lAddress.asString());
		if (displayName != null) {
			extras.putString("DisplayName", displayName);
			extras.putString("PictureUri", pictureUri);
		}
		extras.putString("CallStatus", status);
		extras.putString("CallTime", callTime);
		extras.putString("CallDate", callDate);

		changeCurrentFragment(FragmentsAvailable.HISTORY_DETAIL, extras);
	}
}
 
开发者ID:treasure-lau,项目名称:Linphone4Android,代码行数:47,代码来源:LinphoneActivity.java


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