android.widget.ImageView を使用します。
ImageViewを使ったサンプル
■ソースコード
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.image);
}
■レイアウト
<FrameLayout 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:background="#ffffff"
android:padding="0dp" >
<ImageView
android:id="@+id/sample_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/sample" />
</FrameLayout>
0 件のコメント:
コメントを投稿