0

assist_update_btn を画面の下部に揃えようとしていますが、そうは見えません。何らかの理由で TextView のすぐ下にあり、何らかの理由で画面の下部に整列していません。

どんな入力でも大歓迎です。

<?xml version="1.0" encoding="utf-8"?>
<!-- LinearLayout allows border to expand to entire screen -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical" >
>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent" >

            <TextView
                android:id="@+id/apn_app_text_cta2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="18sp"
                android:layout_marginTop="30sp"
                android:layout_marginLeft="30sp"
                android:layout_marginRight="30sp"
                android:textColor="#000000"
                android:text="@string/apn_app_text_cta2"/>


            <ImageView
                android:id="@+id/assist_update_btn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/apn_app_text_cta2"
                android:layout_alignParentBottom="true"
                android:layout_centerHorizontal="true"
                android:src="@drawable/btn_next_inactivei" />

        </RelativeLayout>

</ScrollView>
4

3 に答える 3

1

android:fillViewport="true"レイアウトで以下のコードを試してください。追加され、からScrollView削除され ましたandroid:layout_below="@+id/apn_app_text_cta2"ImageView

<!-- LinearLayout allows border to expand to entire screen -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"

 >


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent" >

            <TextView
                android:id="@+id/apn_app_text_cta2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="18sp"
                android:layout_marginTop="30sp"
                android:layout_marginLeft="30sp"
                android:layout_marginRight="30sp"
                android:textColor="#000000"
                android:text="@string/apn_app_text_cta2"/>


            <ImageView
                android:id="@+id/assist_update_btn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_centerHorizontal="true"
                android:src="@drawable/btn_next_inactivei"/>

        </RelativeLayout>

</ScrollView>

これはうまくいくはずです

于 2013-10-11T18:52:33.937 に答える
0

これは、ScrollViewがscrollviewandroid:fillViewport="true"に設定された画面全体をラップせず、それを達成するために削除android:layout_below="@+id/apn_app_text_cta2"するために発生ImageViewします。

于 2013-10-11T18:46:01.713 に答える
0

これはこの行のせいです

android:layout_below="@+id/apn_app_text_cta2"

それを削除すると、期待される結果が得られるはずです。その行は、親の下部に揃えることと競合しています。

于 2013-10-11T18:40:31.010 に答える