<?xml version="1.0" encoding="utf-8"?> <LinearLayout 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="fill_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:showIn="@layout/activity_main"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <Button android:id="@+id/btnPickImage" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="Select or Capture picture" /> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="4dp" /> <TextView android:id="@+id/resultTextView" android:layout_width="match_parent" android:layout_height="60dp" android:layout_weight="1" android:textColor="@color/colorPrimary" android:textSize="15sp" /> <View android:layout_width="match_parent" android:layout_height="4dp" /> <ImageView android:id="@+id/imageView" android:layout_width="match_parent" android:layout_height="375dp" android:layout_weight="1" /> <View android:layout_width="match_parent" android:layout_height="10dp" /> </LinearLayout>