Skip to content

Instantly share code, notes, and snippets.

@bruferrari
Created August 23, 2018 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruferrari/aa7e0badccdc76453a0bf7883f230a9a to your computer and use it in GitHub Desktop.
Save bruferrari/aa7e0badccdc76453a0bf7883f230a9a to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageRecon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="Select image for text recognition"
android:scaleType="fitStart"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
<bferrari.com.mlkitdemo.GraphicOverlay
android:id="@+id/graphicOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" />
<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:background="@android:drawable/btn_dropdown"
android:spinnerMode="dropdown"
app:layout_constraintBottom_toTopOf="@+id/textRecognitionBtn"
app:layout_constraintTop_toBottomOf="@+id/imageRecon"/>
<Button
android:id="@+id/textRecognitionBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginStart="8dp"
android:text="@string/text_recognition"
app:layout_constraintBottom_toTopOf="@id/spinner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:src="@drawable/ic_photo_camera_black_24dp"
app:fabSize="normal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment