Kısıtlama düzende NestedScrollView kullanarak Sorunu

oy
6

aşağıda gösterildiği gibi ben NestestScrollView içindeki Kısıtlama düzeni kullanıyorum.

<?xml version=1.0 encoding=utf-8?>

<androidx.constraintlayout.widget.ConstraintLayout 
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:id=@+id/clProfileFragment
android:layout_width=match_parent
android:layout_height=match_parent>

<androidx.appcompat.widget.AppCompatImageView
    android:id=@+id/appCompatImageView8
    android:layout_width=0dp
    android:layout_height=0dp
    android:scaleType=centerCrop
    app:layout_constraintEnd_toEndOf=parent
    app:layout_constraintHeight_percent=0.7
    app:layout_constraintStart_toStartOf=parent
    app:layout_constraintTop_toTopOf=parent
    app:srcCompat=@mipmap/bg_nature />


<de.hdodenhof.circleimageview.CircleImageView xmlns:app=http://schemas.android.com/apk/res-auto
    android:id=@+id/ivProfileFragment
    android:layout_width=30dp
    android:layout_height=30dp
    android:layout_marginStart=16dp
    android:layout_marginTop=16dp
    android:src=@drawable/ic_profile
    android:visibility=visible
    app:layout_constraintStart_toStartOf=parent
    app:layout_constraintTop_toTopOf=parent />

<TextView
    android:id=@+id/tvUserName
    android:layout_width=wrap_content
    android:layout_height=wrap_content
    android:layout_marginStart=16dp
    android:fontFamily=@font/raleway_medium
    android:letterSpacing=0.2
    android:textAlignment=center
    android:textColor=@color/darkBlue
    app:layout_constraintBottom_toBottomOf=@+id/ivProfileFragment
    app:layout_constraintStart_toEndOf=@+id/ivProfileFragment
    app:layout_constraintTop_toTopOf=@+id/ivProfileFragment
    tools:text=Mehul Kanzriya />


<androidx.appcompat.widget.AppCompatImageView
    android:id=@+id/ivCloseProfileFragment
    style=@style/VectorImageView
    android:layout_width=wrap_content
    android:layout_height=wrap_content
    android:layout_gravity=start
    android:layout_marginTop=16dp
    android:layout_marginEnd=16dp
    app:layout_constraintEnd_toEndOf=parent
    app:layout_constraintTop_toTopOf=parent
    app:srcCompat=@drawable/ic_close />

