这是我的代码,我已经查看并尝试了其他人给出的所有解决方案但仍然不滚动?当我尝试滚动ScrollView时没有任何反应。我还尝试用' android:scrollbars =" horizontal"'
替换ScrollView<?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_height="match_parent"
android:layout_width="match_parent"
android:background="@drawable/bgstardust"
android:orientation="vertical"
android:weightSum="2"
style="@style/AppTheme.NoActionBar"
tools:context="com.example.cs_gage.brickbreaker.BackgroundActivity">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/button_outline_dark"
android:background="@drawable/bgblackdesign"
android:layout_margin="5dp" />
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/button_outline_dark"
android:background="@drawable/bgdarksquares"
android:layout_margin="5dp" />
...
</LinearLayout>
</ScrollView>
</LinearLayout>