NEW feature labels for updated or newly added features in the app UI

171 Views Asked by At

I have developed a simple app in Xamarin.Forms. Now I am pushing new updates regularly, and I want to inform the app users about the new features. I have seen the NEWlabels on top of new features in UI that appear for a while. (See in the screenshot below). I want to implement the same label for my app but don't know how to do it. I have one way to add labels manually to all features I have implemented recently and add a trigger to hide them after people interact with these features. But I think this is a heavy method to add these labels to all features. Is there a proper way? Note: I use Microsoft App center for app deployment to users. Android 10 UI

1

There are 1 best solutions below

0
Leo Zhu On

For example:

Here is the page you will add a new label later.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="NewForms.Page12">
    <ContentPage.Content>
        <StackLayout x:Name ="stacklayout">
           <Label Text="Welcome to Xamarin.Forms!"
              VerticalOptions="CenterAndExpand" 
              HorizontalOptions="CenterAndExpand" />
              
        </StackLayout>
    </ContentPage.Content>
</ContentPage>


public YourPage()
    {
        InitializeComponent();
        MessagingCenter.Subscribe<YourPage>(this, "Add New Label", (sender) =>
        {
            // Do something whenever the "Add New Label" message is received
            Label newLabel = new Label() { Text = "new feature label" };
            stacklayout.Children.Add(newLabel );
        });
    }

Suppose this is the callback method that you received a push:

void receive(){
   MessagingCenter.Send<YourPage>(this, "Add New Label");
}