效果如下:
布局代码:
<?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:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/img1"
android:orientation="vertical"
tools:context=".MainActivity">
</LinearLayout>
主界面代码:
package com.example.beautyphtotos;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Lo