xml
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context=".view.activity.MainActivity">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image_simple"
android:layout_width="200dp"
android:layout_height="200dp"
android:src="@mipmap/ic_launcher" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="horizontal">
<Button
android:id="@+id/button_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="相机" />
<Button
android:id="@+id/button_xc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="相册" />
</LinearLayout>
</LinearLayout>
网络工具类
package luwenjie0428.bw.com.luwenjie0502.model.util;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* @author:
* @ProjectName: Luwenjie0502
* @Package: luwenjie0428.bw.c