0

I've made an app which will let the user input a URL, and the app will grab the source code of the webpage and display it. What I'm trying to do now is to create a search function (the user will be able to click "search" and input what they want to find in the text that's been displayed). I've been researching for a few hours and haven't found anything along the lines of what I'm looking for.

The problem I'm having is what function to actually use to get the searching done? I have a database setup and the idea of the app is for the search results to be stored in the database.

Any help would be appreciated! Thanks.

Stephen
  • 1
  • 1

1 Answers1

0

You should set an onClickListener, using your own implementation of onClickListener;

View.OnClickListener    _buttonListener = new View.OnClickListener(){
        @Override
        public void onClick(View v) {
                // do what you want here
        }
    };

and to attach it to the button:

button.setOnClickListener(_buttonListener);

Read more about it here (android documentation)

MByD
  • 135,866
  • 28
  • 264
  • 277
  • The problem I'm having is what function to actually use to get the searching done? I have a database setup and the idea of the app is for the search results to be stored in the database. – Stephen Mar 30 '11 at 16:02