mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-09 23:41:08 +01:00
Migrate to AppCompatActivity (#53)
This commit is contained in:
parent
55974e35f8
commit
51033c1b7f
3 changed files with 8 additions and 8 deletions
|
@ -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();
|
||||
|
|
|
@ -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" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/keyboard_button"
|
||||
|
@ -54,9 +54,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
android:contentDescription="@string/button_keyboard"
|
||||
android:src="@drawable/ic_keyboard_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_black_24dp"
|
||||
tools:ignore="PrivateResource" />
|
||||
|
||||
</merge>
|
|
@ -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" />
|
||||
</com.journeyapps.barcodescanner.DecoratedBarcodeView>
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in a new issue