Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Android 应用程序(Eclipse)中,如何将图像作为视图的背景?
-我假设你想制作一个Activity.
Activity
-设置android:background属性。
android:background
例如:
android:background="@drawable/my_picture"
以编程方式,您可以使用以下方法向视图添加背景:
View view = yourView; view.setBackgroundDrawable(yourDrawable); //or with view.setBackgroundResource(resid);