【发布时间】:2018-07-02 00:57:23
【问题描述】:
我在另一个linearlayout 中有一个linearlayout 和一个textview。显示内部的linearlayout,但问题是最后一个textview 没有显示。为什么?
我有一个LinearLayout,在FrameLayout 内部,在SwipeRefreshLayout 内部,在中间有一个TextVeiw,但问题是TextView 在我在应用程序中模拟时没有显示。这是为什么呢?
<LinearLayout 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/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".SearchResults">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/content">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="50dp"
android:text="EXAMPLE TEXT" />
</android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout>
下图……
【问题讨论】:
-
您能提供完整的布局文件吗?您放置的布局正在我的演示中显示文本视图
标签: java android android-layout android-framelayout