yes possible. In xml for every button set "onclick" property to same
method. then implement the method in activity.

ex:
<Button
                android:id="@+id/btn1"
                android:layout_width="50dp"
                android:layout_height="30dp"
                android:onClick="   somemethodname " />
<Button
                android:id="@+id/btn2"
                android:layout_width="50dp"
                android:layout_height="30dp"
                android:onClick="   somemethodname " />
<Button
                android:id="@+id/btn3"
                android:layout_width="50dp"
                android:layout_height="30dp"
                android:onClick="   somemethodname " />

In activity:

public void somemethodname( View v)
{
//write ur logic here.
}
It works :)

On Tue, Aug 28, 2012 at 5:57 PM, Haris <[email protected]> wrote:

>
>
>   Hai all......
>
> For my application I am using several buttons...
> Is it possible to listen multiple button at the same time..........
> Thanks.......
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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-developers?hl=en




-- 
Ramesh Aravelli

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to