Merge "Fix Wi-Fi QR code scanner height at 360dp" into qt-dev
am: 26ff84d3f4
Change-Id: Ia21d3201d854c44f1372616981df855cf2ba5781
This commit is contained in:
@@ -43,21 +43,18 @@
|
|||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
style="?android:attr/progressBarStyleHorizontal"/>
|
style="?android:attr/progressBarStyleHorizontal"/>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<FrameLayout
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<TextureView
|
<TextureView
|
||||||
android:id="@+id/preview_view"
|
android:id="@+id/preview_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="@dimen/qrcode_preview_size"/>
|
||||||
app:layout_constraintDimensionRatio="1:1"/>
|
|
||||||
<com.android.settings.wifi.qrcode.QrDecorateView
|
<com.android.settings.wifi.qrcode.QrDecorateView
|
||||||
android:id="@+id/decorate_view"
|
android:id="@+id/decorate_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="@dimen/qrcode_preview_size"/>
|
||||||
app:layout_constraintDimensionRatio="1:1"/>
|
</FrameLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/error_message"
|
android:id="@+id/error_message"
|
||||||
|
@@ -313,9 +313,6 @@ public class QrCamera extends Handler {
|
|||||||
private void setTransformationMatrix(Size viewSize) {
|
private void setTransformationMatrix(Size viewSize) {
|
||||||
// Check aspect ratio, can only handle square view.
|
// Check aspect ratio, can only handle square view.
|
||||||
final int viewRatio = (int)getRatio(viewSize.getWidth(), viewSize.getHeight());
|
final int viewRatio = (int)getRatio(viewSize.getWidth(), viewSize.getHeight());
|
||||||
if (viewRatio != 1) {
|
|
||||||
throw new IllegalArgumentException("Preview area should be square");
|
|
||||||
}
|
|
||||||
|
|
||||||
final boolean isPortrait = mContext.get().getResources().getConfiguration().orientation
|
final boolean isPortrait = mContext.get().getResources().getConfiguration().orientation
|
||||||
== Configuration.ORIENTATION_PORTRAIT ? true : false;
|
== Configuration.ORIENTATION_PORTRAIT ? true : false;
|
||||||
|
Reference in New Issue
Block a user