在Android中,可以使用ImageView控件来放置照片。
以下是在布局文件中使用ImageView控件的示例:
```
android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/your_image" /> ``` 其中,`@drawable/your_image` 是你要显示的照片资源的引用。你可以将照片放置在项目的drawable文件夹中,然后使用其文件名作为资源的引用。 如果你想要动态地设置ImageView中的照片,可以在Java代码中使用setImageResource()方法来设置: ``` ImageView imageView = findViewById(R.id.imageView); imageView.setImageResource(R.drawable.your_image); ``` 其中,`R.drawable.your_image` 是你要设置的照片资源的引用。确保使用正确的资源引用来设置照片。