Hi,
I have created a small app. Like by clicking a button the text is viewed. Now i am trying to do is, If my button name is A and by clicking a I want to list of some words stars wit A. Please tell me how to do that.
The following is my code.
[HIGH]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Creating Button variable
Button button = (Button) findViewById(R.id.bt);
//Adding Listener to button
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//Creating TextView Variable
TextView text = (TextView) findViewById(R.id.tv);
//Sets the new text to TextView (runtime click event)
text.setText("Apple");
}
});
}
[/HIGH]
Please help me how to list the words.
I have created a small app. Like by clicking a button the text is viewed. Now i am trying to do is, If my button name is A and by clicking a I want to list of some words stars wit A. Please tell me how to do that.
The following is my code.
[HIGH]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Creating Button variable
Button button = (Button) findViewById(R.id.bt);
//Adding Listener to button
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//Creating TextView Variable
TextView text = (TextView) findViewById(R.id.tv);
//Sets the new text to TextView (runtime click event)
text.setText("Apple");
}
});
}
[/HIGH]
Please help me how to list the words.