ScrollView:按钮完全不可见

时间:2016-02-22 18:31:39

标签: android android-layout button scrollview android-linearlayout

我的Android项目中有一个xml活动问题。 它是一个ScrollView,里面我有一个LinearLayout。在LinearLayout中,我添加了一个Button。 但按钮不完全可见。只有2px或类似。

<?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="match_parent">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/image_view_one"
        android:scaleType="fitCenter"
        android:adjustViewBounds="true"
        />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Titel"
        android:textSize="20dp"
        android:layout_gravity="center_horizontal"
        android:layout_margin="10dp"
        android:textColor="#000000"
        android:id="@+id/textview_titel"
        />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Content"
        android:textSize="15dp"
        android:layout_margin="10dp"
        android:textColor="#000000"
        android:id="@+id/textview_description"
        />

    <android.support.v7.widget.AppCompatButton
        android:id="@+id/btn_zum_gewinnspiel"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        android:padding="12dp"
        android:text="ZUM GEWINNSPIEL"
        android:background="?attr/colorPrimary"
        android:textSize="18dp"
        />

</LinearLayout>
</ScrollView>

1 个答案:

答案 0 :(得分:2)

bottomPadding中提供LinearLayout

相关问题