I am developing with Xamarin.Forms. NET Standard class in C# to dynamically change the name of the application label that is set in the attributes of Droid/MainActivity.cs. Forexample "SG2022" to "NEW_SG20220214".
namespace SG2022.Droid
{
[Activity(Label = "SG2022", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
NET Standard class in C#. For example, if I can change it from the LoginViewModel, how do I write it?
public LoginViewModel()
{
LoginCommand = new Command(OnLoginClicked);
Droid.Activity.Label = "NEW_SG20220214";
}
Is it possible to write something like