我有一个线性布局,其中包含一个imageview和textview,一个在另一个下面。
<LinearLayout android:orientation="horizontal" ... >
<ImageView
android:id="@+id/thumbnail"
android:layout_weight="0.8"
android:layout_width="0dip"
android:layout_height="fill_parent">
</ImageView>
<TextView
android:id="@+id/description"
android:layout_weight="0.2"
android:layout_width="0dip"
android:layout_height="wrap_content">
</TextView>
有些规则可能缺失,这只是为了给您一个布局的概念。我想要另一个长度和宽度为50dip的小文本视图,放置在ImageView上方。当我说“上方”时,我指的是z-index更高于ImageView, 我想将其置于中心并覆盖(重叠)在ImageView上方。
我想知道如何将一个视图放置在另一个视图上方,并具有不同的z-index值(最好在线性布局中)?