public synchronized void remove(final Component comp) {
if(components == null){
return;
}
final int index = components.indexOf(comp);
if (index >= 0) {
components.remove(index);
comp.parent = null;
final ViewGroup layoutView = (ViewGroup)getContainerViewAdAPI();
final View subView = comp.getPeerAdAPI();
if(layoutView != null && subView != null){
ActivityManager.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
layoutView.removeView(subView);
}
});
}
{
final ContainerEvent event = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, comp);
final ContainerListener[] listener = list.getListeners(ContainerListener.class);
for (int i = 0; i < listener.length; i++) {
listener[i].componentRemoved(event);
}
}
}
if (layout != null) {
layout.removeLayoutComponent(comp);
}
}
Container.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:j2se_for_android
作者:
评论列表
文章目录