我想做一個scrollView的整個視圖,但scrollView不滾動。Android的滾動視圖不滾動
請幫我:)
這裏是我的XML代碼:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="40dp"
android:padding="20dp"
android:background="@android:color/white"
android:id="@+id/mainlayout"
>
////some content here
</LinearLayout>
</ScrollView>
你的linearlayout裏面有什麼內容?裏面有recyclerview嗎? – ZeroOne
其:android.support.design.widget.TextInputLayout – user3693265
scrollview會影響如果裏面的視圖裏面的linearlayout超出設備視圖..試着把更多的視圖放在裏面.. – ZeroOne