Hi Rob,
That control is essentially an ImageButton that sends onclicks during
a longpresse. Like an ImageButton, you have to supply the background
images:
<ZoomButton android:id="@+id/zoomIn"
android:background="@android:drawable/btn_plus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ZoomButton android:id="@+id/zoomOut"
android:background="@android:drawable/btn_minus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
Unfortunately, it is not a self contained container for zooming.
You would have to handle zooming yourself in the buttons'
OnClickListeners. Without knowing your specific requirements, I'd
recommend extending a View and overriding onDraw. Within onDraw, you
can scale using the supplied Canvas.
Cheers,
James
On Wed, Jan 14, 2009 at 4:26 PM, [email protected]
<[email protected]> wrote:
>
> Hi,
>
> I'm very new to this board. Lots of stuff in here.
>
> I noticed the android.widget.ZoomButton. From the methods and
> listeners i can see it could potentially implement the view image
> image functionality which is currently present in the "Pictures"
> application.
>
> I was wondering if there is any code available anywhere to describe
> how the ZoomButton works. I am not sure how fun the implementation
> goes and I am unable to get it working despite it being a subclass of
> ImageView
>
> Any ideas?
>
> Thanks
> - Rob
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---