saycoo / droidar

Automatically exported from code.google.com/p/droidar
0 stars 0 forks source link

Not able to add title text to the spawned object #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When spawning an object , i wanted to show an image for the object along with a 
title. I tried calling spawnobject as below
Bitmap icon = 
BitmapFactory.decodeResource(getApplicationContext().getResources(),
                        R.drawable.myimage);
                spawnObj(poi, GLFactory.getInstance().newTexturedSquare("MYIcon",icon,5));

This will place the "icon" when object is spawned . But do not showany text . I 
expect "MYIcon" text also displayed along with the icon.

Can you please look in to this issue and please give a solution.

I am using real device with android version 2.3.5

Original issue reported on code.google.com by preetha...@gmail.com on 15 Aug 2012 at 7:32

GoogleCodeExporter commented 9 years ago
I improved the java doc for the methods you used. The texture name is not a 
text that will be displayed for the texture, its just a unique string that is 
used to identify the texture (for more details read the added javadoc).

I suggest you take a look at the example setups in the de.rwth.setups folder. 
One solution would be to create an android layout with the icon and the text 
centered below and use the IO.loadBitmapFromView(View v, int width, int heigth) 
method to create a bitman from this view. Then you could use this bitmap to 
create a textured square, there are examples in the code who do a similar job.

Original comment by simon.heinen on 15 Aug 2012 at 10:29

GoogleCodeExporter commented 9 years ago
Thank you very much for the quick support. I had a look at the example setups 
and is now using IO.loadBitmapFromView(View v, int width, int heigth) as you 
have explained. Now i am able to see the text and image. I am not able to see 
the java doc for these apis. I downloaded the library from svn . I dont see any 
javadoc link. Can you please share the link for javadoc.  Also is there a 
download that has only the library ( without examples / demo ). This is to 
check if i can reduce the size of the library to be added to my app. Thanks a 
lot for your support.

Original comment by preetha...@gmail.com on 16 Aug 2012 at 11:44