0

Hello i am using following xml to create some sort of Transparent panel . The problem i am facing is that the background image ac zoom up , i mean its height get increase , the other thing i would like to know how can i bring this frame in the middle and adjust its width . I have followed this example

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <ImageView  
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 

        android:scaleType="center"
        android:src="@drawable/ac" />

    <TextView
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_marginBottom="20dip"
        android:layout_gravity="center_horizontal|bottom"

        android:padding="12dip"

        android:background="#AA000000"
        android:textColor="#ffffffff"

        android:text="test test test" />

</FrameLayout>
umar
  • 3,073
  • 5
  • 35
  • 45

1 Answers1

1

For your ImageView have a look at ScaleType

Try:

 android:scaleType="fitXY"

If you want to center your Views have a look at Layout Gravity

Community
  • 1
  • 1
Blundell
  • 75,855
  • 30
  • 208
  • 233