Search in sources :

Example 1 with ILVViewGroup

use of com.taobao.luaview.view.interfaces.ILVViewGroup in project LuaViewSDK by alibaba.

the class UDViewGroup method addView.

/**
     * add a subview
     *
     * @param subView
     * @return
     */
public UDViewGroup addView(UDView subView) {
    final ViewGroup viewGroup = getContainer();
    if (viewGroup != null && subView != null && subView.getView() != null) {
        final View view = subView.getView();
        LuaViewUtil.addView(viewGroup, view, null);
    //            if (viewGroup instanceof ILVViewGroup) {
    //                LuaViewUtil.addView(viewGroup, view, null);
    //            } else {
    //                final ViewGroup.LayoutParams layoutParams = LuaViewUtil.getOrCreateLayoutParams(view);
    //                viewGroup.addView(view, layoutParams);
    //            }
    }
    return this;
}
Also used : ViewGroup(android.view.ViewGroup) ILVViewGroup(com.taobao.luaview.view.interfaces.ILVViewGroup) View(android.view.View)

Aggregations

View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 ILVViewGroup (com.taobao.luaview.view.interfaces.ILVViewGroup)1