1

Estoy realizando una aplicacion con un sistema de comentarios y calificaciones introducir la descripción de la imagen aquí

Este es el xml del layout

<?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:orientation="vertical" >

    <include layout="@layout/toolbar" />

    <android.support.v4.widget.NestedScrollView
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:fillViewport="true">

        <LinearLayout
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:orientation="vertical">

            <TextView
               android:id="@+id/evento_name"
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:background="@color/azullEvento"
               android:gravity="center"
               android:textColor="@color/cardview_light_background"
               android:textSize="30sp" />

            <WebView
               android:id="@+id/descricion_larga"
               android:layout_width="match_parent"
               android:layout_height="0dp"
               android:layout_weight="1"
               android:background="@color/grisEvento"
               android:gravity="top">

            </WebView>

            <LinearLayout
               android:id="@+id/social_section"
               android:layout_width="match_parent"
               android:layout_height="130dp"
               android:gravity="bottom"
               android:orientation="vertical"
               android:visibility="visible">

                <LinearLayout
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_weight="1"
                   android:orientation="horizontal">

                    <RatingBar
                       android:id="@+id/ratingBar"
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:layout_marginStart="30dp"
                       android:numStars="5" />

                    <Button
                       android:id="@+id/calificar"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:text="@string/btn_calificar" />

                </LinearLayout>

                <LinearLayout

                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_weight="1"
                   android:orientation="horizontal">

                    <EditText
                       android:id="@+id/comentario"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:ems="10"
                       android:inputType="textMultiLine"
                       android:labelFor="@id/comentario" />

                </LinearLayout>

                <LinearLayout
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_weight="1"
                   android:orientation="vertical">

                    <android.support.v7.widget.RecyclerView
                       android:id="@+id/lista_comentarios"
                       android:layout_width="match_parent"
                       android:layout_height="match_parent"
                       />
                </LinearLayout>

            </LinearLayout>

        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>

</LinearLayout> 

El sistema funciona solo que el scroll solo se realiza en la recyclerView y no lo hace con toda la pantalla

1
  • 1
    Debes escribir tu layout es decir el archivo xml de tu pagina Commented el 18 ago. 2018 a las 22:06

1 respuesta 1

0

Usa lo siguiente

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:fillViewport="false">

<LinearLayout
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical" >

    <include layout="@layout/toolbar" />

    <android.support.v4.widget.NestedScrollView
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:fillViewport="true">

        <LinearLayout
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:orientation="vertical">

            <TextView
               android:id="@+id/evento_name"
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:background="@color/azullEvento"
               android:gravity="center"
               android:textColor="@color/cardview_light_background"
               android:textSize="30sp" />

            <WebView
               android:id="@+id/descricion_larga"
               android:layout_width="match_parent"
               android:layout_height="0dp"
               android:layout_weight="1"
               android:background="@color/grisEvento"
               android:gravity="top">

            </WebView>

            <LinearLayout
               android:id="@+id/social_section"
               android:layout_width="match_parent"
               android:layout_height="130dp"
               android:gravity="bottom"
               android:orientation="vertical"
               android:visibility="visible">

                <LinearLayout
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_weight="1"
                   android:orientation="horizontal">

                    <RatingBar
                       android:id="@+id/ratingBar"
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:layout_marginStart="30dp"
                       android:numStars="5" />

                    <Button
                       android:id="@+id/calificar"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:text="@string/btn_calificar" />

                </LinearLayout>

                <LinearLayout

                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_weight="1"
                   android:orientation="horizontal">

                    <EditText
                       android:id="@+id/comentario"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:ems="10"
                       android:inputType="textMultiLine"
                       android:labelFor="@id/comentario" />

                </LinearLayout>

                <LinearLayout
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:layout_weight="1"
                   android:orientation="vertical">

                    <android.support.v7.widget.RecyclerView
                       android:id="@+id/lista_comentarios"
                       android:layout_width="match_parent"
                       android:layout_height="match_parent"
                       />
                </LinearLayout>

            </LinearLayout>

        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>

</LinearLayout> 
</ScrollView>

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.