Android 不向上滚动片段的布局
我有一个带有一些首选项的布局。它在纵向上正常工作,但在横向上不正常。我希望使用swiperefreshlayout刷新此布局,并且确实有效。但正如我在标题中所说,它不会向上滚动 我一直在玩一个普通的线性布局,一个相对的布局,使用SwiperFreshLayout作为根视图,玩权重。。。但什么都没有。它要么无法向上滚动,要么无法正确显示首选项(仅显示第一个标题)。不知道还有什么可以尝试的 我还应该说,我希望这个屏幕在底部保持线性布局,固定在那里。因此,只有首选项才会滚动 以下是我现在的情况:Android 不向上滚动片段的布局,android,scroll,fragment,swiperefreshlayout,Android,Scroll,Fragment,Swiperefreshlayout,我有一个带有一些首选项的布局。它在纵向上正常工作,但在横向上不正常。我希望使用swiperefreshlayout刷新此布局,并且确实有效。但正如我在标题中所说,它不会向上滚动 我一直在玩一个普通的线性布局,一个相对的布局,使用SwiperFreshLayout作为根视图,玩权重。。。但什么都没有。它要么无法向上滚动,要么无法正确显示首选项(仅显示第一个标题)。不知道还有什么可以尝试的 我还应该说,我希望这个屏幕在底部保持线性布局,固定在那里。因此,只有首选项才会滚动 以下是我现在的情况: &l
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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" >
<LinearLayout
android:id="@+id/edittexts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:elevation="8dp"
android:background="@color/primary"
android:visibility="gone"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/setwallpaperbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="onActivarClick"
android:text="@string/setwallpaperbuton"
android:visibility="gone"
android:clickable="true"
android:enabled="true"/>
<EditText
android:id="@+id/edittextlocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="2dp"
android:textColor="@android:color/white"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center"
android:layout_gravity="center"
android:inputType="textMultiLine"
android:maxLines="2"
android:background="@android:color/transparent"
android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText
android:id="@+id/edittextupdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="2dp"
android:textColor="@android:color/white"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center"
android:layout_gravity="center"
android:inputType="text"
android:background="@android:color/transparent"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/swipelayout"
android:isScrollContainer="true"
android:layout_alignParentTop="true"
android:layout_above="@+id/edittexts">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<fragment
android:name="es.jnsoft.nowweather.PreferencesFragment"
android:id="@+id/preferencesfragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@xml/settings"/>
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>
提前感谢。根据
[SwipeRefreshLayout]应成为将要创建的视图的父视图
由于该手势而刷新,并且只能支持一个直接
孩子
布局中违反了此子句