change the specific word color when typing in Edit text or MultiAutoCompleteTextView with file extention












1















I create small code editor app.Problem is, changing the extention is not change specific words color.I use string array resources file to identify specific word. and also add Common class to get extention using save as dialog. In Common class i got a problem using below,



public static String currentExtention;


Null point Exception error.then i set a value for it like "txt".
But now problem is doesn't change color when i change the extention.
My classes are below.



public class Common {
public static String currentExtention="txt";
public static void setCurrentExtention(String extention)
{
currentExtention=extention;
}

public static String getCurrentExtention()
{
return currentExtention;
}
}


I change the data type using FileSaveDialog class.using



Common.setCurrentExtention(extention );


extention is, set values get by user. it is work and pass Main activity to correct extention.
In my Activity class is below



@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_new_file);

txtnumberView = (TextView) findViewById(R.id.numberViewText);
edtTextView = (MultiAutoCompleteTextView) findViewById(R.id.edtTextView);
relativeLayout = (RelativeLayout) findViewById(R.id.layout_root);
helper = new TextViewUndoRedo(edtTextView);
context = NewFileActivity.this;
fileSaveDialog = new FileSaveDialog(context);
findTextDialog = new FindTextDialog(context);
autoCompleteText = new AutoCompleteText(context);
autoChangeNumberTxtView=new AutoChangeNumberTxtView(context,edtTextView,txtnumberView);

switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {

autoChangeNumberTxtView.autoOnchange();
textInType();


}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


}
}

});


For my further development I use MultiAutoCompleteTextView instead of EditText.
I think problem in there.



  switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


This is not crash but logcat display below . when i change the file extention.



E/ViewRootImpl: sendUserActionEvent() mView == null
E/ViewRootImpl: sendUserActionEvent() mView == null


If someone can explain me what is the problem or what is the correct way to do this.it will be very helpful to me.










share|improve this question























  • have you written adapter?

    – Amir
    Nov 28 '18 at 4:18











  • i did not write an adapter for this case. i write an adapter for Auto complete text.

    – vimukthi
    Nov 28 '18 at 6:09











  • auto complete text adapter work finely with extention. What can i do please help me.

    – vimukthi
    Nov 28 '18 at 6:13











  • here values is the list of your data that you want to display when user write in autocompletettextview

    – Amir
    Nov 28 '18 at 6:53











  • I did this part.its work correctly. I want to change the word color also. So this error comeup with change text color. I done both separate. If any suggestion for change word color Or change the color using an adapter

    – vimukthi
    Nov 28 '18 at 9:02
















1















I create small code editor app.Problem is, changing the extention is not change specific words color.I use string array resources file to identify specific word. and also add Common class to get extention using save as dialog. In Common class i got a problem using below,



public static String currentExtention;


Null point Exception error.then i set a value for it like "txt".
But now problem is doesn't change color when i change the extention.
My classes are below.



public class Common {
public static String currentExtention="txt";
public static void setCurrentExtention(String extention)
{
currentExtention=extention;
}

public static String getCurrentExtention()
{
return currentExtention;
}
}


I change the data type using FileSaveDialog class.using



Common.setCurrentExtention(extention );


extention is, set values get by user. it is work and pass Main activity to correct extention.
In my Activity class is below



@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_new_file);

txtnumberView = (TextView) findViewById(R.id.numberViewText);
edtTextView = (MultiAutoCompleteTextView) findViewById(R.id.edtTextView);
relativeLayout = (RelativeLayout) findViewById(R.id.layout_root);
helper = new TextViewUndoRedo(edtTextView);
context = NewFileActivity.this;
fileSaveDialog = new FileSaveDialog(context);
findTextDialog = new FindTextDialog(context);
autoCompleteText = new AutoCompleteText(context);
autoChangeNumberTxtView=new AutoChangeNumberTxtView(context,edtTextView,txtnumberView);

switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {

autoChangeNumberTxtView.autoOnchange();
textInType();


}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


}
}

});


For my further development I use MultiAutoCompleteTextView instead of EditText.
I think problem in there.



  switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


This is not crash but logcat display below . when i change the file extention.



E/ViewRootImpl: sendUserActionEvent() mView == null
E/ViewRootImpl: sendUserActionEvent() mView == null


If someone can explain me what is the problem or what is the correct way to do this.it will be very helpful to me.










