Home > Mobile >  using resx in xaml in the application xamarin.android app
using resx in xaml in the application xamarin.android app

Time:01-11

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.

CodePudding user response:

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:

  •  Tags:  
  • Related