تکرار تولبار یک فرگمنت

پرسیده شده
فعالیت 1072 روز پیش
دیده شده 443 بار
0

با سلام و وقت بخیر

سوال در رابطه با تکرار شدن تولبار فرگمنت مین به فرگمنت دیتل نمیدونم چرا در فرگمنت بعدی مجدد نمایش میدهد .

حتی تولبار مین رو حذف کردم همچی درسته در فرگمنت دیتل ولی اضافه مینم در صفحه دیگه انگار اورراید میشه 

بگراد رو هم تغییر دادم نشدش و تم رو هم NoActionBar و لایت هس و بازم به همان صورته کدها رو درست زدم نمیدونم مشکل از کجاس عکس رو زمینه میکنم 

 

layout_detail.xml: 

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:contentScrim="#2B2B2B"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            >

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_collapseMode="parallax"
                android:src="@drawable/image_top"
                android:adjustViewBounds="true"/>

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar_detail_fragment"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin"/>

        </com.google.android.material.appbar.CollapsingToolbarLayout>
    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
        >
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            >

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Lorem Ipsum is simply dummy text"
                android:textColor="@color/black"
                android:textStyle="bold"
                android:textSize="18sp"
                android:layout_marginTop="12dp"
                android:layout_marginBottom="8dp"
                />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="@color/blue_dark"
                android:layout_marginBottom="12dp"
                android:text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged."
                />
        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
فایل پیوست

بهروز البرزی
بهروز البرزی

3 خرداد 00

0
حذف شده

سلام وقت بخیر بهروز جان

 

من مشکلی رو در صرف این کد مشاهده نکردم اما برات کد های صحیح رو پیوست میکنم تا ازشون استفاده کنی .

 

فایل پیوست
zzz.zip
4.07 KB

پوریا شفیعی

توسط

پوریا شفیعی

4 خرداد 00

حذف شده
مرسی پوریا جان مشکل برطرف شدش . یکی از دلایل بنظرم همون تگ فرگمنت که به frameLayout تو xml میایم ادد میکنیم بصورت ترزاکش رفتم الان اوکی شدش بازم چندبار اندروید استودیو و امولایتور رو ریست کردم تا اینکه یهو برطرف شدش ممنون بازم پوریا جان ;)
بهروز البرزی

4 خرداد 00

حذف شده
عجایب اندروید خواهش میکنم
پوریا شفیعی

5 خرداد 00