首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

android获取本map片或拍照图片

2013-02-24 
android获取本地图片或拍照图片直接上代码,代码中注释很清楚,本人觉得这个东西google本来自己就应该集成好

android获取本地图片或拍照图片

直接上代码,代码中注释很清楚,本人觉得这个东西google本来自己就应该集成好,直接一个方法调用最好,因为这个用的比较多,一般的android手机中交流的软件基本上都需要这个东西。

<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=".MainActivity" >    <Button        android:id="@+id/button1"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="选择相片" />    <Button        android:id="@+id/button2"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="拍照相片" />    <EditText        android:id="@+id/editText1"        android:layout_width="match_parent"        android:layout_height="150dp"        android:ems="10"        android:inputType="textMultiLine" >        <requestFocus />    </EditText>    <ImageView        android:id="@+id/imageView1"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:src="@drawable/ic_launcher" /></LinearLayout>


热点排行