Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to use setonclicklistener from custom view in android

View view = inflate(getContext(), R.layout.layout_my_custom_view, this);

view.findViewById(R.id.theparent).setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View view) {
            performClick();
        }
    });
 
PREVIOUS NEXT
Tagged: #setonclicklistener #custom #view #android
ADD COMMENT
Topic
Name
7+4 =