ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

RadAutoCompleteTextView hint color #1391

Closed comporell closed 2 years ago

comporell commented 4 years ago

Hello,

I couldn't find any documents on how to change the hint color of RadAutoCompleteTextView. Is it possible to change its color?

Best Regards,

comporell commented 4 years ago

news on this?

comporell commented 3 years ago

Still no news?

jessorlisa commented 3 years ago

Inspired from this post I found a workaround until this is supported.

Example for NativeScript 7 with Angular:

<RadAutoCompleteTextView #autocomplete
                                 (didAutoComplete)="onDidAutoComplete($event)"
                                 (focus)="onAutoCompleteFocus($event)"
                                 (loaded)="onAutoCompleteLoaded($event)"></RadAutoCompleteTextView>
...
import { isAndroid} from '@nativescript/core';

import { RadAutoCompleteTextView, TokenModel } from 'nativescript-ui-autocomplete';
import { RadAutoCompleteTextViewComponent } from 'nativescript-ui-autocomplete/angular';

declare var android: any;

...
onAutoCompleteLoaded(args: EventData): void {
    const autoComplete = args.object as RadAutoCompleteTextView;
    // solution for Android
    if (isAndroid) {
        const textField = autoComplete.nativeView.getTextField(); // android.widget.EditText
        textField.setHintTextColor((android.graphics as any).Color.GRAY);
    }
}

For iOS the color was fine in my scenario so I did not check how to change it there.

Hope this helps!

Przemase commented 3 years ago

That's works great for android even on 6.5.1 version of native