I want to do something like instagram app.Like when someone input in a comment like "please see #abcd" it will generate some link on the particular abcd and will also change the color.The other text will remain the same.I am not getting the idea about how to do it.I have tried something like this...
com.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
// if keydown and "enter" is pressed
if ((event.getAction() == KeyEvent.ACTION_DOWN)
&& (keyCode == KeyEvent.KEYCODE_ENTER)) {
Toast.makeText(c, com.getText().toString(), Toast.LENGTH_LONG).show();
return true;
}
return false;
}
});
0 comments:
Post a Comment