Skip to content Skip to sidebar Skip to footer

Button And Click Display

I have tried Everything to my knowledge and nothing seems to work. Any help would be appreciated. import android.app.Activity; import android.support.v7.app.AppCompatActivity; impo

Solution 1:

you onClick() listener is wrong. try this one

btnCount.setOnClickListener(new View.OnClickListener() {
                                @Override
                                public void onClick(View v) {
                                   count++;
                                   txtCount.setText(String.valueOf(count));
                                }
                            });

Post a Comment for "Button And Click Display"