简体   繁体   中英

using resx in xaml in the application xamarin.android app

Is it possible to use a string resource in xaml from the resx file in xamarin.android? (like @ string / stringResource) There are a lot of examples for xamarin.forms and unfortunately I can't find anything for xamarin.android.

In Xamarin.Forms, you could use the Resx files . You create the files for the Forms project. I take the Localization for reference.

But if you want to do something like resx on Android, you need to use the Strings.xml file like what you said @string . On Android platform, it has different implementation. Create a Strings.xml file of value folder inside Resource folder.

Xamarin.Forms:

Xamarin.Android:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM