new to the forum and to Android. Jet I am super starting and this forum has already been a great help.
Since I couldn't find a solution to my problem on the net, here it goes. It basically displays a Toast message:
private void registerClickCallback() {
ListView list = (ListView) findViewById(R.id.listViewSettings);
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> paret, View viewClicked, int position, long id) {
TextView textView = (TextView) viewClicked;
String message = "You clicked #" + position + ", which is string: " + textView.getText().toString();
Toast.makeText(Configurations.this, message, Toast.LENGTH_SHORT.show();
}
});
}
I am getting two errors from this line:
Toast.makeText(Configurations.this, message, Toast.LENGTH_SHORT.show();
Cannot invoke show() on the primitive type int
Syntax error, insert ")" to complete Expression
Any ideas why ? I have used this expression just like that again with no errors...
Thanks everyone !