[android-beginners] Re: Re-locating a dialog

2009-11-02 Thread I82Much
http://stackoverflow.com/questions/1583237/androidui-related-questions

I am not aware of an API to change the position of a dialog. You may
be better served creating an activity and using
android:theme=@android:style/Theme.Dialog to make it look like a
dialog.

If you go that route, you will then be able to use all of the standard
techniques for placing widgets (e.g., images) wherever you like. -
commonsware


On Nov 2, 8:34 am, Mina Shokry minasho...@gmail.com wrote:
 Hello,

 I have an alert dialog which I got using AlertDialog.Builder
 (context).create(). When I call alertDialog.show(), it appears
 centered on screen (horizontally and vertically).

 Can I control its position? for example, I want to make it appear on
 top of screen to still show its parent window.
 How could this be done?

 thanks in advance.

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


[android-beginners] Re: how to load the related Bitmap according to input

2009-10-07 Thread I82Much

I take it you're looking for something a little more scalable than the
naive solution:

switch (input) {
case 1:
return R.drawable.pic_1;
. . .
case n:
return R.drawable.pic_n;
}

I see the problem; you need to append an arbitrary number to the end
of a string, and then turn that into the R.drawable. ___ reference.
I'm stumped

On Oct 5, 11:08 pm, wine lzlzj...@163.com wrote:
 hi,

 I have met an issue.
 There are some pics in the res/drawable named as pic_1.png, pic_2.png,
 pic_3.png, pic_4.png I want to load someone according to the
 input.
 For instance, if I input 2, I want to load pic_2.png. If input 3, will
 load the pic_3.png
 How to achieve? Need your expert help here...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: how to load the related Bitmap according to input

2009-10-07 Thread I82Much

I suppose you could also do something like

int[] iconRefs = {
R.drawable.pic_1,
...
R.drawable.pic_n
}

if (input = 0  input  n) {
// Account for 0 based indexing
return iconRefs[input - 1];
}

This code gets the reference out (I might be wrong in how you
reference it, maybe R.res.drawable, don't have my eclipse handy);
you'd have to use the standard way of actually getting that drawable
image.

On Oct 5, 11:08 pm, wine lzlzj...@163.com wrote:
 hi,

 I have met an issue.
 There are some pics in the res/drawable named as pic_1.png, pic_2.png,
 pic_3.png, pic_4.png I want to load someone according to the
 input.
 For instance, if I input 2, I want to load pic_2.png. If input 3, will
 load the pic_3.png
 How to achieve? Need your expert help here...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: how to download an image?

2009-09-08 Thread I82Much

http://asantoso.wordpress.com/2008/03/07/download-and-view-image-from-the-web/

On Sep 5, 2:56 am, mmkr manutd...@gmail.com wrote:
 Hai,

 I'm developing an application where i need to auto download an image
 (any random image, preferred if first image of the first page) from
 google image search(the search name will be given) directly on to my
 avd card.

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