Java Code Examples for android.view.View.MEASURED_HEIGHT_STATE_SHIFT

The following are Jave code examples for showing how to use MEASURED_HEIGHT_STATE_SHIFT 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.
+ Save this method
Example 1
Project: CSipSimple   File: IcsView.java   View Source Code Vote up 2 votes
/**
 * Return only the state bits of {@link #getMeasuredWidthAndState()}
 * and {@link #getMeasuredHeightAndState()}, combined into one integer.
 * The width component is in the regular bits {@link #MEASURED_STATE_MASK}
 * and the height component is at the shifted bits
 * {@link #MEASURED_HEIGHT_STATE_SHIFT}>>{@link #MEASURED_STATE_MASK}.
 */
public static int getMeasuredStateInt(View child) {
    return (child.getMeasuredWidth()&View.MEASURED_STATE_MASK)
            | ((child.getMeasuredHeight()>>View.MEASURED_HEIGHT_STATE_SHIFT)
                    & (View.MEASURED_STATE_MASK>>View.MEASURED_HEIGHT_STATE_SHIFT));
}