Skip to content

Instantly share code, notes, and snippets.

@thapld
Created June 20, 2019 09:51
Show Gist options
  • Save thapld/cea1f399b26104920864ff408d3218a7 to your computer and use it in GitHub Desktop.
Save thapld/cea1f399b26104920864ff408d3218a7 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="viewModel"
type="com.tnb.app.qrcode.ui.scan.ScanViewModel"/>
</data>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<SurfaceView
android:id="@+id/surfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.king.zxing.ViewfinderView
android:id="@+id/viewfinderView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:labelTextLocation="bottom"
app:cornerColor="@color/cyanea_accent"
app:frameColor="@color/cyanea_accent"
app:laserColor="@color/cyanea_accent"
app:laserStyle="grid"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="60dp"
android:gravity="center">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/flash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_flash_on"
app:fabSize="mini"
app:borderWidth="2dp"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/focus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_focus_off"
app:fabSize="mini"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_switch_cam"
app:fabSize="mini"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/gallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_image_black_24dp"
app:fabSize="mini"/>
</LinearLayout>
</RelativeLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment