【发布时间】:2012-06-11 19:16:25
【问题描述】:
我有一个 LinearLayout,里面还有另外 2 个 LinearLayout。每一个里面都有一个 ImageView。 我需要将此 LinearLayout 设置为我的应用程序的所有其他 LinearLayouts 的背景。 我尝试使用“包含”和“合并”,但没有成功,因为我需要将其他 LinearLayout 放在我的“背景 LinearLayout”中 然后我尝试了“样式”,但我不知道如何在 LinearLayouts 中添加 ImageViews。有可能的? 最后现在我正在尝试使用“Drawable”,但我不知道这是否是解决方案。
我需要一些想法,一些帮助,有人可以帮助我吗?
这是我的“背景线性布局”:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@layout/gradient_background">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginTop="170dip">
<ImageView
android:id="@+id/background_title"
android:src="@drawable/titulo_fondo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left|bottom"
android:layout_marginLeft="-54dip"
android:layout_marginBottom="-24dip">
<ImageView
android:id="@+id/background_logo"
android:src="@drawable/circulo_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
感谢和抱歉我的英语不好
【问题讨论】:
标签: android styles themes drawable android-linearlayout