Bind the pushpin on image

by Beena » Fri, 06 Aug 2010 14:05:11 GMT


Sponsored Links
 Hi all,
I have an image of 600x600. Which is scrollable horizontally and
vertically.
And then I have to add the pushpin at particular point.
I can plot the pushpin on it, but as I scroll horizontally then the
images are not stay at their position.
How can i bind pushpin at the particular pixel of the image?
Like google map, where images are clickable.

Any suggestion will help full.

--



Bind the pushpin on image

by Beena » Thu, 12 Aug 2010 14:21:14 GMT


 hi
Is there any one who can guide?




--


Sponsored Links


Bind the pushpin on image

by Frank Weiss » Fri, 13 Aug 2010 01:28:36 GMT


 I suppose you need to scroll the pushpin as well.

--



Bind the pushpin on image

by Farjad Habib » Fri, 13 Aug 2010 06:23:30 GMT


 use map layout...

I hope it can help...





>



Bind the pushpin on image

by Beena » Fri, 13 Aug 2010 17:52:08 GMT


 @Frank Weiss

I cant scroll the pushpin.

@Farjad Habib

I am not using any map api. This is image of building which shows
rooms/shop, where I can plot the small images on the main image of
building.

Hope you can understand.

Any suggestion?





> >



Bind the pushpin on image

by Frank Weiss » Sat, 14 Aug 2010 00:38:27 GMT


 >

I must be missing something then. You did say that the underlying
image is scrollable.

--



Bind the pushpin on image

by Beena » Sat, 14 Aug 2010 11:48:08 GMT


 Yes main image of size 600x600 is scrolling, but pushpin not.
Pushpin are plotted at their own point on the main image, so as I
scroll the main image the pushpin should stay at their position. Which
is not happening.
And I am not able to plot the pushpin on outside of the canvas. Eg. on
600x500, outside the canvas.
I want to bind pushpin at the particular point.
As I have mention earlier :
This is image of building which shows
rooms/shop, where I can plot the pushpin on the main image(scrollable
image) of
building.
Here the pushpin shows the rooms/shop and main image is of building.

Thanks.




--



Bind the pushpin on image

by Frank Weiss » Sat, 14 Aug 2010 12:26:54 GMT


 Perhaps you can give a sample of the code used to draw the image and
the pushpins?

--



Bind the pushpin on image

by Beena » Sat, 14 Aug 2010 16:41:05 GMT


 Here is the code:
==============

                        ScrollView sv = new ScrollView(this);
                        sv.setBackgroundColor(Color.WHITE);

                        AbsoluteLayout abl = new AbsoluteLayout(this);

                        HorizontalScrollView layout = new 
HorizontalScrollView(this);
                        LinearLayout.LayoutParams layoutParams = new
LinearLayout.LayoutParams(
                                       LinearLayout.LayoutParams.FILL_PARENT,
                                       LinearLayout.LayoutParams.FILL_PARENT);



                        String url ="Url of Main Image";// Take any big image
                        Bitmap bm = getImage(url);

                        ImageView iv = new ImageView(this);
                        iv.setImageBitmap(bm);
                        layout.addView(iv);

                        abl.addView(layout);

                        Bitmap bmp = 
BitmapFactory.decodeResource(getResources(),
R.drawable.pushpin); // Take any small image
                        final int bitmapWidth = bmp.getWidth();
                        final int bitmapHeight = bmp.getHeight();

                        for(int i=0;i<hashtable.size();i++){

                                Information information =  (Information) 
hashtable.get(i+"");

                                ImageView iv1 = new ImageView(this);
                                iv1.setAdjustViewBounds(true);
                                iv1.setImageBitmap(bmp);

                                AbsoluteLayout.LayoutParams alp = new
AbsoluteLayout.LayoutParams(20,20,x,y);
                                abl.addView(iv1,alp);
                        }

                        sv.addView(abl);

                        setContentView(sv);

Thanks,
Beena




--



Bind the pushpin on image

by Frank Weiss » Sun, 15 Aug 2010 01:52:28 GMT


 I think I see the problem in your code. The view hierarchy is:

sv (abl (layout(iv), iv1))

where sv is a ScrollView and layout is a HorizontalScrollView. Which
one actually does the scrolling? Have you tried this view hierarchy:

sv (abl (layout(iv, iv1)))

--



Bind the pushpin on image

by Beena » Mon, 16 Aug 2010 12:39:20 GMT


 Thanks Frank.

I just forgot basic thing.
How can I forgot this.
At last its done

Thanks for the help.
Its working fine now.

Thanks,
Beena






--



Bind the pushpin on image

by Frank Weiss » Mon, 16 Aug 2010 12:55:06 GMT


 It's gratifying to hear that I helped you. Thanks!

--



Other Threads

1. Tango Video calls

teman-2 , ada yang pernah pake tango video call ? http://www.tango.me/  , saya 
coba cari link nya http://androidfreeware.net/get-tango-video-calls.html
katanya ada di market , tapi saya cari kok nggak ada ? 





-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. Helppp... Touchpal tidak bisa ganti layout

Dear All,

Mau minta bantuan nih, touchpal saya ga bisa ganti layout nih. Saya
sudah centang option "swipe ti switch layout" di settingan touchpal.
ada yang tau kenapa dan cara benerinnya?
Thanks sebelumnya.

-- 
Best Regards,
Juwanda

Mobile & Internet Application
www.nuestotechnology.com
Advancing Innovation

Mobile Phone : 0817 221 639
Office  Phone : 022 - 60 943 439

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

3. Telephony Manager event off_hook is not giving callin number in emulator

4. Eclipse is only building the debug version

5. Android intent email support.

6. WebView and Response Processing

7. SoftKeyboard on HDTV