Skip to content Skip to sidebar Skip to footer

Image Button Not Working With Scrollview?

Why is back_search image button not working?

Solution 1:

you need to setonclicklistener to the button.

ImageButtonb= (ImageButton) findViewById(R.id.back_search);
        b.setOnClickListener(newOnClickListener() {

            @OverridepublicvoidonClick(View v) {
                  //do something
            }
        });

declaring it in xml it is not enough, in xml you define the look of the button but in the code you must specify the actions

Post a Comment for "Image Button Not Working With Scrollview?"