public void onClick (View v){
if (v.getId() == R.id.btnUp) {
}
if (v.getId() == R.id.btnDown) {
int start = txtInput.getSelectionStart();
int haha = start / 2;
int hehe = haha / 2;
int samp = haha + hehe;
Log.e("up", samp + "");
if (start >= 1 && samp >= 1) {
txtInput.setSelection(samp);
Log.e("up", samp + "");
}
}
if (v.getId() == R.id.btnLeft) {
int start = txtInput.getSelectionStart();
if (start >= 1) {
txtInput.setSelection(start - 1);
Log.e("left", start + "");
}
}
if (v.getId() == R.id.btnRight) {
int start = txtInput.getSelectionStart();
if (start < txtInput.length()) {
txtInput.setSelection(start + 1);
Log.e("right", start + "");
}
}
}