Java Code Examples for android.view.ViewGroup#removeAllViewsInLayout()

The following examples show how to use android.view.ViewGroup#removeAllViewsInLayout() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RMBTMainMenuFragment.java    From open-rmbt with Apache License 2.0 6 votes vote down vote up
/**
    * 
    * @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);
       }
}
 
Example 2
Source File: AudioFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 3
Source File: ImageFileFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 4
Source File: DocumentFileFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 5
Source File: VideoFileFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 6
Source File: OtherFileFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 7
Source File: MessageNotReadFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 8
Source File: ImageFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 9
Source File: ConversationListFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 10
Source File: TimePickerDialog.java    From MaterialDateTimePicker with Apache License 2.0 5 votes vote down vote up
@Override
public void onConfigurationChanged(final Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    ViewGroup viewGroup = (ViewGroup) getView();
    if (viewGroup != null) {
        viewGroup.removeAllViewsInLayout();
        View view = onCreateView(requireActivity().getLayoutInflater(), viewGroup, null);
        viewGroup.addView(view);
    }
}
 
Example 11
Source File: VideoFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 12
Source File: ContactsFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 13
Source File: OtherFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 14
Source File: DocumentFragment.java    From o2oa with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    ViewGroup p = (ViewGroup) mRootView.getParent();
    if (p != null) {
        p.removeAllViewsInLayout();
    }
    return mRootView;
}
 
Example 15
Source File: RMBTResultPagerFragment.java    From open-rmbt with Apache License 2.0 5 votes vote down vote up
/**
    * 
    * @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);
}
 
Example 16
Source File: DatePickerDialog.java    From date_picker_converter with Apache License 2.0 5 votes vote down vote up
@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);
    }
}
 
Example 17
Source File: DatePickerDialog.java    From AssistantBySDK with Apache License 2.0 5 votes vote down vote up
@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);
    }
}
 
Example 18
Source File: TimePickerDialog.java    From Blackbulb with GNU General Public License v3.0 5 votes vote down vote up
@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);
    }
}
 
Example 19
Source File: TimePickerDialog.java    From date_picker_converter with Apache License 2.0 5 votes vote down vote up
@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);
    }
}
 
Example 20
Source File: RMBTAboutFragment.java    From open-rmbt with Apache License 2.0 4 votes vote down vote up
/**
    * 
    * @param inflater
    * @param view
    */
private void populateViewForOrientation(LayoutInflater inflater, ViewGroup view) {
	view.removeAllViewsInLayout();
       View v = inflater.inflate(R.layout.about, view);
       createView(v, inflater);
}