Android ImageView 显示本地图片  

布局文件

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <RelativeLayout
 3     xmlns:andro
 4     xmlns:tools="http://schemas.android.com/tools"
 5     android:layout_width="match_parent"
 6     android:layout_height="match_parent"
 7     tools:context=".MainActivity">
 8 
 9     <ImageView
10         android:
11         android:layout_width="200dp"
12         android:layout_height="200dp"
13         android:layout_centerHorizontal="true"
14         android:layout_marginTop="50dp"
15         android:background="#aa111222"
16         android:onClick="getPicture"
17         />
18 </RelativeLayout>
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2021-12-21
  • 2022-12-23
  • 2021-10-10
  • 2021-11-04
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案