本文整理汇总了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;
}
示例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);
}
示例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());
}
示例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;
}
示例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());
}
示例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();
}
}
示例7: removeVrViews
import android.widget.FrameLayout; //导入方法依赖的package包/类
private void removeVrViews() {
mActivity.setUIVisibilityForVR(View.VISIBLE);
FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
decor.removeView(mVrShell.getContainer());
}
示例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;
}