スクロールビューがルートタグとして含まれている場合、画面を2つに正確に分割する行区切り文字は表示されません。それ以外の場合は正常に動作します。スクロールビュー内で行セパレータが機能しないAndroid
ここは私のレイアウトファイルです。
<ScrollView 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">
<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"
tools:context=".MainActivity">
<LinearLayout
android:id="@+id/firstLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toLeftOf="@+id/secondView"
android:orientation="vertical"
android:paddingLeft="8dp">
<TextView
android:id="@+id/Goals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="15dp"
android:fontFamily="sans-serif-smallcaps"
android:text="Goals Scored- MANU"
android:textSize="18sp" />
<Button
android:id="@+id/AddButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="+" />
<Button
android:id="@+id/SubButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="-" />
<TextView
android:id="@+id/Fouls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:fontFamily="sans-serif-smallcaps"
android:text="Fouls"
android:textSize="18sp" />
<Button
android:id="@+id/AddButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="+" />
<Button
android:id="@+id/SubButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
<TextView
android:id="@+id/goalsscoredteamone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textStyle="bold" />
<TextView
android:id="@+id/foulsmadeteamone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textStyle="bold" />
</LinearLayout>
<View
android:id="@+id/secondView"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:background="#000000" />
<LinearLayout
android:id="@+id/thirdLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/secondView"
android:orientation="vertical"
android:paddingLeft="8dp">
<TextView
android:id="@+id/Goalsteam2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="15dp"
android:fontFamily="sans-serif-smallcaps"
android:text="Goals Scored MANC"
android:textSize="18sp" />
<Button
android:id="@+id/AddButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="+" />
<Button
android:id="@+id/SubButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="-" />
<TextView
android:id="@+id/Foulsteam2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:fontFamily="sans-serif-smallcaps"
android:text="Fouls"
android:textSize="18sp" />
<Button
android:id="@+id/AddButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:text="+" />
<Button
android:id="@+id/SubButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
<TextView
android:id="@+id/goalsscoredteamtwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textStyle="bold" />
<TextView
android:id="@+id/foulsmadeteamtwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
周りに必要な作業または任意の可能な解決策?
我々はいけない、あなたの完全なXMLは、我々が想定する必要があるので、ラインセパレーター –
を魔法の力を持っている投稿あなたはすべてをあなたの行で完璧にして、論理を説明していると思います。別の時間を待って、あなたがこのようにすれば答えが得られません:D –
のためにトラブルになり、変数ではなく、一定の高さとスクロールビューの高さを行いますので、私はちょうどこの背後にある論理を求めていますここ –