I want to use onclick 

I am using XML  as my language.

"
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android";

    xmlns:tools="http://schemas.android.com/tools";
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.roy.buttontest.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        android:id="@+id/textView" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Test Button"
        android:id="@+id/button"
        android:layout_below="@+id/textView"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="230dp"
        android:onClick="trialmodule"
        android:textColor="#bd3030" />

</RelativeLayout>


"


Where and what do I write for the procedure that will be executed for onclick . 


It can do anything such as just displaying some text.


Thanks



 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/4fbca365-17d5-47eb-ac64-06f80680bc3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to