Skip to content

Instantly share code, notes, and snippets.

@booknara
Created March 3, 2016 01:26
Show Gist options
  • Save booknara/0aa030b1fea90e528c94 to your computer and use it in GitHub Desktop.
Save booknara/0aa030b1fea90e528c94 to your computer and use it in GitHub Desktop.
QR Code Reader Layout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="100"
tools:context=".DecoderActivity" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="60">
<com.dlazaro66.qrcodereaderview.QRCodeReaderView
android:id="@+id/qrdecoderview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="40"
android:background="@android:color/white">
<TextView
android:id="@+id/viewfinder_guide"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="20"
android:gravity="center"
android:text="@string/msg_view_finder_guide"
android:textColor="@color/contents_text"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView
android:id="@+id/scan_status"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10"
android:gravity="center"
android:visibility="gone"
android:text="@string/msg_view_finder_guide"
android:textColor="@color/contents_text"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<TextView
android:id="@+id/scan_code"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10"
android:gravity="center"
android:visibility="gone"
android:text="@string/msg_view_finder_guide"
android:textColor="@color/contents_text"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<Button
android:id="@+id/finish_scan"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="20"
android:padding="20dp"
android:textColor="@color/primary"
android:text="@string/button_finish_scan"
android:textAllCaps="true"/>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment