Loading packages/SystemUI/res/layout/long_screenshot.xml +5 −5 Original line number Diff line number Diff line Loading @@ -48,10 +48,10 @@ <ImageView android:id="@+id/preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="0px" android:layout_height="0px" android:layout_marginBottom="42dp" android:layout_marginHorizontal="48dp" android:paddingHorizontal="48dp" app:layout_constrainedHeight="true" app:layout_constrainedWidth="true" app:layout_constraintTop_toBottomOf="@id/save" Loading @@ -64,8 +64,8 @@ <com.android.systemui.screenshot.CropView android:id="@+id/crop_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="0px" android:layout_height="0px" android:layout_marginBottom="42dp" app:layout_constrainedHeight="true" app:layout_constrainedWidth="true" Loading packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +4 −2 Original line number Diff line number Diff line Loading @@ -409,7 +409,9 @@ public class LongScreenshotActivity extends Activity { } Rect bounds = drawable.getBounds(); float imageRatio = bounds.width() / (float) bounds.height(); float viewRatio = mPreview.getWidth() / (float) mPreview.getHeight(); int previewWidth = mPreview.getWidth() - mPreview.getPaddingLeft() - mPreview.getPaddingRight(); float viewRatio = previewWidth / (float) mPreview.getHeight(); if (imageRatio > viewRatio) { // Image is full width and height is constrained, compute extra padding to inform Loading @@ -417,7 +419,7 @@ public class LongScreenshotActivity extends Activity { float imageHeight = mPreview.getHeight() * viewRatio / imageRatio; int extraPadding = (int) (mPreview.getHeight() - imageHeight) / 2; mCropView.setExtraPadding(extraPadding, extraPadding); mCropView.setImageWidth(mPreview.getWidth()); mCropView.setImageWidth(previewWidth); } else { // Image is full height mCropView.setExtraPadding(0, 0); Loading Loading
packages/SystemUI/res/layout/long_screenshot.xml +5 −5 Original line number Diff line number Diff line Loading @@ -48,10 +48,10 @@ <ImageView android:id="@+id/preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="0px" android:layout_height="0px" android:layout_marginBottom="42dp" android:layout_marginHorizontal="48dp" android:paddingHorizontal="48dp" app:layout_constrainedHeight="true" app:layout_constrainedWidth="true" app:layout_constraintTop_toBottomOf="@id/save" Loading @@ -64,8 +64,8 @@ <com.android.systemui.screenshot.CropView android:id="@+id/crop_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_width="0px" android:layout_height="0px" android:layout_marginBottom="42dp" app:layout_constrainedHeight="true" app:layout_constrainedWidth="true" Loading
packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +4 −2 Original line number Diff line number Diff line Loading @@ -409,7 +409,9 @@ public class LongScreenshotActivity extends Activity { } Rect bounds = drawable.getBounds(); float imageRatio = bounds.width() / (float) bounds.height(); float viewRatio = mPreview.getWidth() / (float) mPreview.getHeight(); int previewWidth = mPreview.getWidth() - mPreview.getPaddingLeft() - mPreview.getPaddingRight(); float viewRatio = previewWidth / (float) mPreview.getHeight(); if (imageRatio > viewRatio) { // Image is full width and height is constrained, compute extra padding to inform Loading @@ -417,7 +419,7 @@ public class LongScreenshotActivity extends Activity { float imageHeight = mPreview.getHeight() * viewRatio / imageRatio; int extraPadding = (int) (mPreview.getHeight() - imageHeight) / 2; mCropView.setExtraPadding(extraPadding, extraPadding); mCropView.setImageWidth(mPreview.getWidth()); mCropView.setImageWidth(previewWidth); } else { // Image is full height mCropView.setExtraPadding(0, 0); Loading