Is there any way to make the EditText as partially non editable with some background color. Something like below image...
Here the light dark texts are non editable and others are editable.
I have tried with TextWatcher
like below by the help of some text spiting regex (split("\\.")
) .
@Override
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
if(!s.toString().startsWith(firstSentense)){
fullStory.setText(firstSentense+".");
fullStory.setTextColor(Color.parseColor("#60000000"));
Selection.setSelection(fullStory.getText(), fullStory.getText().length());
}
}
But unfortunately I can't able to show the background for non editable texts. And when I'm trying to move the marker to the end of non editable stuffs, it deletes the total editable texts.
Can anyone faced and resolved this type of stuffs.