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


Java FrameLayout.removeView方法代码示例

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


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

示例1: onFragmentDestroy

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void onFragmentDestroy() {
    super.onFragmentDestroy();
    NotificationCenter.getInstance().removeObserver(this, NotificationCenter.cameraInitied);
    if (!deviceHasGoodCamera || cameraView == null) {
        return;
    }
    if (cameraAnimationInProgress) {
        return;
    }
    if (cameraOpened) {
        closeCamera(true);
    }
    hideCamera(true);
    if (cameraView != null) {
        cameraView.destroy(true, null);
        FrameLayout frameLayout = (FrameLayout) fragmentView;
        frameLayout.removeView(cameraView);
        cameraView = null;
    }
    fragmentView = null;
    if (mBaseDialog != null)
        mBaseDialog.dismiss();
    mBaseDialog = null;
}
 
开发者ID:chengzichen,项目名称:KrGallery,代码行数:26,代码来源:CameraActivity.java

示例2: onHideCustomView

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void onHideCustomView() {
	if (mCustomView == null || mCustomViewCallback == null || getCurrentWebView() == null) {
		return;
	}
	Log.d(Constants.TAG, "onHideCustomView");
	getCurrentWebView().setVisibility(View.VISIBLE);
	try {
		mCustomView.setKeepScreenOn(false);
	} catch (SecurityException e) {
		Log.e(Constants.TAG, "WebView is not allowed to keep the screen on");
	}
	setFullscreen(mPreferences.getHideStatusBarEnabled());
	FrameLayout decor = (FrameLayout) getWindow().getDecorView();
	if (decor != null) {
		decor.removeView(mFullscreenContainer);
	}

	if (API < 19) {
		try {
			mCustomViewCallback.onCustomViewHidden();
		} catch (Throwable ignored) {

		}
	}
	mFullscreenContainer = null;
	mCustomView = null;
	if (mVideoView != null) {
		mVideoView.setOnErrorListener(null);
		mVideoView.setOnCompletionListener(null);
		mVideoView = null;
	}
	setRequestedOrientation(mOriginalOrientation);
}
 
开发者ID:NewCasino,项目名称:browser,代码行数:35,代码来源:BrowserActivity.java

示例3: setContentView

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void setContentView(int layoutId)
{
    FrameLayout tempLayout = new FrameLayout(getContext());
    View view = LayoutInflater.from(getContext()).inflate(layoutId, tempLayout, false);
    tempLayout.removeView(view);

    setDialogView(view, view.getLayoutParams());
}
 
开发者ID:zj565061763,项目名称:dialog,代码行数:10,代码来源:FDialog.java

示例4: hideCamera

import android.widget.FrameLayout; //导入方法依赖的package包/类
public void hideCamera(boolean async) {
    if (!deviceHasGoodCamera || cameraView == null) {
        return;
    }
    cameraView.destroy(async, null);
    FrameLayout frameLayout = (FrameLayout) fragmentView;
    frameLayout.removeView(cameraView);
    cameraView = null;
    cameraOpened = false;
}
 
开发者ID:chengzichen,项目名称:KrGallery,代码行数:11,代码来源:CameraActivity.java

示例5: removeFromTab

import android.widget.FrameLayout; //导入方法依赖的package包/类
void removeFromTab(BottomBarTab tab) {
    FrameLayout badgeAndTabContainer = (FrameLayout) getParent();
    ViewGroup originalTabContainer = (ViewGroup) badgeAndTabContainer.getParent();

    badgeAndTabContainer.removeView(tab);
    originalTabContainer.removeView(badgeAndTabContainer);
    originalTabContainer.addView(tab, tab.getIndexInTabContainer());
}
 
开发者ID:A-Miracle,项目名称:QiangHongBao,代码行数:9,代码来源:BottomBarBadge.java

示例6: create

import android.widget.FrameLayout; //导入方法依赖的package包/类
public void create(float winX, float winY,FrameLayout field, ArrayList<CharaView> charaViews,CharaView chara, int walkSec) {
    try {
        if (charaViews.size() >= MAX_CHARA) {
            //Toast.makeText(field.getContext(), "同時に呼び出せるのは"+ MAX_CHARA +"人までです",Toast.LENGTH_SHORT).show();
            field.removeView(charaViews.get(0));
            charaViews.remove(0);
            return;
        }
        mWindowSizeX = winX;
        mWindowSizeY = winY;
        charaViews.add(chara);
        CharaView c = charaViews.get(charaViews.size() - 1);
        field.addView(c);
        int r = (int) (Math.random() * 3);
        switch (r) {
            case 0:
            case 1:
            case 2:
                c.randomAnimation(MainActivity.walkSec);
                break;
        }
        PropertyValuesHolder holderX = PropertyValuesHolder.ofFloat("translationX", 0, 0);
        PropertyValuesHolder holderY = PropertyValuesHolder.ofFloat("translationY", 0, winY * 0.7f);
        PropertyValuesHolder holderRotaion = PropertyValuesHolder.ofFloat("rotation", 0, 0);
        c.setXY(0, winY * 0.7f);

        // targetに対してholderX, holderY, holderRotationを同時に実行させます
        ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(c, holderX, holderY, holderRotaion);
        objectAnimator.setDuration(MainActivity.walkSec);
        objectAnimator.start();
        //button.setText("納沙幸子 * " + charaViews.size());
    } catch (OutOfMemoryError e){
        Toast.makeText(field.getContext(), "メモリがいっぱいです : " + charaViews.size() + "人",Toast.LENGTH_SHORT).show();
    }
}
 
开发者ID:ShitamatsugeFactory,项目名称:KokoWalk,代码行数:36,代码来源:CharaView.java

示例7: removeVrViews

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void removeVrViews() {
    mActivity.setUIVisibilityForVR(View.VISIBLE);
    FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
    decor.removeView(mVrShell.getContainer());
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:6,代码来源:VrShellDelegate.java

示例8: disAttach

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
 * 从某个Activity移除
 *
 * @param activity
 */
public void disAttach(Activity activity) {
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    decor.removeView(this);
    mIsShowing = false;
}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:11,代码来源:FloatView.java


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