當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。