<androidx.core.widget.NestedScrollView
    android:layout_width=match_parent
    android:layout_height=0dp
    android:fillViewport=true
    app:layout_constraintEnd_toEndOf=parent
    app:layout_constraintStart_toStartOf=parent
    app:layout_constraintTop_toBottomOf=@+id/ivProfileFragment
    app:layout_constraintBottom_toTopOf=@id/button>

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

        <TextView
            android:id=@+id/textView
            android:layout_width=wrap_content
            android:layout_height=wrap_content
            android:layout_marginStart=8dp
            android:layout_marginTop=32dp
            android:layout_marginEnd=8dp
            android:fontFamily=@font/raleway_semibold
            android:letterSpacing=0.3
            android:text=@string/text_subscribe
            android:textColor=@color/darkBlue
            android:textSize=18sp
            app:layout_constraintEnd_toEndOf=parent
            app:layout_constraintStart_toStartOf=parent
            app:layout_constraintTop_toTopOf=parent />

        <TextView
            android:id=@+id/textView2
            android:layout_width=0dp
            android:layout_height=wrap_content
            android:layout_marginStart=16dp
            android:layout_marginTop=16dp
            android:layout_marginEnd=16dp
            android:letterSpacing=0.3
            android:text=@string/text_subscription_feature_1
            android:textAlignment=center
            android:textColor=@color/subscriptionFeaturesColor
            android:textSize=@dimen/subscriptionFeaturesSize
            app:layout_constraintEnd_toEndOf=parent
            app:layout_constraintStart_toStartOf=parent
            app:layout_constraintTop_toBottomOf=@+id/textView />

        <TextView
            android:id=@+id/textView4
            android:layout_width=0dp
            android:layout_height=wrap_content
            android:layout_marginTop=8dp
            android:letterSpacing=0.3
            android:text=@string/text_subscription_feature_2
            android:textAlignment=center
            android:textColor=@color/subscriptionFeaturesColor
            android:textSize=@dimen/subscriptionFeaturesSize
            app:layout_constraintEnd_toEndOf=@+id/textView2
            app:layout_constraintStart_toStartOf=@+id/textView2
            app:layout_constraintTop_toBottomOf=@+id/textView2 />

        <TextView
            android:id=@+id/textView5
            android:layout_width=0dp
            android:layout_height=wrap_content
            android:layout_marginTop=8dp
            android:letterSpacing=0.3
            android:text=@string/text_subscription_feature_3
            android:textAlignment=center
            android:textColor=@color/subscriptionFeaturesColor
            android:textSize=@dimen/subscriptionFeaturesSize
            app:layout_constraintEnd_toEndOf=@+id/textView4
            app:layout_constraintStart_toStartOf=@+id/textView4
            app:layout_constraintTop_toBottomOf=@+id/textView4 />

        <androidx.appcompat.widget.AppCompatImageView
            android:id=@+id/appCompatImageView2
            android:layout_width=350dp
            android:layout_height=168dp
            android:layout_marginTop=32dp
            app:layout_constraintEnd_toEndOf=@+id/textView5
            app:layout_constraintStart_toStartOf=@+id/textView5
            app:layout_constraintTop_toBottomOf=@+id/textView5
            app:srcCompat=@mipmap/bg_pdf_resting />

        <com.google.android.material.card.MaterialCardView
            android:id=@+id/cvAnnualPlan
            android:layout_width=150dp
            android:layout_height=wrap_content
            android:layout_marginStart=16dp
            android:layout_marginTop=16dp
            app:cardBackgroundColor=@android:color/transparent
            app:cardCornerRadius=14dp
            app:cardElevation=0dp
            app:layout_constraintEnd_toStartOf=@+id/cvMonthlyPlan
            app:layout_constraintHorizontal_chainStyle=spread
            app:layout_constraintStart_toStartOf=parent
            app:layout_constraintTop_toBottomOf=@+id/appCompatImageView2
            app:strokeColor=@color/darkBlue
            app:strokeWidth=3dp>

            <com.google.android.material.card.MaterialCardView
                android:layout_width=match_parent
                android:layout_height=wrap_content
                android:layout_margin=2dp
                app:cardBackgroundColor=@color/subscriptionCardBackgroundColor
                app:cardCornerRadius=12dp
                app:cardElevation=0dp>

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


                    <TextView
                        android:id=@+id/textView7
                        android:layout_width=0dp
                        android:layout_height=wrap_content
                        android:background=@color/darkBlue
                        android:fontFamily=@font/raleway_medium
                        android:letterSpacing=0.1
                        android:padding=8dp
                        android:text=@string/text_subscription_most_popular
                        android:textAlignment=center
                        android:textColor=@android:color/white
                        android:textSize=12sp
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toTopOf=parent />

                    <TextView
                        android:id=@+id/textView3
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:layout_marginStart=8dp
                        android:layout_marginTop=32dp
                        android:layout_marginEnd=8dp
                        android:fontFamily=@font/raleway_semibold
                        android:letterSpacing=0.3
                        android:text=ANNUAL
                        android:textColor=@color/lightYellow
                        android:textSize=@dimen/subscriptionPlanTitle
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toBottomOf=@+id/textView7 />

                    <TextView
                        android:id=@+id/textView6
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:layout_marginStart=8dp
                        android:layout_marginTop=16dp
                        android:layout_marginEnd=8dp
                        android:fontFamily=@font/roboto_bold
                        android:text=Rs 60.00
                        android:textColor=@android:color/white
                        android:textSize=@dimen/subscriptionPlanPrice
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toBottomOf=@+id/textView3 />

                    <TextView
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:layout_marginStart=8dp
                        android:layout_marginTop=8dp
                        android:layout_marginEnd=8dp
                        android:layout_marginBottom=32dp
                        android:fontFamily=@font/raleway_semibold
                        android:letterSpacing=0.3
                        android:text=@string/text_per_month
                        android:textColor=@android:color/white
                        android:textSize=@dimen/subscriptionPlanMonthly
                        app:layout_constraintBottom_toBottomOf=parent
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toBottomOf=@+id/textView6 />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </com.google.android.material.card.MaterialCardView>
        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.card.MaterialCardView
            android:id=@+id/cvMonthlyPlan
            android:layout_width=150dp
            android:layout_height=wrap_content
            android:layout_marginStart=8dp
            android:layout_marginEnd=8dp
            app:cardBackgroundColor=@android:color/transparent
            app:cardCornerRadius=14dp
            app:cardElevation=0dp
            app:layout_constraintBottom_toBottomOf=@+id/cvAnnualPlan
            app:layout_constraintEnd_toEndOf=parent

            app:layout_constraintStart_toEndOf=@+id/cvAnnualPlan
            app:layout_constraintTop_toTopOf=@+id/cvAnnualPlan
            app:strokeColor=@color/darkBlue
            app:strokeWidth=3dp>

            <com.google.android.material.card.MaterialCardView
                android:layout_width=match_parent
                android:layout_height=wrap_content
                android:layout_margin=2dp
                app:cardBackgroundColor=@color/subscriptionCardBackgroundColor
                app:cardCornerRadius=12dp
                app:cardElevation=0dp>

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


                    <TextView
                        android:id=@+id/textView8
                        android:layout_width=0dp
                        android:layout_height=wrap_content
                        android:padding=8dp
                        android:textSize=12sp
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toTopOf=parent />

                    <TextView
                        android:id=@+id/textView44
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:layout_marginStart=8dp
                        android:layout_marginTop=32dp
                        android:layout_marginEnd=8dp
                        android:fontFamily=@font/raleway_semibold
                        android:letterSpacing=0.3
                        android:text=MONTHLY
                        android:textColor=@color/lightYellow
                        android:textSize=@dimen/subscriptionPlanTitle
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toBottomOf=@+id/textView8 />

                    <TextView
                        android:id=@+id/textView66
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:layout_marginStart=8dp
                        android:layout_marginTop=16dp
                        android:layout_marginEnd=8dp
                        android:fontFamily=@font/roboto_bold
                        android:text=Rs 70.00
                        android:textColor=@android:color/white
                        android:textSize=@dimen/subscriptionPlanPrice
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toBottomOf=@+id/textView44 />

                    <TextView
                        android:layout_width=wrap_content
                        android:layout_height=wrap_content
                        android:layout_marginStart=8dp
                        android:layout_marginTop=8dp
                        android:layout_marginEnd=8dp
                        android:layout_marginBottom=32dp
                        android:fontFamily=@font/raleway_semibold
                        android:letterSpacing=0.3
                        android:text=@string/text_per_month
                        android:textColor=@android:color/white
                        android:textSize=@dimen/subscriptionPlanMonthly
                        app:layout_constraintBottom_toBottomOf=parent
                        app:layout_constraintEnd_toEndOf=parent
                        app:layout_constraintStart_toStartOf=parent
                        app:layout_constraintTop_toBottomOf=@+id/textView66 />

                </androidx.constraintlayout.widget.ConstraintLayout>

            </com.google.android.material.card.MaterialCardView>
        </com.google.android.material.card.MaterialCardView>

        <TextView
            android:id=@+id/textView9
            android:layout_width=0dp
            android:layout_height=wrap_content
            android:layout_marginStart=8dp
            android:layout_marginTop=16dp
            android:layout_marginEnd=8dp
            android:letterSpacing=0.3
            android:text=@string/text_subscription_feature_4
            android:textAlignment=center
            android:textColor=@color/subscriptionFeaturesColor
            android:textSize=@dimen/subscriptionFeaturesSize
            app:layout_constraintEnd_toEndOf=parent
            app:layout_constraintStart_toStartOf=parent
            app:layout_constraintTop_toBottomOf=@+id/cvAnnualPlan />

        <TextView
            android:id=@+id/textView10
            android:layout_width=0dp
            android:layout_height=wrap_content
            android:layout_marginTop=8dp
            android:letterSpacing=0.3
            android:text=@string/text_subscription_feature_5
            android:textAlignment=center
            android:textColor=@color/subscriptionFeaturesColor
            android:textSize=@dimen/subscriptionFeaturesSize
            app:layout_constraintEnd_toEndOf=@+id/textView9
            app:layout_constraintStart_toStartOf=@+id/textView9
            app:layout_constraintTop_toBottomOf=@+id/textView9 />

        <TextView
            android:layout_width=0dp
            android:layout_height=wrap_content
            android:layout_marginStart=8dp
            android:layout_marginTop=8dp
            android:layout_marginBottom=16dp
            android:fontFamily=@font/raleway_semibold
            android:letterSpacing=0.3
            android:text=@string/button_logout
            android:textAlignment=center
            android:textColor=@color/logoutButtonColor
            android:textSize=@dimen/subscriptionFeaturesSize
            app:layout_constraintBottom_toBottomOf=parent
            app:layout_constraintEnd_toEndOf=@+id/textView10
            app:layout_constraintStart_toStartOf=@+id/textView10
            app:layout_constraintTop_toBottomOf=@+id/textView10 />

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

