Advertisements

CS Activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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">


    <ImageView
        android:id="@+id/imageview"
        android:layout_width="500dp"
        android:layout_height="500dp"
        android:layout_margin="20dp"
        android:padding="25dp"
        android:background="@android:color/darker_gray"
         />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/imageview"
        android:layout_alignRight="@+id/imageview"
        android:onClick="clearImage"
        android:src="@drawable/ic_cancel_black_24dp" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="50dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:orientation="horizontal">


        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="oneClicked"
            android:text="select image" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="uploadPhoto"
            android:text="Upload" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="downloadPhoto"
            android:text="Download" />


    </LinearLayout>
</RelativeLayout>