I have a “Search” Button in my Options menu, which shows a Dialog with the Search Mask.
So when you click on the Search Button it should start the actual search.
What I’m trying to do in my onCreateDialog is:
Button search_button = (Button) dialog.findViewById(R.id.d_search_button);
search_button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
EditText text = (EditText) v.findViewById(R.id.d_search_text);
}
});
Which won’t work because text is null, so what is the best way to access the Search Text?
1 Answer