R
R
ratatyq2016-11-17 12:49:06
Java
ratatyq, 2016-11-17 12:49:06

How to make a simple button interaction as a picture on android?

Hello, how can I implement some kind of action on pressing a button, and how can I do it as easily as possible (what would be as little code as possible)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
glnix, 2016-11-17
@glnix

findViewById(R.id.btn).setOnClickListener(new OnClickListener(){
        @Override
        public void onClick(View v){
             // TODO
        }
    });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question