我是android的新手,正在開(kāi)發(fā)一個(gè)應(yīng)用程序,但遇到一個(gè)錯(cuò)誤,這使我發(fā)瘋。問(wèn)題是它不能完全滾動(dòng),它使屏幕上沒(méi)有按鈕,因此無(wú)法看到它。Scrollview在每個(gè)活動(dòng)中都可以正常工作,但在選項(xiàng)卡式活動(dòng)中不起作用。android:layout_height="match_parent"如果我將match-parent的高度更改為500dp或任何整數(shù)值,則此代碼會(huì)出現(xiàn)問(wèn)題。我想知道為什么配偶不起作用。我已經(jīng)嘗試過(guò)對(duì)這個(gè)問(wèn)題進(jìn)行所有建議的編輯,但是仍然沒(méi)有任何編輯工作。這是我的XML文件<RelativeLayout 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:layout_width="match_parent"android:layout_height="match_parent"android:background="@mipmap/back"android:paddingBottom="10dp"android:paddingLeft="16dp"android:paddingRight="16dp"android:paddingTop="5dp"tools:context="com.example.sahil.bloodbank.first"><ScrollView android:id="@+id/sc1" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" android:scrollbars="vertical"><LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"><TextView android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:textSize="20sp" android:text="Welcome,"/> <ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@mipmap/wall1" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <TextView android:id="@+id/desc" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/imageView" android:gravity="center" android:text="@string/data" android:textAlignment="gravity" android:textColor="@color/data" android:textSize="17sp" />
添加回答
舉報(bào)
0/150
提交
取消