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


Java ViewGroup.removeAllViewsInLayout方法代码示例

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


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

示例1: populateViewForOrientation

import android.view.ViewGroup; //导入方法依赖的package包/类
/**
    * 
    * @param inflater
    * @param view
    */
private void populateViewForOrientation(LayoutInflater inflater, ViewGroup view) {
	int antennaResId = Integer.MIN_VALUE;
	if (antennaView != null && antennaView.getTag() != null) {
		antennaResId = (Integer) antennaView.getTag();
	}
	
	view.removeAllViewsInLayout();
       View v = inflater.inflate(R.layout.title_screen, view);
       
       createView(v, inflater, null);
       
       if (antennaResId != Integer.MIN_VALUE) {
       	antennaView.setImageResource(antennaResId);
       	antennaView.setVisibility(View.VISIBLE);
       }
       
       //restore all information now:
       infoCollector.refresh();
       infoCollector.dispatchInfoChangedEvent(InfoCollectorType.DL_TRAFFIC, null, TrafficClassificationEnum.classify(interfaceTrafficGatherer.getRxRate()));
       infoCollector.dispatchInfoChangedEvent(InfoCollectorType.UL_TRAFFIC, null, TrafficClassificationEnum.classify(interfaceTrafficGatherer.getTxRate()));
       
   	if (startButtonText != null) {
       	startButtonText.setText(ConfigHelper.isLoopMode(getActivity()) ? R.string.menu_button_loop : R.string.menu_button_start);
       }
}
 
开发者ID:rtr-nettest,项目名称:open-rmbt,代码行数:31,代码来源:RMBTMainMenuFragment.java

示例2: removeAllViews

import android.view.ViewGroup; //导入方法依赖的package包/类
/**
 * remove all views
 *
 * @param viewGroup
 */
public static void removeAllViews(ViewGroup viewGroup) {
    if (viewGroup != null) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
            if (viewGroup.isInLayout()) {
                viewGroup.removeAllViewsInLayout();
            } else {
                viewGroup.removeAllViews();
            }
        } else {
            viewGroup.removeAllViews();
        }
    }
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:19,代码来源:LuaViewUtil.java

示例3: onConfigurationChanged

import android.view.ViewGroup; //导入方法依赖的package包/类
@Override
public void onConfigurationChanged(final Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    ViewGroup viewGroup = (ViewGroup) getView();
    if (viewGroup != null) {
        viewGroup.removeAllViewsInLayout();
        View view = onCreateView(getActivity().getLayoutInflater(), viewGroup, null);
        viewGroup.addView(view);
    }
}
 
开发者ID:LingjuAI,项目名称:AssistantBySDK,代码行数:11,代码来源:TimePickerDialog.java

示例4: fixedStillAttached

import android.view.ViewGroup; //导入方法依赖的package包/类
private void fixedStillAttached() {
    // java.lang.Throwable: Error: WebView.destroy() called while still attached!
    // at android.webkit.WebViewClassic.destroy(WebViewClassic.java:4142)
    // at android.webkit.WebView.destroy(WebView.java:707)
    ViewParent parent = getParent();
    if (parent instanceof ViewGroup) { // 由于自定义webView构建时传入了该Activity的context对象,因此需要先从父容器中移除webView,然后再销毁webView;
        ViewGroup mWebViewContainer = (ViewGroup) getParent();
        mWebViewContainer.removeAllViewsInLayout();
    }
}
 
开发者ID:Justson,项目名称:AgentWeb,代码行数:11,代码来源:AgentWebView.java

示例5: onCreateView

import android.view.ViewGroup; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
		 ViewGroup container,  Bundle savedInstanceState) {
	ViewGroup p = (ViewGroup) content.getParent();
	if (p != null) {
		p.removeAllViewsInLayout();
	}
	return content;
}
 
开发者ID:ZouJianFeng-Marco,项目名称:Navigation-bar,代码行数:10,代码来源:BaseFragment.java

示例6: populateViewForOrientation

import android.view.ViewGroup; //导入方法依赖的package包/类
/**
    * 
    * @param inflater
    * @param view
    */
private void populateViewForOrientation(LayoutInflater inflater, ViewGroup view) {
	int page = getViewPager().getCurrentItem();
	view.removeAllViewsInLayout();
       View v = inflater.inflate(R.layout.result_tabhost_pager, view);
       createView(v, inflater, page);
}
 
开发者ID:rtr-nettest,项目名称:open-rmbt,代码行数:12,代码来源:RMBTResultPagerFragment.java

示例7: loadRealLayout

import android.view.ViewGroup; //导入方法依赖的package包/类
private boolean loadRealLayout() {
    ViewGroup root = (ViewGroup) getView();
    if (root != null) {
        root.removeAllViewsInLayout();
        View.inflate(root.getContext(), tabData.layoutId, root);
    }
    return root != null;
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:9,代码来源:MainTabFragment.java

示例8: populateViewForOrientation

import android.view.ViewGroup; //导入方法依赖的package包/类
/**
    * 
    * @param inflater
    * @param view
    */
private void populateViewForOrientation(LayoutInflater inflater, ViewGroup view) {
	view.removeAllViewsInLayout();
       View v = inflater.inflate(R.layout.about, view);
       createView(v, inflater);
}
 
开发者ID:rtr-nettest,项目名称:open-rmbt,代码行数:11,代码来源:RMBTAboutFragment.java

示例9: removeAllViews

import android.view.ViewGroup; //导入方法依赖的package包/类
@Override
public void removeAllViews(ViewGroup parent) {
  parent.removeAllViewsInLayout();
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:5,代码来源:FlatRootViewManager.java


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