core/src/main/java/org/hitogo/core/HitogoHelper.java
public void measureView(@NonNull Activity activity, @NonNull View customView,
                            @Nullable ViewGroup viewGroup) {
        int widthSpec;
        if (viewGroup != null) {
            widthSpec = View.MeasureSpec.makeMeasureSpec(viewGroup.getMeasuredWidth(), View.MeasureSpec.EXACTLY);
        } else {
            widthSpec = View.MeasureSpec.makeMeasureSpec(activity.getWindow().getDecorView().getMeasuredWidth(),
                    View.MeasureSpec.EXACTLY);
        }
        customView.measure(widthSpec, View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
    }
/**
     * Measures the width and height for the given View object.
     *
     * @param activity   activity which is used to measure the given View
     * @param customView View object that needs to be measured
     * @param viewGroup  ViewGroup which is used to measure the given View
     * @see ViewGroup
     * @see View
     * @see android.view.View.MeasureSpec
     * @since 1.0.0
     */
Measures the width and height for the given View object.
Measures the width and height for the given View object .
public void measureView(@NonNull Activity activity, @NonNull View customView,
                            @Nullable ViewGroup viewGroup) {
        int widthSpec;
        if (viewGroup != null) {
            widthSpec = View.MeasureSpec.makeMeasureSpec(viewGroup.getMeasuredWidth(), View.MeasureSpec.EXACTLY);
        } else {
            widthSpec = View.MeasureSpec.makeMeasureSpec(activity.getWindow().getDecorView().getMeasuredWidth(),
                    View.MeasureSpec.EXACTLY);
        }
        customView.measure(widthSpec, View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
    }
public void measureView ( @ NonNull Activity activity , @ NonNull View customView , @ Nullable ViewGroup viewGroup ) { int widthSpec ; if ( viewGroup != null ) { widthSpec = View . MeasureSpec . makeMeasureSpec ( viewGroup . getMeasuredWidth ( ) , View . MeasureSpec . EXACTLY ) ; } else { widthSpec = View . MeasureSpec . makeMeasureSpec ( activity . getWindow ( ) . getDecorView ( ) . getMeasuredWidth ( ) , View . MeasureSpec . EXACTLY ) ; } customView . measure ( widthSpec , View . MeasureSpec . makeMeasureSpec ( 0 , View . MeasureSpec . UNSPECIFIED ) ) ; }
Measures the width and height for the given View object.
Measures the width and height for the given View object .