FrameLayout
およびTextView
は、ScrollView
に配置しても表示されません。 ViewPager
およびFrameLayout
は、異なるandroid.support.v4.app.Fragmentgments
に置き換えられています。 ViewPager
の末尾にFrameLayout
とTextView
が表示されます(画面の高さを超えるとスクロールした後)。viewPagerの最後に兄弟ビューを表示するにはどうすればよいですか?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/layout_appbar" />
<ScrollView
android:layout_height="match_parent"
android:fillViewport="true"
android:layout_width="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:layout_width="match_parent"
android:id="@+id/view_container"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_gravity="center_horizontal"
android:text="@string/app_name"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
'ViewPager'の下部に永続的なビューを表示したい場合は、' ViewPager'の中に 'android:layout_above =" @ + id/bottomView' xml属性を追加し、 'android:layout_alignParentBottom = – Sabeeh
上記の解決策では、 'viewPager'が下のビューの上にスクロールしていますが、スクロール後に' viewPager'の最後に下のビューを表示したいのですが、 –
あなたの答えは、私がそれを追加させてください。 – Sabeeh