diff --git a/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java b/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java index 1f0785f..a4a63a2 100644 --- a/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/CustomScannerActivity.java @@ -1,6 +1,5 @@ package net.foucry.pilldroid; -import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; @@ -11,6 +10,7 @@ import android.widget.ImageButton; import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; import com.journeyapps.barcodescanner.CaptureManager; import com.journeyapps.barcodescanner.DecoratedBarcodeView; import com.journeyapps.barcodescanner.ViewfinderView; @@ -18,7 +18,7 @@ import com.journeyapps.barcodescanner.ViewfinderView; /** * Custom Scanner Activity extending from Activity to display a custom layout form scanner view. */ -public class CustomScannerActivity extends Activity implements DecoratedBarcodeView.TorchListener { +public class CustomScannerActivity extends AppCompatActivity implements DecoratedBarcodeView.TorchListener { private static final String TAG = CustomScannerActivity.class.getName(); final Bundle captureIntentBundle = new Bundle(); diff --git a/app/src/main/res/layout/custom_barcode_scanner.xml b/app/src/main/res/layout/custom_barcode_scanner.xml index bac7262..eebe3fc 100644 --- a/app/src/main/res/layout/custom_barcode_scanner.xml +++ b/app/src/main/res/layout/custom_barcode_scanner.xml @@ -42,11 +42,11 @@ android:layout_gravity="bottom|start" android:layout_margin="@dimen/fab_margin" android:accessibilityHeading="true" - android:backgroundTint="@android:color/transparent" + app:backgroundTint="@android:color/transparent" android:contentDescription="@string/button_cancel" android:cropToPadding="false" app:background="@android:color/darker_gray" - android:src="@drawable/ic_cancel_black_24dp" /> + app:srcCompat="@drawable/ic_cancel_black_24dp" /> \ No newline at end of file diff --git a/app/src/main/res/layout/custom_scanner_activty.xml b/app/src/main/res/layout/custom_scanner_activty.xml index 6843192..2d91999 100644 --- a/app/src/main/res/layout/custom_scanner_activty.xml +++ b/app/src/main/res/layout/custom_scanner_activty.xml @@ -21,9 +21,9 @@ android:layout_marginTop="@dimen/fab_margin" android:layout_marginEnd="@dimen/fab_margin" android:layout_marginBottom="@dimen/fab_margin" - android:backgroundTint="@android:color/transparent" + app:backgroundTint="@android:color/transparent" android:contentDescription="@string/flashlightButton" - android:src="@drawable/ic_baseline_highlight_24" /> + app:srcCompat="@drawable/ic_baseline_highlight_24" /> \ No newline at end of file