Set screen title
kotlin
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.appt)
val toolbar = findViewById(R.id.toolbar)
setSupportActionBar(toolbar)
title = "Appt homescreen"
} On iOS, we recommend using a UINavigationController with an appropriate title on each screen.
swift
override func viewDidLoad() {
super.viewDidLoad()
title = "Appt homescreen"
} In SwiftUI, we recommend embedding your views in a NavigationStack with an appropriate navigationTitle-43srq) on each screen.
swift
NavigationStack {
VStack {
Text("Welcome to the Appt homescreen")
}
.navigationTitle("Appt homescreen")
} In React Native, we recommend using React Navigation with an appropriate title on each screen.
jsx
function StackScreen() {
return (
<Stack.Navigator>
<Stack.Screen
name="Home"
component={HomeScreen}
options={{ title: 'Appt homescreen' }}
/>
</Stack.Navigator>
);
} In MAUI, we recommend setting an appropriate Title for each ContentPage.
xml
<ContentPage
x:Class="NewPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Title="Appt homescreen">
</ContentPage> csharp
public NewPage()
{
Title = "Appt homescreen";
} With Xamarin Forms, we recommend setting an appropriate Title for each ContentPage.
xml
<ContentPage
x:Class="NewPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Title="{Binding PageTitle}">
<ContentView>
...
</ContentView>
</ContentPage> csharp
public NewPage()
{
SetBinding(Page.TitleProperty, new Binding("Appt homescreen"));
}