从上一篇博客的基础上修改:地址
首先是activitymain.xml:
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/take_photo" android:text="拍照" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <Button android:id="@+id/choose_from_album" android:text="Choosefromalbum" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <ImageView android:id="@+id/picture" android:layout_