Friday, March 9, 2012

Re: [android-developers] Background and foreground image views

Ok, I tried the frame layout.
 
And my XML file is something like this:
 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
   
 
     <ImageView
       
         android:scaleType="fitXY"
        android:src="@drawable/sbk"
        android:contentDescription="@string/app_name"
        android:layout_gravity="fill"
        android:id="@+id/bk"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
         />
 
 
    <ImageView
        android:layout_gravity="center"
        android:id="@+id/fg"
                android:padding="2dip"
        android:scaleType="fitCenter"
        android:src="@drawable/sfg"
        android:contentDescription="@string/app_name"
        android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
   
</FrameLayout>
 
 
Now it did work on my phone.
But it still doesn't behave well on my 7" tablet.
 
My first problem is that it doesn't fill the entire screen. Why is that?
I have mentioned "fill_parent" for the frame layout.
 
 

On Friday, March 9, 2012 2:07:57 AM UTC+5:30, MagouyaWare wrote:
Or you can just display an image view and set the background and foreground to what you want them to be...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 8, 2012 at 5:42 AM, sha m <temptest05@gmail.com> wrote:
FrameLayout helps to draw one view above another



On Thu, Mar 8, 2012 at 6:10 PM, Put_tiMe <puttime@gmail.com> wrote:
I need to have a background and a foreground image views in a LinearLayout.
 
Obviously the background has to be drawn before the foreground.
 
How can I do it?
 
 

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


On Friday, March 9, 2012 2:07:57 AM UTC+5:30, MagouyaWare wrote:
Or you can just display an image view and set the background and foreground to what you want them to be...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Mar 8, 2012 at 5:42 AM, sha m <temptest05@gmail.com> wrote:
FrameLayout helps to draw one view above another



On Thu, Mar 8, 2012 at 6:10 PM, Put_tiMe <puttime@gmail.com> wrote:
I need to have a background and a foreground image views in a LinearLayout.
 
Obviously the background has to be drawn before the foreground.
 
How can I do it?
 
 

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment