mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Make ScannerActivity fullscreen and locked in portrait mode
This commit is contained in:
parent
93eeef142d
commit
2fce0f4dcc
3 changed files with 14 additions and 1 deletions
|
@ -24,7 +24,11 @@
|
|||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".ScannerActivity">
|
||||
<activity
|
||||
android:name=".ScannerActivity"
|
||||
android:theme="@style/AppTheme.Fullscreen"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".AddProfileActivity"
|
||||
|
|
|
@ -23,6 +23,7 @@ public class ScannerActivity extends AegisActivity implements ZXingScannerView.R
|
|||
@Override
|
||||
protected void onCreate(Bundle state) {
|
||||
super.onCreate(state);
|
||||
setTitle("Scan a QR code");
|
||||
|
||||
_scannerView = new ZXingScannerView(this) {
|
||||
@Override
|
||||
|
@ -30,7 +31,10 @@ public class ScannerActivity extends AegisActivity implements ZXingScannerView.R
|
|||
return new SquareFinderView(context);
|
||||
}
|
||||
};
|
||||
_scannerView.setResultHandler(this);
|
||||
_scannerView.setFormats(Collections.singletonList(BarcodeFormat.QR_CODE));
|
||||
_scannerView.startCamera();
|
||||
|
||||
setContentView(_scannerView);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
<item name="windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Fullscreen" parent="AppTheme.TransparentActionBar">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
|
||||
<item name="android:background">@null</item>
|
||||
<!-- Support library compatibility -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue