0

I have a Problem with one activity xml in my Android project. Its a ScrollView and inside i have a LinearLayout. In the LinearLayout i added a Button. But the button is not completely visible. Only 2px or like that.

<?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> 
4
  • 2px vertical? test with padding bottom in LinearLayout. I don't understand where is your ListView. Commented Feb 22, 2016 at 18:43
  • Sorry. I edit it, its a Linear Layout Commented Feb 23, 2016 at 7:10
  • well, I think that with marinbottom in the LinearLayout, it will work. Commented Feb 23, 2016 at 14:53
  • Yep. It works. Thanks Commented Feb 24, 2016 at 17:06

1 Answer 1

2

Give bottomPadding in LinearLayout.

Sign up to request clarification or add additional context in comments.

1 Comment

It doesnt work. I added android:paddingBottom="10dp"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.