You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Posibility of mat-prefix and mat-suffix icons in textfield #32
Just in case someone still needs this. Not sure if this is the right way to do it tho. Tested on Android 9 - NS 6.x
Code
import{androidasandroidApp}from'tns-core-modules/application'
...
// loaded eventtextFieldLoaded({ object }){// Grab Native viewconstinputLayout=object.android// Grab icon from res (replace "com.example.app" with your package name. "ic_add" with your icon name)consticon=com.example.app.R.drawable.ic_add// Convert it into a drawable for androidconsticonDrawable=androidApp.context.getResources().getDrawable(icon)inputLayout.setPrefixText("+63 ")inputLayout.setStartIconDrawable(iconDrawable)}
Activity
kryoware commentedon Nov 9, 2020
Just in case someone still needs this. Not sure if this is the right way to do it tho. Tested on Android 9 - NS 6.x
Code
Result
farfromrefug commentedon Nov 9, 2020
@kryoware I think it is the right way. Want to make a PR to add that both on iOS and Android ?