diff options
Diffstat (limited to 'sample/src')
| -rw-r--r-- | sample/src/main/AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | sample/src/main/res/layout/capture_appcompat.xml | 26 | ||||
| -rw-r--r-- | sample/src/main/res/values-v21/styles.xml | 1 |
3 files changed, 22 insertions, 7 deletions
diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index fa7bbef1..e2c6bd1b 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -32,7 +32,7 @@ <activity android:name=".ToolbarCaptureActivity" android:clearTaskOnLaunch="true" - android:screenOrientation="sensorLandscape" + android:screenOrientation="portrait" android:stateNotNeeded="true" android:theme="@style/AppCompatCaptureTheme" android:windowSoftInputMode="stateAlwaysHidden"> diff --git a/sample/src/main/res/layout/capture_appcompat.xml b/sample/src/main/res/layout/capture_appcompat.xml index b1ffaffa..c5f3eab8 100644 --- a/sample/src/main/res/layout/capture_appcompat.xml +++ b/sample/src/main/res/layout/capture_appcompat.xml @@ -14,24 +14,38 @@ See the License for the specific language governing permissions and limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> + <com.journeyapps.barcodescanner.CompoundBarcodeView + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_below="@+id/my_awesome_toolbar" + android:layout_alignParentBottom="true" + android:id="@+id/zxing_barcode_scanner"/> + + <!-- The Toolbar must be defined after the CompoundBarcodeView, to ensure it's always on top. --> <android.support.v7.widget.Toolbar android:id="@+id/my_awesome_toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:minHeight="?attr/actionBarSize" android:background="?attr/colorPrimary" + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" app:theme="@style/ThemeOverlay.AppCompat.ActionBar"/> - <com.journeyapps.barcodescanner.CompoundBarcodeView + <!-- Sample for a footer. Also add to CompoundBarcodeView: android:layout_above="@+id/footer" --> + <!-- <TextView + android:id="@+id/footer" android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:id="@+id/zxing_barcode_scanner"/> -</LinearLayout>
\ No newline at end of file + android:layout_height="150dp" + android:text="Footer" + android:gravity="center" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true"/> --> +</RelativeLayout> diff --git a/sample/src/main/res/values-v21/styles.xml b/sample/src/main/res/values-v21/styles.xml index 86092ffd..c21e47ba 100644 --- a/sample/src/main/res/values-v21/styles.xml +++ b/sample/src/main/res/values-v21/styles.xml @@ -3,5 +3,6 @@ <style name="AppCompatCaptureTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">#ffb341</item> + <item name="android:windowTranslucentStatus">true</item> </style> </resources> |