share|improve this question























  • have you written adapter?

    – Amir
    Nov 28 '18 at 4:18











  • i did not write an adapter for this case. i write an adapter for Auto complete text.

    – vimukthi
    Nov 28 '18 at 6:09











  • auto complete text adapter work finely with extention. What can i do please help me.

    – vimukthi
    Nov 28 '18 at 6:13











  • here values is the list of your data that you want to display when user write in autocompletettextview

    – Amir
    Nov 28 '18 at 6:53











  • I did this part.its work correctly. I want to change the word color also. So this error comeup with change text color. I done both separate. If any suggestion for change word color Or change the color using an adapter

    – vimukthi
    Nov 28 '18 at 9:02














1












1








1


1






I create small code editor app.Problem is, changing the extention is not change specific words color.I use string array resources file to identify specific word. and also add Common class to get extention using save as dialog. In Common class i got a problem using below,



public static String currentExtention;


Null point Exception error.then i set a value for it like "txt".
But now problem is doesn't change color when i change the extention.
My classes are below.



public class Common {
public static String currentExtention="txt";
public static void setCurrentExtention(String extention)
{
currentExtention=extention;
}

public static String getCurrentExtention()
{
return currentExtention;
}
}


I change the data type using FileSaveDialog class.using



Common.setCurrentExtention(extention );


extention is, set values get by user. it is work and pass Main activity to correct extention.
In my Activity class is below



@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_new_file);

txtnumberView = (TextView) findViewById(R.id.numberViewText);
edtTextView = (MultiAutoCompleteTextView) findViewById(R.id.edtTextView);
relativeLayout = (RelativeLayout) findViewById(R.id.layout_root);
helper = new TextViewUndoRedo(edtTextView);
context = NewFileActivity.this;
fileSaveDialog = new FileSaveDialog(context);
findTextDialog = new FindTextDialog(context);
autoCompleteText = new AutoCompleteText(context);
autoChangeNumberTxtView=new AutoChangeNumberTxtView(context,edtTextView,txtnumberView);

switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {

autoChangeNumberTxtView.autoOnchange();
textInType();


}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


}
}

});


For my further development I use MultiAutoCompleteTextView instead of EditText.
I think problem in there.



  switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


This is not crash but logcat display below . when i change the file extention.



E/ViewRootImpl: sendUserActionEvent() mView == null
E/ViewRootImpl: sendUserActionEvent() mView == null


If someone can explain me what is the problem or what is the correct way to do this.it will be very helpful to me.










share|improve this question














I create small code editor app.Problem is, changing the extention is not change specific words color.I use string array resources file to identify specific word. and also add Common class to get extention using save as dialog. In Common class i got a problem using below,



public static String currentExtention;


Null point Exception error.then i set a value for it like "txt".
But now problem is doesn't change color when i change the extention.
My classes are below.



public class Common {
public static String currentExtention="txt";
public static void setCurrentExtention(String extention)
{
currentExtention=extention;
}

public static String getCurrentExtention()
{
return currentExtention;
}
}


I change the data type using FileSaveDialog class.using



Common.setCurrentExtention(extention );


extention is, set values get by user. it is work and pass Main activity to correct extention.
In my Activity class is below



@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_new_file);

txtnumberView = (TextView) findViewById(R.id.numberViewText);
edtTextView = (MultiAutoCompleteTextView) findViewById(R.id.edtTextView);
relativeLayout = (RelativeLayout) findViewById(R.id.layout_root);
helper = new TextViewUndoRedo(edtTextView);
context = NewFileActivity.this;
fileSaveDialog = new FileSaveDialog(context);
findTextDialog = new FindTextDialog(context);
autoCompleteText = new AutoCompleteText(context);
autoChangeNumberTxtView=new AutoChangeNumberTxtView(context,edtTextView,txtnumberView);

switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {

autoChangeNumberTxtView.autoOnchange();
textInType();


}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


}
}

});


