@@ -0,0 +1,2559 @@
+package com.souptitlemobile;%0A%0Aimport android.content.Context;%0Aimport android.view.View;%0A%0Aimport com.facebook.react.views.view.ReactViewGroup;%0Aimport com.facebook.react.uimanager.UIManagerModule;%0Aimport com.facebook.react.uimanager.events.EventDispatcher;%0Aimport com.facebook.react.uimanager.events.Event;%0Aimport com.facebook.react.uimanager.events.RCTEventEmitter;%0Aimport com.facebook.react.bridge.Arguments;%0Aimport com.facebook.react.bridge.ReactContext;%0Aimport com.facebook.react.bridge.WritableMap;%0A%0Apublic class TableViewItem extends ReactViewGroup %7B%0A    final EventDispatcher mEventDispatcher;%0A    private int mHeight;%0A%0A    public TableViewItem(Context context) %7B%0A        super(context);%0A        mEventDispatcher = ((ReactContext) getContext()).getNativeModule(UIManagerModule.class).getEventDispatcher();%0A    %7D%0A%0A    @Override%0A    protected void onMeasure(int widthSpec, int heightSpec) %7B%0A        int w = MeasureSpec.getSize(widthSpec);%0A        int h = mHeight;%0A        if (mHeight %3C 1 && getChildCount() %3E 0) %7B%0A            final View child = getChildAt(0);%0A            LayoutParams lp = child.getLayoutParams();%0A            if (lp == null) %7B%0A                lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT); // TODO: what is it LayoutParams???%0A            %7D%0A            int w1 = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.AT_MOST);%0A            int h1 = MeasureSpec.makeMeasureSpec(lp.hight, MeasureSpec.AT_MOST);%0A            child.measure(w1, h1);%0A            h = child.getHeight();%0A        %7D%0A        setMeasuredDimension(w, h);%0A    %7D%0A%0A    @Override%0A    public void requestLayout() %7B%0A        super.requestLayout();%0A        forceLayout();%0A    %7D%0A%0A    public void setHeight(int val) %7B%0A        if (mHeight != val) %7B%0A            mHeight = val;%0A            requestLayout();%0A        %7D%0A    %7D%0A%0A    public void setInnerRowId(int rowId) %7B%0A        mEventDispatcher.dispatchEvent(new UpdateViewEvent(getId(), rowId));%0A    %7D%0A%0A    private class UpdateViewEvent extends Event%3CUpdateViewEvent%3E%7B%0A        private final int mRowId;%0A%0A        private UpdateViewEvent(int viewTag, int rowId) %7B%0A            super(viewTag);%0A            mRowId = rowId;%0A        %7D%0A%0A        @Override%0A        public String getEventName() %7B%0A            return %22onUpdateView%22;%0A        %7D%0A%0A        @Override%0A        public dispatch(RCTEventEmitter eventEmitter) %7B%0A            WritableMap eventData = Arguments.createMap();%0A            eventData.putInt(%22rowId%22, mRowId);%0A            eventEmitter.receiveEvent(getViewTag(), getEventName(), eventData);%0A        %7D%0A    %7D%0A%7D%0A

Add TableViewItem