<Button
    android:id=@+id/button
    style=@style/UnelevatedButton
    android:layout_width=0dp
    android:layout_height=wrap_content
    android:text=@string/button_subscribe
    app:layout_constraintBottom_toBottomOf=parent
    app:layout_constraintEnd_toEndOf=parent
    app:layout_constraintStart_toStartOf=parent />

    </androidx.constraintlayout.widget.ConstraintLayout>

Sorun ilk iki TextView'lar kırpılmış alıyorsanız ve gereksiz bir dolgu NestedScrollView altındaki eklenir olmasıdır.

Bir benzer böcek birkaç ay önce açılmıştı ama henüz çözülmüş değil düşünüyorum.

Benzer sorular önceden sorulmuş, ama bunun için uygun bir çözüm bulmak mümkün değil.

Oluştur 20/10/2018 saat 14:23
kaynak kullanıcı
Diğer dillerde...                            


2 cevaplar

oy
1

Bu Sonucu deneyin https://www.youtube.com/watch?v=PTnbzCbgBTE

  <androidx.constraintlayout.widget.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/clProfileFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/appCompatImageView8"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:scaleType="fitXY"
            android:adjustViewBounds="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHeight_percent="0.7"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@color/colorAccent" />


        <de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/ivProfileFragment"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:src="@drawable/ic_launcher_nilesh"
            android:visibility="visible"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/tvUserName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:letterSpacing="0.2"
            android:textAlignment="center"
            app:layout_constraintBottom_toBottomOf="@+id/ivProfileFragment"
            app:layout_constraintStart_toEndOf="@+id/ivProfileFragment"
            app:layout_constraintTop_toTopOf="@+id/ivProfileFragment"
            android:text="Mehul Kanzriya" />


        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/ivCloseProfileFragment"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:layout_marginTop="16dp"
            android:layout_marginEnd="16dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_drawer" />

        <androidx.core.widget.NestedScrollView
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:clipToPadding="true"
            android:fillViewport="true"
            android:fitsSystemWindows="true"
            app:layout_constraintBottom_toTopOf="@id/button"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/ivProfileFragment">

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

                <TextView
                    android:id="@+id/textView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="32dp"
                    android:layout_marginEnd="8dp"
                    android:letterSpacing="0.3"
                    android:text="text_subscribe"
                    android:textSize="18sp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/textView2"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="16dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginEnd="16dp"
                    android:letterSpacing="0.3"
                    android:text="text_subscription_feature_1"
                    android:textAlignment="center"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/textView" />

                <TextView
                    android:id="@+id/textView4"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:letterSpacing="0.3"
                    android:text="text_subscription_feature_2"
                    android:textAlignment="center"
                    app:layout_constraintEnd_toEndOf="@+id/textView2"
                    app:layout_constraintStart_toStartOf="@+id/textView2"
                    app:layout_constraintTop_toBottomOf="@+id/textView2" />

                <TextView
                    android:id="@+id/textView5"
                    android:layout_width="0dp"
                    android:layout_height="16dp"
                    android:layout_marginTop="8dp"
                    android:letterSpacing="0.3"
                    android:text="text_subscription_feature_3"
                    android:textAlignment="center"
                    app:layout_constraintEnd_toEndOf="@+id/textView4"
                    app:layout_constraintStart_toStartOf="@+id/textView4"
                    app:layout_constraintTop_toBottomOf="@+id/textView4" />

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/appCompatImageView2"
                    android:layout_width="350dp"
                    android:layout_height="168dp"
                    android:layout_marginTop="32dp"
                    app:layout_constraintEnd_toEndOf="@+id/textView5"
                    app:layout_constraintStart_toStartOf="@+id/textView5"
                    app:layout_constraintTop_toBottomOf="@+id/textView5"
                    app:srcCompat="@mipmap/ic_launcher_round" />

                <com.google.android.material.card.MaterialCardView
                    android:id="@+id/cvAnnualPlan"
                    android:layout_width="150dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="16dp"
                    android:layout_marginTop="16dp"
                    app:cardBackgroundColor="@android:color/transparent"
                    app:cardCornerRadius="14dp"
                    app:cardElevation="0dp"
                    app:layout_constraintEnd_toStartOf="@+id/cvMonthlyPlan"
                    app:layout_constraintHorizontal_chainStyle="spread"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/appCompatImageView2"
                    app:strokeWidth="3dp">

                    <com.google.android.material.card.MaterialCardView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="2dp"
                        app:cardCornerRadius="12dp"
                        app:cardElevation="0dp">

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


                            <TextView
                                android:id="@+id/textView7"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:letterSpacing="0.1"
                                android:padding="8dp"
                                android:text="text_subscription_most_popular"
                                android:textAlignment="center"
                                android:textColor="@android:color/white"
                                android:textSize="12sp"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <TextView
                                android:id="@+id/textView3"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="32dp"
                                android:layout_marginEnd="8dp"
                                android:letterSpacing="0.3"
                                android:text="ANNUAL"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/textView7" />

                            <TextView
                                android:id="@+id/textView6"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="16dp"
                                android:layout_marginEnd="8dp"
                                android:text="Rs 60.00"
                                android:textColor="@android:color/white"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/textView3" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="8dp"
                                android:layout_marginEnd="8dp"
                                android:layout_marginBottom="32dp"
                                android:letterSpacing="0.3"
                                android:text="text_per_month"
                                android:textColor="@android:color/white"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/textView6" />

                        </androidx.constraintlayout.widget.ConstraintLayout>

                    </com.google.android.material.card.MaterialCardView>
                </com.google.android.material.card.MaterialCardView>

                <com.google.android.material.card.MaterialCardView
                    android:id="@+id/cvMonthlyPlan"
                    android:layout_width="150dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:layout_marginEnd="8dp"
                    app:cardBackgroundColor="@android:color/transparent"
                    app:cardCornerRadius="14dp"
                    app:cardElevation="0dp"
                    app:layout_constraintBottom_toBottomOf="@+id/cvAnnualPlan"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@+id/cvAnnualPlan"
                    app:layout_constraintTop_toTopOf="@+id/cvAnnualPlan"
                    app:strokeWidth="3dp">

                    <com.google.android.material.card.MaterialCardView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="2dp"
                        app:cardCornerRadius="12dp"
                        app:cardElevation="0dp">

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


                            <TextView
                                android:id="@+id/textView8"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:padding="8dp"
                                android:textSize="12sp"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <TextView
                                android:id="@+id/textView44"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="32dp"
                                android:layout_marginEnd="8dp"
                                android:letterSpacing="0.3"
                                android:text="MONTHLY"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/textView8" />

                            <TextView
                                android:id="@+id/textView66"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="16dp"
                                android:layout_marginEnd="8dp"
                                android:text="Rs 70.00"
                                android:textColor="@android:color/white"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/textView44" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="8dp"
                                android:layout_marginTop="8dp"
                                android:layout_marginEnd="8dp"
                                android:layout_marginBottom="32dp"
                                android:letterSpacing="0.3"
                                android:text="text_per_month"
                                android:textColor="@android:color/white"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/textView66" />

                        </androidx.constraintlayout.widget.ConstraintLayout>

                    </com.google.android.material.card.MaterialCardView>
                </com.google.android.material.card.MaterialCardView>

                <TextView
                    android:id="@+id/textView9"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginEnd="8dp"
                    android:letterSpacing="0.3"
                    android:text="text_subscription_feature_4"
                    android:textAlignment="center"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/cvAnnualPlan" />

                <TextView
                    android:id="@+id/textView10"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:letterSpacing="0.3"
                    android:text="text_subscription_feature_5"
                    android:textAlignment="center"
                    app:layout_constraintEnd_toEndOf="@+id/textView9"
                    app:layout_constraintStart_toStartOf="@+id/textView9"
                    app:layout_constraintTop_toBottomOf="@+id/textView9" />

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="8dp"
                    android:layout_marginBottom="16dp"
                    android:letterSpacing="0.3"
                    android:text="button_logout"
                    android:textAlignment="center"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="@+id/textView10"
                    app:layout_constraintStart_toStartOf="@+id/textView10"
                    app:layout_constraintTop_toBottomOf="@+id/textView10" />

            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.core.widget.NestedScrollView>

        <Button
            android:id="@+id/button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="button_subscribe"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>
Cevap 24/10/2018 saat 09:26
kaynak kullanıcı

oy
0

Bir göz atın android:layout_gravity="center"üzerinde ConstraintLayoutiç içe geçmiş NestedScrollView. Deneyin ya bu niteliği kaldırmak ya da ayarlı android:layout_gravity="center_horizonal". Bunun bir ortalamak için ne anlama geldiğini tam olarak emin değilim Viewbir dikey NestedScrollView.

Cevap 23/10/2018 saat 13:36
kaynak kullanıcı

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more