xml - java.lang.IllegalStateException: Could not find a method in Android -


hi developing android application

in using onclick method call imageview.

my code in java file is:

public void deletesendmsg(view view) { // code } 

my xml file is:

<imageview     android:id="@+id/iv_delete_home_1"     android:layout_width="30px"     android:layout_height="40px"             android:src="@drawable/delete"      android:onclick="deletesendmsg"/> 

in got following exception:

java.lang.illegalstateexception: not find method deletesendmsg(view) in activity class android.app.application onclick handler on view class android.widget.imageview id 'iv_delete_home_1' 

how solve following exception , why occured please help.

thanks.

from layout

<imageview     android:id="@+id/iv_delete_home_1"     android:layout_width="30px"     android:layout_height="40px"             androidrc="@drawable/delete"      androidnclick="deletesendmsg"/> 

last 2 line wrong: change

androidrc="@drawable/delete" android:src="@drawable/delete"

androidnclick="deletesendmsg" android:onclick="deletesendmsg"/>


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -