簡體   English   中英

為ImageView添加布局

[英]Add layout for ImageView

我有一個ImageView

<ImageView
            android:id="@+id/auto"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10sp"
            android:src="@drawable/auto" />

如何在Activity的onCreate中為此圖像添加布局? 例如,我要為此圖像添加背景。 謝謝。

將其封裝在布局中,並為布局添加背景。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM