は、私は私のレイアウトを設定している:SwipeRefreshLayout +別のビュー
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/my_toolbar" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.my.SubView
android:id="@+id/my_list_subview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white" />
</android.support.v4.widget.SwipeRefreshLayout>
<TextView
android:id="@+id/text_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/padding_medium"
android:layout_margin="@dimen/padding_medium"
android:text="Hello"
android:textSize="14sp"
android:maxLines="3"/>
</LinearLayout>
問題はSwipeRefreshLayoutが画面全体を占め、TextViewにはまったく表示されないということです。
テキスト・ビューである場合、上記画像における青い線です。私が行方不明のものはありますか?これは非常に単純な問題、その馬鹿だと思われる! @Tomar
layout_aboveを使用してRelativeLayoutを使用してレイアウトを下から上に構築してみてください。 –
いいえ、動作しません。いずれにせよ、スワイプリフレッシュレイアウトは、スペース全体を底まで占めたいと考えています。テキストビューを上に移動すると、正しく表示されますが、下には表示されません。 – GreenBee
1つのことは、親のレイアウトの高さをmatch_parentとします。 –