Java Code Examples for android.view.View.getMeasuredWidthAndState()

The following are Jave code examples for showing how to use getMeasuredWidthAndState() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: schulcloud-mobile-android   File: ListItemLayout.java   Source Code and License Vote up 6 votes
private int measureCombinedMainTextViewsWidthAndState(int maxWidth, int widthMode) {
    int combinedChildMeasuredStates = 0;
    int maxRequiredTextWidth = 0;

    for (int i = 0; i < mChildsMainText.length; i++) {
        View textView = mChildsMainText[i];
        if (!takesSpace(textView))
            continue;

        measureChild(textView, MeasureSpec.makeMeasureSpec(maxWidth, widthMode),
                mHeightMeasureSpecsMainText[i]);
        int measuredWidthAndState = textView.getMeasuredWidthAndState();

        combinedChildMeasuredStates = combineMeasuredStates(combinedChildMeasuredStates,
                measuredWidthAndState);
        maxRequiredTextWidth = Math.max(maxRequiredTextWidth,
                measuredWidthAndState & View.MEASURED_SIZE_MASK);
    }
    return (combinedChildMeasuredStates & View.MEASURED_STATE_MASK) | maxRequiredTextWidth;
}
 
Example 2
Project: letv   File: ViewCompatHC.java   Source Code and License Vote up 4 votes
public static int getMeasuredWidthAndState(View view) {
    return view.getMeasuredWidthAndState();
}
 
Example 3
Project: boohee_v5.6   File: ViewCompatHC.java   Source Code and License Vote up 4 votes
public static int getMeasuredWidthAndState(View view) {
    return view.getMeasuredWidthAndState();
}