Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8c4445f authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Nishith Khanna
Browse files

camera: Use material theme for qr bottom sheet

parent f3c5e792
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ import android.graphics.Rect
import android.os.Build
import android.text.method.LinkMovementMethod
import android.util.Log
import android.view.ContextThemeWrapper
import android.view.LayoutInflater
import android.view.textclassifier.TextClassificationManager
import android.widget.ImageButton
import android.widget.ImageView
@@ -270,8 +272,10 @@ class QrImageAnalyzer(private val activity: Activity, private val scope: Corouti
        }
    }

    private fun inflateButton() = MaterialButton::class.cast(
        activity.layoutInflater.inflate(
    private fun inflateButton(): MaterialButton {
        val materialContext = ContextThemeWrapper(activity, R.style.Theme_MaterialComponents_Light_Dialog)
        return MaterialButton::class.cast(
            LayoutInflater.from(materialContext).inflate(
                R.layout.qr_bottom_sheet_action_button,
                bottomSheetDialogActionsLayout,
                false
@@ -280,3 +284,4 @@ class QrImageAnalyzer(private val activity: Activity, private val scope: Corouti
            layoutParams = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)
        }
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -11,10 +11,10 @@
    android:letterSpacing="0.0"
    android:textAlignment="center"
    android:textAllCaps="false"
    android:textColor="@color/qrcodeColorOnSurface"
    android:textColor="@color/e_primary_text_color"
    android:textSize="15sp"
    android:textStyle="normal"
    android:typeface="normal"
    app:cornerRadius="8dp"
    app:strokeColor="@color/qrcodeColorOnSurfaceVariant"
    app:strokeColor="@color/e_accent"
    app:strokeWidth="1dp" />
+2 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/e_floating_background"
    android:paddingHorizontal="16dp">

    <ImageView
@@ -30,7 +31,7 @@
        android:layout_height="88dp"
        android:layout_marginTop="12dp"
        android:clickable="true"
        app:cardBackgroundColor="@color/e_floating_background"
        app:cardBackgroundColor="@color/e_floating_background_variant"
        app:cardCornerRadius="12dp"
        app:cardElevation="0dp"
        app:layout_constraintEnd_toEndOf="parent"