0

Amigos, tengo un proyecto en el cual se esta implementado una vista que contiene un scrollview, dentro de ese scrollview cuenta con un linearlayout y dentro tiene lo siguiente, un grafico, un cardview closable y un recyclerview, ahora el problema presentado es que al tratar de hacer el scroll para que suba toda la vista, esta no lo hace, el scroll del recyler no lo permite, y muestra el grafico cortado, como puedo hacer para que todo el scroll funcione de forma correcta ?? independiente de si se tenda un recylcerview, he tratado poniendo en false la propiedad del recycler para el scroll pero esto hace que no me muestre todo el contenido de la lista, aqui dejo el codigo de como estoy haciendo

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".statistics.presentation.activity.StoreMarginActivity">

<ProgressBar
    android:id="@+id/prgLoadData"
    style="?android:attr/progressBarStyle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

<androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/imgPrev"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="32dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_arrow_left" />

    <TextView
        android:id="@+id/txtDataFech"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="32dp"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="8dp"
        android:text="Mes: 1 ago. - 31 ago. 2020"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/imgNext"
        app:layout_constraintStart_toEndOf="@+id/imgPrev"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/imgNext"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="32dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_arrow_right" />
</androidx.constraintlayout.widget.ConstraintLayout>

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

    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.chip.ChipGroup
            android:id="@+id/selected_graf"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/margin_16d"
            android:layout_marginStart="@dimen/margin_16d"
            android:layout_marginRight="@dimen/margin_16d"
            android:layout_marginBottom="@dimen/margin_16d"
            app:singleSelection="true">
            <com.google.android.material.chip.Chip
                android:id="@+id/id_marc"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Marcas"
                style="@style/chip"
                />
            <com.google.android.material.chip.Chip
                android:id="@+id/id_section"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Secciones"
                android:checked="true"
                style="@style/chip"
                />
            <com.google.android.material.chip.Chip
                android:id="@+id/id_category"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Categorías"
                style="@style/chip"
                />
            <com.google.android.material.chip.Chip
                android:id="@+id/id_sub_catg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="SubCategorías"
                style="@style/chip"
                />
        </com.google.android.material.chip.ChipGroup>
    </HorizontalScrollView>

