Я пытаюсь иметь один текстовый вид, который составляет 3/4 страницы и 1/4 страницы с баром оценки.Вес для Android textViews
К сожалению, когда длинный элемент помещается в мой TextView это pushses рейтинг бара ниже:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e5e5e5"
android:orientation="vertical"
android:id="@+id/switchOut">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:orientation="vertical"
android:background="@drawable/bg_card">
<!-- Card Contents go here -->
<ScrollView
android:id="@+id/SCROLLER_ID"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:scrollbars="vertical"
android:fillViewport="true">
<TextView
android:id="@+id/reviewToRate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:textSize="15sp"
android:padding="5dip"
></TextView>
</ScrollView>
</LinearLayout >
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:orientation="vertical"
android:background="@drawable/bg_card">
<!-- Card Contents go here -->
<RatingBar
android:id="@+id/reviewRatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="1.0"
android:rating="0"
/>
</LinearLayout >
</FrameLayout>
</LinearLayout>
Вы должны удалить свой вид прокрутки. Это избыточно. – hungryghost
Я вижу только один текстовый вид в вашем макете. Вы упомянули, что у вас их двое? –