create changelog entry
[debian/openrocket] / android-libraries / ActionBarSherlock / src / com / actionbarsherlock / internal / widget / IcsView.java
1 package com.actionbarsherlock.internal.widget;
2
3 import android.view.View;
4
5 final class IcsView {
6     //No instances
7     private IcsView() {}
8
9     /**
10      * Return only the state bits of {@link #getMeasuredWidthAndState()}
11      * and {@link #getMeasuredHeightAndState()}, combined into one integer.
12      * The width component is in the regular bits {@link #MEASURED_STATE_MASK}
13      * and the height component is at the shifted bits
14      * {@link #MEASURED_HEIGHT_STATE_SHIFT}>>{@link #MEASURED_STATE_MASK}.
15      */
16     public static int getMeasuredStateInt(View child) {
17         return (child.getMeasuredWidth()&View.MEASURED_STATE_MASK)
18                 | ((child.getMeasuredHeight()>>View.MEASURED_HEIGHT_STATE_SHIFT)
19                         & (View.MEASURED_STATE_MASK>>View.MEASURED_HEIGHT_STATE_SHIFT));
20     }
21 }