[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-22 Thread zeeshan

well, i removed the title bar and this make my image a bit large but
it still smaller in width.

i suppose this is because of status bar now :)

what resolution i need to have to fit my image on full screen if i
keep my status bar?


On May 21, 4:56 pm, bwilliam...@gmail.com bwilliam...@gmail.com
wrote:
 Do you have a title bar?  That takes up space.  So does the status bar
 (the one that shows time, signal, battery life, notifications, etc).

 On May 21, 6:20 am, zeeshan genx...@gmail.com wrote:

  Hi Experts,

  i am trying to display 480*320 image in fill_parent width and height
  but it doesn't fit on full screen.
  image seems a bit smaller in width.

  do i need to change resolution or something else, please advise

  thanks
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-22 Thread Dianne Hackborn
What are you trying to do?  You can't assume your content area is going to
be an exact pixel sizes, the status bar may have slightly different heights
on some devices, in the future there will be different screen sizes, etc.

If you want to have a background that doesn't stretch and don't mind it
getting cropped, you can set it to be the background of the window, where it
will be placed behind the status bar / ime / etc.  Longer term that is still
problematic, though, since there will be a variety of physical screen sizes.

On Fri, May 22, 2009 at 2:01 AM, zeeshan genx...@gmail.com wrote:


 well, i removed the title bar and this make my image a bit large but
 it still smaller in width.

 i suppose this is because of status bar now :)

 what resolution i need to have to fit my image on full screen if i
 keep my status bar?


 On May 21, 4:56 pm, bwilliam...@gmail.com bwilliam...@gmail.com
 wrote:
  Do you have a title bar?  That takes up space.  So does the status bar
  (the one that shows time, signal, battery life, notifications, etc).
 
  On May 21, 6:20 am, zeeshan genx...@gmail.com wrote:
 
   Hi Experts,
 
   i am trying to display 480*320 image in fill_parent width and height
   but it doesn't fit on full screen.
   image seems a bit smaller in width.
 
   do i need to change resolution or something else, please advise
 
   thanks
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread Robert Green

It depends on your layout.  probably the parent container is what is
too small somehow.  If you try putting that image into an empty frame
or absolute layout, it'll probably fill it right up.

Check for margins, padding or other things that could make the
container in the layout be smaller than you want.  Posting the layout
would probably be helpful for us.

Thanks

On May 21, 5:20 am, zeeshan genx...@gmail.com wrote:
 Hi Experts,

 i am trying to display 480*320 image in fill_parent width and height
 but it doesn't fit on full screen.
 image seems a bit smaller in width.

 do i need to change resolution or something else, please advise

 thanks
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread zeeshan

well, i am not using any margin or padding.
please take a look on my code below:

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android

android:layout_width=fill_parent
android:layout_height=fill_parent


ImageView android:id=@+id/Image
android:layout_width=fill_parent
android:layout_height=fill_parent

/

/LinearLayout

ImageView imageView;
 imageView=(ImageView)findViewById(R.id.Image);
InputStream is;
try {
is = getAssets().open(cover.png);

Bitmap bm = BitmapFactory.decodeStream(is);
imageView.setImageBitmap(bm);


} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

///

image size is 480*320




On May 21, 2:42 pm, Robert Green rbgrn@gmail.com wrote:
 It depends on your layout.  probably the parent container is what is
 too small somehow.  If you try putting that image into an empty frame
 or absolute layout, it'll probably fill it right up.

 Check for margins, padding or other things that could make the
 container in the layout be smaller than you want.  Posting the layout
 would probably be helpful for us.

 Thanks

 On May 21, 5:20 am, zeeshan genx...@gmail.com wrote:

  Hi Experts,

  i am trying to display 480*320 image in fill_parent width and height
  but it doesn't fit on full screen.
  image seems a bit smaller in width.

  do i need to change resolution or something else, please advise

  thanks
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why 480*320 png doesn't fit on landscape full screen

2009-05-21 Thread bwilliam...@gmail.com

Do you have a title bar?  That takes up space.  So does the status bar
(the one that shows time, signal, battery life, notifications, etc).

On May 21, 6:20 am, zeeshan genx...@gmail.com wrote:
 Hi Experts,

 i am trying to display 480*320 image in fill_parent width and height
 but it doesn't fit on full screen.
 image seems a bit smaller in width.

 do i need to change resolution or something else, please advise

 thanks
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---