0
我有一个ratingBar和一个twoTabList,我想坐,以便ratingBar在twoTabList上方,并且它们都水平占据整个屏幕。但是,无论何时我尝试放置其中一个,它都会将其他屏幕切割出来。Android的XML布局重叠
这里是我的代码,现在的.XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="1dp"
android:background="@color/light_grey"
android:layout_below="@id/tabs"
android:weightSum="1"
android:orientation="horizontal">
<RatingBar
android:id="@+id/rating"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:clickable="true"
android:stepSize="1.0"
android:isIndicator="false"
android:rating="3"
style="@style/Base.Widget.AppCompat.RatingBar"
android:numStars="5"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_weight="144" />
<android.support.v7.widget.RecyclerView
android:id="@+id/tabTwoList"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="444dp"
android:layout_weight="116.25">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
嘿感谢您的答复!这使得android studio的设计输出显示它看起来如何我想要它,但是当我运行模拟器时,它显示顶部的评级栏,然后沿整个垂直方向显示twoTabList,并在大约一半的水平上切割。有任何想法吗? – Itheyln
请画出你想要的设计。我会帮助。 – AndroidLTG