@Override public void setChildHeight(AndroidViewComponent component, int height) { if (orientation == ComponentConstants.LAYOUT_ORIENTATION_HORIZONTAL) { ViewUtil.setChildHeightForHorizontalLayout(component.getView(), height); } else { ViewUtil.setChildHeightForVerticalLayout(component.getView(), height); } }
@Override public void remove(AndroidViewComponent component) { if (resourceId != -1) { ((android.widget.ScrollView) ((Form) context).findViewById(resourceId)) .removeView(component.getView()); } else { layoutManager.removeView(component.getView()); } }
public void add(AndroidViewComponent component) { if (resourceId != -1) { ((android.widget.ScrollView) ((Form) context).findViewById(resourceId)) .addView( component.getView(), new android.widget.LinearLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 0f)); } else { layoutManager.addView( component.getView(), new android.widget.LinearLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, // width ViewGroup.LayoutParams.WRAP_CONTENT, // height 0f)); // weight } }
@Override public void setChildHeight(AndroidViewComponent component, int height) { // A form is a vertical layout. ViewUtil.setChildHeightForVerticalLayout(component.getView(), height); }
@Override public void setChildWidth(AndroidViewComponent component, int width) { // A form is a vertical layout. ViewUtil.setChildWidthForVerticalLayout(component.getView(), width); }