/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
ViewMeasureSpecTest.java | 11 import android.view.View.MeasureSpec; 18 assertEquals(View.MeasureSpec.UNSPECIFIED, 19 MeasureSpec.getMode(MeasureSpec.makeMeasureSpec(512, View.MeasureSpec.UNSPECIFIED))); 20 assertEquals(View.MeasureSpec.EXACTLY, 21 MeasureSpec.getMode(MeasureSpec.makeMeasureSpec(600, View.MeasureSpec.EXACTLY))); 22 assertEquals(View.MeasureSpec.AT_MOST, [all...] |
/cts/tests/tests/view/src/android/view/cts/ |
View_MeasureSpecTest.java | 24 import android.view.View.MeasureSpec; 31 * Test {@link MeasureSpec}. 44 mUnspecifiedMeasureSpec = View.MeasureSpec.makeMeasureSpec(MEASURE_SPEC_SIZE, 45 View.MeasureSpec.UNSPECIFIED); 46 mExactlyMeasureSpec = View.MeasureSpec.makeMeasureSpec(MEASURE_SPEC_SIZE, 47 View.MeasureSpec.EXACTLY); 48 mAtMostMeasureSpec = View.MeasureSpec.makeMeasureSpec(MEASURE_SPEC_SIZE, 49 View.MeasureSpec.AT_MOST); 55 View.MeasureSpec.getSize(mUnspecifiedMeasureSpec)); 57 View.MeasureSpec.getSize(mExactlyMeasureSpec)) [all...] |
/frameworks/base/core/java/com/android/internal/widget/ |
PreferenceImageView.java | 47 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); 48 if (widthMode == MeasureSpec.AT_MOST || widthMode == MeasureSpec.UNSPECIFIED) { 49 final int widthSize = MeasureSpec.getSize(widthMeasureSpec); 52 && (maxWidth < widthSize || widthMode == MeasureSpec.UNSPECIFIED)) { 53 widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST); 57 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); 58 if (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED) [all...] |
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/ |
PreferenceImageView.java | 47 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); 48 if (widthMode == MeasureSpec.AT_MOST || widthMode == MeasureSpec.UNSPECIFIED) { 49 final int widthSize = MeasureSpec.getSize(widthMeasureSpec); 52 && (maxWidth < widthSize || widthMode == MeasureSpec.UNSPECIFIED)) { 53 widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST); 57 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); 58 if (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED) [all...] |
ManualLayoutFrame.java | 40 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); 42 case MeasureSpec.AT_MOST: { 43 newWidth = Math.min(mWidth, MeasureSpec.getSize(widthMeasureSpec)); 45 case MeasureSpec.EXACTLY: { 46 newWidth = MeasureSpec.getSize(widthMeasureSpec); 52 widthMeasureSpec = MeasureSpec.makeMeasureSpec(mWidth, MeasureSpec.EXACTLY);
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
FullHeightLinearLayout.java | 45 if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) { 46 heightMeasureSpec = MeasureSpec.makeMeasureSpec( 47 MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.EXACTLY);
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
SquareImageView.java | 40 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 41 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 42 if (widthMode == MeasureSpec.EXACTLY && heightMode != MeasureSpec.EXACTLY) { 43 int width = MeasureSpec.getSize(widthMeasureSpec); 45 if (heightMode == MeasureSpec.AT_MOST) { 46 height = Math.min(height, MeasureSpec.getSize(heightMeasureSpec));
|
/packages/apps/LegacyCamera/src/com/android/camera/ui/ |
ControlPanelLayout.java | 41 int widthSpecSize = MeasureSpec.getSize(widthSpec); 42 int heightSpecSize = MeasureSpec.getSize(heightSpec); 50 mode = MeasureSpec.getMode(widthSpec); 55 mode = MeasureSpec.getMode(heightSpec); 61 if (widthSpecSize > 0 && heightSpecSize > 0 && mode == MeasureSpec.AT_MOST) { 76 if (mode == MeasureSpec.AT_MOST && measuredSize > specSize) { 81 widthSpec = MeasureSpec.makeMeasureSpec(measuredSize, MeasureSpec.EXACTLY); 83 heightSpec = MeasureSpec.makeMeasureSpec(measuredSize, MeasureSpec.EXACTLY) [all...] |
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/ |
FillContentLayoutTest.java | 23 import android.view.View.MeasureSpec; 45 MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), 46 MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); 63 MeasureSpec.makeMeasureSpec(300, MeasureSpec.EXACTLY), 64 MeasureSpec.makeMeasureSpec(300, MeasureSpec.EXACTLY)); 81 MeasureSpec.makeMeasureSpec(88, MeasureSpec.EXACTLY) [all...] |
/developers/build/prebuilts/gradle/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
FixedAspectSurfaceView.java | 85 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 86 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 87 int width = MeasureSpec.getSize(widthMeasureSpec); 88 int height = MeasureSpec.getSize(heightMeasureSpec); 100 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { 102 } else if (widthMode == MeasureSpec.EXACTLY) { 105 } else if (heightMode == MeasureSpec.EXACTLY) { 108 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) [all...] |
/developers/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
FixedAspectSurfaceView.java | 85 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 86 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 87 int width = MeasureSpec.getSize(widthMeasureSpec); 88 int height = MeasureSpec.getSize(heightMeasureSpec); 100 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { 102 } else if (widthMode == MeasureSpec.EXACTLY) { 105 } else if (heightMode == MeasureSpec.EXACTLY) { 108 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) [all...] |
/pdk/apps/TestingCamera2/src/com/android/testingcamera2/ |
FixedAspectSurfaceView.java | 74 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 75 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 76 int width = MeasureSpec.getSize(widthMeasureSpec); 77 int height = MeasureSpec.getSize(heightMeasureSpec); 88 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { 90 } else if (widthMode == MeasureSpec.EXACTLY) { 93 } else if (heightMode == MeasureSpec.EXACTLY) { 96 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
AspectRatioFrameLayoutTest.java | 47 int widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.EXACTLY); 48 int heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(50, View.MeasureSpec.EXACTLY); 60 int widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(50, View.MeasureSpec.EXACTLY); 61 int heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.EXACTLY); 73 int widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.EXACTLY) [all...] |
RingProgressBarTest.java | 22 import android.view.View.MeasureSpec; 48 MeasureSpec.makeMeasureSpec(100, MeasureSpec.EXACTLY), 49 MeasureSpec.makeMeasureSpec(200, MeasureSpec.EXACTLY)); 57 MeasureSpec.makeMeasureSpec(200, MeasureSpec.EXACTLY), 58 MeasureSpec.makeMeasureSpec(100, MeasureSpec.EXACTLY));
|
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/ |
ShadowOverlayContainerTest.java | 25 import android.view.View.MeasureSpec; 55 frameLayout.measure(MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY), 56 MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY)); 67 frameLayout.measure(MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY), 68 MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY)); 86 frameLayout.measure(MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY) [all...] |
/frameworks/base/tests/WindowAnimationJank/src/android/windowanimationjank/ |
FlowLayout.java | 38 MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() -getPaddingRight(); 40 MeasureSpec.getSize(heightMeasureSpec) - getPaddingTop() - getPaddingBottom(); 48 if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.AT_MOST) { 49 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST); 51 childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); 57 child.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST) [all...] |
/frameworks/support/preference/src/main/java/androidx/preference/internal/ |
PreferenceImageView.java | 91 final int widthMode = MeasureSpec.getMode(widthMeasureSpec); 92 if (widthMode == MeasureSpec.AT_MOST || widthMode == MeasureSpec.UNSPECIFIED) { 93 final int widthSize = MeasureSpec.getSize(widthMeasureSpec); 96 && (maxWidth < widthSize || widthMode == MeasureSpec.UNSPECIFIED)) { 97 widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST); 101 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); 102 if (heightMode == MeasureSpec.AT_MOST || heightMode == MeasureSpec.UNSPECIFIED) [all...] |
/external/webrtc/talk/app/webrtc/androidtests/src/org/webrtc/ |
SurfaceViewRendererOnMeasureTest.java | 33 import android.view.View.MeasureSpec; 49 * List with MeasureSpec modes. 52 Arrays.asList(MeasureSpec.EXACTLY, MeasureSpec.AT_MOST); 81 + MeasureSpec.toString(widthSpec) + ", " + MeasureSpec.toString(heightSpec) + ")" 101 final int zeroMeasureSize = MeasureSpec.makeMeasureSpec(0, measureSpecMode); 106 MeasureSpec.makeMeasureSpec(1280, measureSpecMode), 107 MeasureSpec.makeMeasureSpec(720, measureSpecMode)); 115 final int zeroMeasureSize = MeasureSpec.makeMeasureSpec(0, measureSpecMode) [all...] |
/development/samples/browseable/HdrViewfinder/src/com.example.android.hdrviewfinder/ |
FixedAspectSurfaceView.java | 87 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 88 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 89 int width = MeasureSpec.getSize(widthMeasureSpec); 90 int height = MeasureSpec.getSize(heightMeasureSpec); 101 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { 103 } else if (widthMode == MeasureSpec.EXACTLY) { 106 } else if (heightMode == MeasureSpec.EXACTLY) { 109 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) [all...] |
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/ |
FixedAspectSurfaceView.java | 88 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 89 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 90 int width = MeasureSpec.getSize(widthMeasureSpec); 91 int height = MeasureSpec.getSize(heightMeasureSpec); 102 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { 104 } else if (widthMode == MeasureSpec.EXACTLY) { 107 } else if (heightMode == MeasureSpec.EXACTLY) { 110 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) [all...] |
/frameworks/rs/tests/java_api/RsCameraDemo/src/com/android/example/rscamera/ |
FixedAspectSurfaceView.java | 88 int widthMode = MeasureSpec.getMode(widthMeasureSpec); 89 int heightMode = MeasureSpec.getMode(heightMeasureSpec); 90 int width = MeasureSpec.getSize(widthMeasureSpec); 91 int height = MeasureSpec.getSize(heightMeasureSpec); 102 if (widthMode == MeasureSpec.EXACTLY && heightMode == MeasureSpec.EXACTLY) { 104 } else if (widthMode == MeasureSpec.EXACTLY) { 107 } else if (heightMode == MeasureSpec.EXACTLY) { 110 } else if (widthMode == MeasureSpec.AT_MOST && heightMode == MeasureSpec.AT_MOST) [all...] |
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowViewMeasureSpec.java | 9 * Shadow for {@code View.MeasureSpec} inner class. 13 @Implements(View.MeasureSpec.class) 20 public static int getMode (int measureSpec) { 21 return (measureSpec & MODE_MASK); 25 public static int getSize (int measureSpec) { 26 return (measureSpec & ~MODE_MASK); 35 public static String toString (int measureSpec) { 36 int mode = getMode(measureSpec); 37 int size = getSize(measureSpec); 39 StringBuilder sb = new StringBuilder("MeasureSpec: ") [all...] |
/packages/apps/Calendar/src/com/android/calendar/recurrencepicker/ |
WeekButton.java | 50 if (View.MeasureSpec.getMode(getMeasuredHeightAndState()) != MeasureSpec.EXACTLY) { 54 if (View.MeasureSpec.getMode(getMeasuredWidthAndState()) != MeasureSpec.EXACTLY) {
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
AutoResizeListView.java | 48 final int heightMode = MeasureSpec.getMode(heightMeasureSpec); 49 final int heightSize = MeasureSpec.getSize(heightMeasureSpec); 53 if (heightMode == MeasureSpec.EXACTLY) { 61 heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, heightMode);
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
LabelView.java | 127 * @param measureSpec A measureSpec packed into an int 128 * @return The width of the view, honoring constraints from measureSpec 130 private int measureWidth(int measureSpec) { 132 int specMode = MeasureSpec.getMode(measureSpec); 133 int specSize = MeasureSpec.getSize(measureSpec); 135 if (specMode == MeasureSpec.EXACTLY) { 142 if (specMode == MeasureSpec.AT_MOST) [all...] |