For some reason my image button keeps overlapping. When i used the Scroll view at the top it worked correctly and everything was fine, but I dont want to scroll down to see how many times i clicked. I just want the text view at the bottom of the screen without the image button overlapping it,
What am I doing wrong?
this is me trying new things
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<!-- Stretching frame layout using weights will bring it to the bottom -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/pushme"
android:textSize="21sp"
android:gravity="center_horizontal|center_vertical"
android:textColor="#ff0005"
android:background="#ff99ff"
/>
<Button
android:id="@+id/button"
android:scaleType="fitCenter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/push"
/>
<FrameLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_gravity="bottom"
android:layout_weight="1"
android:layout_below="@+id/numClicked"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dip"
android:text="@string/numClicked"
android:background="#ffffffff"
android:textColor="#ff127223"
/>
</FrameLayout>
</LinearLayout>
now this is me with it working using scroll view, But I dont want scroll view
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
<!-- Stretching frame layout using weights will bring it to the bottom -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/pushme"
android:textSize="21sp"
android:gravity="center_horizontal|center_vertical"
android:textColor="#ff0005"
android:background="#ff99ff"
/>
<Button
android:id="@+id/button"
android:scaleType="fitCenter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/push"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_gravity="bottom"
android:layout_weight="1"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dip"
android:text="@string/numClicked"
android:background="#ffffffff"
android:textColor="#ff127223"
/>
Try this, I had to change some stuff to see it on my emulator, but you can get the gist of it.