私はcontent_mainでナビゲーション・ドロワー・アクティビティを使用していますが、フラグメントで膨らんだ1つの線形レイアウトがあります。他のビューのスクロールでフラグメントのビューを隠す
content_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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/content_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="net.techdesire.khabargujarat.HomeActivity"
tools:showIn="@layout/app_bar_home">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fragment_container"/>
</RelativeLayout>
fragment_home.xml
<android.support.percent.PercentRelativeLayout
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"
tools:context="fragment.HomeFragment">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
app:layout_heightPercent="40%"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
app:layout_heightPercent="60%"
android:layout_below="@+id/viewpager">
<TextView
android:id="@+id/about"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="@string/about_khijadiya"
android:textAppearance="@style/TextAppearance.AppCompat.Large"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/about"
android:text="@string/dummy"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"/>
</RelativeLayout>
</android.support.percent.PercentRelativeLayout>
私は約という名前のTextViewに大きなコンテンツを持っています。 image.Firstのようにスクロール可能にしたいのですが、最初に全画面にスクロールしてください。また、aboutの内容がまだオーバーフローしている場合は、テキストビューをスクロール可能にしてください。スクロールが一番上に移動し、そこから下にスワイプすると、ビューページャが再び表示されます。
を。あなたは別の方法を説明しようとすることができますか? –