</LinearLayout>

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_margin="@dimen/margin_18d">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="210dp"
                >

                <antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator
                    android:id="@+id/circular_progress"
                    android:layout_width="200dp"
                    android:layout_height="0dp"
                    android:layout_gravity="center"
                    android:layout_marginBottom="32dp"
                    android:visibility="gone"
                    app:layout_constraintBottom_toTopOf="@+id/txt_text_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:textColor="@color/blackColor"
                    app:textSize="50sp" />

                <androidx.constraintlayout.widget.Guideline
                    android:id="@+id/guideline19"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintGuide_percent="0.29" />

                <ProgressBar
                    android:id="@+id/prgDataMargin"
                    style="?android:attr/progressBarStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:layout_constraintBottom_toTopOf="@+id/txt_text_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/txt_text_margin"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="8dp"
                    android:text="Margen de la tienda"
                    android:textAlignment="center"
                    android:textColor="@color/colorNormalDark"
                    android:fontFamily="@font/helveticabold"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </LinearLayout>

        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="18dp"
            android:layout_marginRight="18dp"
            android:layout_marginBottom="5dp"
            android:layout_marginTop="5dp">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:id="@+id/txt_visible"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="16dp"
                        android:layout_marginTop="8dp"
                        android:text="Indicadores margen"
                        android:textColor="@color/colorNormalDark"
                        android:fontFamily="@font/helveticabold"
                        android:textAlignment="center"
                        app:layout_constraintEnd_toStartOf="@+id/img_down"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <ImageView
                        android:id="@+id/img_down"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:layout_marginEnd="16dp"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:srcCompat="@drawable/ic_arrow_down" />


                </androidx.constraintlayout.widget.ConstraintLayout>

                <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:visibility="gone"
                    android:id="@+id/cont_indi">

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="5dp"
                        >

                        <ProgressBar
                            android:id="@+id/progressBar1"
                            android:layout_width="20dp"
                            android:layout_height="20dp"
                            android:layout_marginLeft="@dimen/margin_8d"
                            android:indeterminateOnly="false"
                            android:progress="100"
                            android:progressDrawable="@drawable/color_progres_red"
                            android:rotation="180"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="16dp"
                            android:text="-0 - 0%"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toEndOf="@+id/progressBar1"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginRight="@dimen/margin_16d"
                            android:text="Malo"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="5dp"
                        >

                        <ProgressBar
                            android:id="@+id/progressBar2"
                            android:layout_width="20dp"
                            android:layout_height="20dp"
                            android:layout_marginLeft="@dimen/margin_8d"
                            android:progressDrawable="@drawable/color_progres_orange"
                            android:progress="100"
                            android:rotation="180"
                            android:indeterminateOnly="false"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="16dp"
                            android:text="1 - 25%"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toEndOf="@+id/progressBar2"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginRight="@dimen/margin_16d"
                            android:text="Regular"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="5dp"
                        >

                        <ProgressBar
                            android:id="@+id/progressBar3"
                            android:layout_width="20dp"
                            android:layout_height="20dp"
                            android:layout_marginLeft="@dimen/margin_8d"
                            android:indeterminateOnly="false"
                            android:progressDrawable="@drawable/color_progres_yellow"
                            android:progress="100"
                            android:rotation="180"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="16dp"
                            android:text="26 - 50%"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toEndOf="@+id/progressBar3"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginRight="@dimen/margin_16d"
                            android:text="Bueno"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="5dp">

                        <ProgressBar
                            android:id="@+id/progressBar4"
                            android:layout_width="20dp"
                            android:layout_height="20dp"
                            android:layout_marginLeft="@dimen/margin_8d"
                            android:indeterminateOnly="false"
                            android:progress="100"
                            android:progressDrawable="@drawable/color_progres_green"
                            android:rotation="180"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="16dp"
                            android:text="51 - 100%"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toEndOf="@+id/progressBar4"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginRight="@dimen/margin_16d"
                            android:text="Excelente"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>


                </LinearLayout>
            </LinearLayout>
        </androidx.cardview.widget.CardView>

        <LinearLayout
            android:layout_marginTop="@dimen/margin_8d"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginTop="@dimen/margin_8d"
                android:layout_marginLeft="@dimen/margin_16d"
                android:layout_marginRight="@dimen/margin_16d"
                android:layout_marginBottom="@dimen/margin_8d"
                android:layout_weight="1">

                <TextView
                    android:id="@+id/txt_marc"
                    android:text="Categorías"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/colorNormalDark"
                    android:fontFamily="@font/helveticabold"
                    android:layout_weight="1"/>

                <TextView
                    android:text="Ganancias"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/colorNormalDark"
                    android:fontFamily="@font/helveticabold"
                    android:layout_weight="1"/>

                <TextView
                    android:text="Margen"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/colorNormalDark"
                    android:fontFamily="@font/helveticabold"
                    android:layout_weight="1"/>

                <TextView
                    android:text="% en la venta"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="@color/colorNormalDark"
                    android:fontFamily="@font/helveticabold"
                    />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/margin_16d"
                android:layout_marginStart="@dimen/margin_16d"
                android:orientation="vertical">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/table_recycler"
                    android:layout_width="match_parent"
                    android:layout_height="400dp" />
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>
</ScrollView>
1
  • puedes decir simplemente cual es el problema?, con tanto texto haces que cualquiera se pierda leyendo., edita tu pregunta , hazla mas clara.
    – Osdward
    Commented el 22 jul. 2021 a las 0:35

1 respuesta 1

0

Intenta colocando como parent el ScrollView

 <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/rootScrollView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    android:scrollbars="none">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!--child views-->

        </RelativeLayout>
</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.