/** * To get a helper for a view in relative layout * The view in the factory should HAS NO default layout param, usually instantiated programmatically * * @param width mostly the {@link ViewGroup.LayoutParams#WRAP_CONTENT} or {@link ViewGroup.LayoutParams#MATCH_PARENT} * @param height mostly the {@link ViewGroup.LayoutParams#WRAP_CONTENT} or {@link ViewGroup.LayoutParams#MATCH_PARENT} * @return helper to layout isInRelative layout */ public RelativeLayoutStick isInRelative(int width, int height){ return (RelativeLayoutStick) isInLayout(RelativeLayout.LayoutParams.class, false, width, height); }
/** * To get a helper for a view in relative layout * The view in the factory should HAS default layout param, usually inflated from xml * * @return helper to layout isInRelative layout */ public RelativeLayoutStick isInRelative() { return (RelativeLayoutStick) isInLayout(RelativeLayout.LayoutParams.class, true, 0, 0); }
public LinearLayoutStick isInLinear(){ return (LinearLayoutStick) isInLayout(LinearLayout.LayoutParams.class, true, 0, 0); }
public LinearLayoutStick isInLinear(int width, int height){ return (LinearLayoutStick) isInLayout(LinearLayout.LayoutParams.class, false, width, height); }