mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Migrate to AppCompatActivity (#53)
This commit is contained in:
parent
fab05c77cf
commit
d7c5101820
3 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
||||||
package net.foucry.pilldroid;
|
package net.foucry.pilldroid;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -11,6 +10,7 @@ import android.widget.ImageButton;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.journeyapps.barcodescanner.CaptureManager;
|
import com.journeyapps.barcodescanner.CaptureManager;
|
||||||
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
|
||||||
import com.journeyapps.barcodescanner.ViewfinderView;
|
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.
|
* 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();
|
private static final String TAG = CustomScannerActivity.class.getName();
|
||||||
final Bundle captureIntentBundle = new Bundle();
|
final Bundle captureIntentBundle = new Bundle();
|
||||||
|
|
|
@ -42,11 +42,11 @@
|
||||||
android:layout_gravity="bottom|start"
|
android:layout_gravity="bottom|start"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
android:accessibilityHeading="true"
|
android:accessibilityHeading="true"
|
||||||
android:backgroundTint="@android:color/transparent"
|
app:backgroundTint="@android:color/transparent"
|
||||||
android:contentDescription="@string/button_cancel"
|
android:contentDescription="@string/button_cancel"
|
||||||
android:cropToPadding="false"
|
android:cropToPadding="false"
|
||||||
app:background="@android:color/darker_gray"
|
app:background="@android:color/darker_gray"
|
||||||
android:src="@drawable/ic_cancel_black_24dp" />
|
app:srcCompat="@drawable/ic_cancel_black_24dp" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/keyboard_button"
|
android:id="@+id/keyboard_button"
|
||||||
|
@ -54,9 +54,9 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
android:backgroundTint="@android:color/transparent"
|
app:backgroundTint="@android:color/transparent"
|
||||||
android:contentDescription="@string/button_keyboard"
|
android:contentDescription="@string/button_keyboard"
|
||||||
android:src="@drawable/ic_keyboard_black_24dp"
|
app:srcCompat="@drawable/ic_keyboard_black_24dp"
|
||||||
tools:ignore="PrivateResource" />
|
tools:ignore="PrivateResource" />
|
||||||
|
|
||||||
</merge>
|
</merge>
|
|
@ -21,9 +21,9 @@
|
||||||
android:layout_marginTop="@dimen/fab_margin"
|
android:layout_marginTop="@dimen/fab_margin"
|
||||||
android:layout_marginEnd="@dimen/fab_margin"
|
android:layout_marginEnd="@dimen/fab_margin"
|
||||||
android:layout_marginBottom="@dimen/fab_margin"
|
android:layout_marginBottom="@dimen/fab_margin"
|
||||||
android:backgroundTint="@android:color/transparent"
|
app:backgroundTint="@android:color/transparent"
|
||||||
android:contentDescription="@string/flashlightButton"
|
android:contentDescription="@string/flashlightButton"
|
||||||
android:src="@drawable/ic_baseline_highlight_24" />
|
app:srcCompat="@drawable/ic_baseline_highlight_24" />
|
||||||
</com.journeyapps.barcodescanner.DecoratedBarcodeView>
|
</com.journeyapps.barcodescanner.DecoratedBarcodeView>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in a new issue