For my further development I use MultiAutoCompleteTextView instead of EditText.
I think problem in there.



  switch (Common.getCurrentExtention()) {
case "html":
dataType = getResources().getStringArray(R.array.html);
break;
case "txt":
dataType = getResources().getStringArray(R.array.txt);
break;
}
regex = new StringBuilder("\b(");
for (String word : dataType) {
regex.append(Pattern.quote(word));
regex.append("|");
}
regex.setLength(regex.length() - 1); // delete last added "|"
regex.append(")\b");
edtTextView.addTextChangedListener(new TextWatcher() {
ColorScheme keywords = new ColorScheme(

Pattern.compile(regex.toString()),
Color.CYAN
);

ColorScheme numbers = new ColorScheme(
Pattern.compile("(\b(\d*[.]?\d+)\b)"),
Color.BLUE
);

final ColorScheme schemes = {keywords, numbers};

void removeSpans(Editable e, Class<? extends CharacterStyle> type) {
CharacterStyle spans = e.getSpans(0, e.length(), type);
for (CharacterStyle span : spans) {
e.removeSpan(span);
}
}

class ColorScheme {
final Pattern pattern;
final int color;

ColorScheme(Pattern pattern, int color) {
this.pattern = pattern;
this.color = color;
}
}

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}

@Override
public void afterTextChanged(Editable editable) {

removeSpans(editable, ForegroundColorSpan.class);
for (ColorScheme scheme : schemes) {
for (Matcher m = scheme.pattern.matcher(editable); m.find(); ) {
editable.setSpan(new ForegroundColorSpan(scheme.color),
m.start(),
m.end(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}


This is not crash but logcat display below . when i change the file extention.



E/ViewRootImpl: sendUserActionEvent() mView == null
E/ViewRootImpl: sendUserActionEvent() mView == null


If someone can explain me what is the problem or what is the correct way to do this.it will be very helpful to me.







java android android-edittext multiautocompletetextview






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 '18 at 4:03









vimukthivimukthi

19319




19319













  • have you written adapter?

    – Amir
    Nov 28 '18 at 4:18











  • i did not write an adapter for this case. i write an adapter for Auto complete text.

    – vimukthi
    Nov 28 '18 at 6:09











  • auto complete text adapter work finely with extention. What can i do please help me.

    – vimukthi
    Nov 28 '18 at 6:13











  • here values is the list of your data that you want to display when user write in autocompletettextview

    – Amir
    Nov 28 '18 at 6:53











  • I did this part.its work correctly. I want to change the word color also. So this error comeup with change text color. I done both separate. If any suggestion for change word color Or change the color using an adapter

    – vimukthi
    Nov 28 '18 at 9:02



















  • have you written adapter?

    – Amir
    Nov 28 '18 at 4:18











  • i did not write an adapter for this case. i write an adapter for Auto complete text.

    – vimukthi
    Nov 28 '18 at 6:09











  • auto complete text adapter work finely with extention. What can i do please help me.

    – vimukthi
    Nov 28 '18 at 6:13











  • here values is the list of your data that you want to display when user write in autocompletettextview

    – Amir
    Nov 28 '18 at 6:53











  • I did this part.its work correctly. I want to change the word color also. So this error comeup with change text color. I done both separate. If any suggestion for change word color Or change the color using an adapter

    – vimukthi
    Nov 28 '18 at 9:02

















have you written adapter?

– Amir
Nov 28 '18 at 4:18





have you written adapter?

– Amir
Nov 28 '18 at 4:18













i did not write an adapter for this case. i write an adapter for Auto complete text.

– vimukthi
Nov 28 '18 at 6:09





i did not write an adapter for this case. i write an adapter for Auto complete text.

– vimukthi
Nov 28 '18 at 6:09













auto complete text adapter work finely with extention. What can i do please help me.

– vimukthi
Nov 28 '18 at 6:13





auto complete text adapter work finely with extention. What can i do please help me.

– vimukthi
Nov 28 '18 at 6:13













here values is the list of your data that you want to display when user write in autocompletettextview

– Amir
Nov 28 '18 at 6:53





here values is the list of your data that you want to display when user write in autocompletettextview

– Amir
Nov 28 '18 at 6:53













I did this part.its work correctly. I want to change the word color also. So this error comeup with change text color. I done both separate. If any suggestion for change word color Or change the color using an adapter

– vimukthi
Nov 28 '18 at 9:02





I did this part.its work correctly. I want to change the word color also. So this error comeup with change text color. I done both separate. If any suggestion for change word color Or change the color using an adapter

– vimukthi
Nov 28 '18 at 9:02












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53511936%2fchange-the-specific-word-color-when-typing-in-edit-text-or-multiautocompletetext%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53511936%2fchange-the-specific-word-color-when-typing-in-edit-text-or-multiautocompletetext%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)