Skip to content

Commit 66d00c4

Browse files
committed
fix defualt label text color; Entry -> Editor for token; UseSaveArea for iOS
1 parent fce328d commit 66d00c4

File tree

4 files changed

+31
-9
lines changed

4 files changed

+31
-9
lines changed

sample/Sample/App.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@
44
xmlns="http://xamarin.com/schemas/2014/forms"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:prism="http://prismlibrary.com">
7-
<Application.Resources />
7+
8+
<Application.Resources >
9+
<ResourceDictionary>
10+
<Style TargetType="Label">
11+
<Setter Property="TextColor" Value="Magenta" />
12+
</Style>
13+
</ResourceDictionary>
14+
</Application.Resources>
815
</prism:PrismApplication>

sample/Sample/NotifoStartup.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,22 @@ public void ConfigureService(INotifoMobilePush notifo)
1717
{
1818
notifo
1919
.SetBaseUrl(Constants.ApiUrl)
20+
.SetApiVersion(ApiVersion.Version_1_5)
2021
.UseFirebasePluginEventsProvider();
2122

2223
notifo.OnNotificationOpened += Current_OnNotificationOpened;
24+
notifo.OnNotificationReceived += Notifo_OnNotificationReceived;
25+
notifo.OnLog += Notifo_OnLog;
26+
}
27+
28+
private void Notifo_OnLog(object sender, NotificationLogEventArgs e)
29+
{
30+
System.Diagnostics.Debug.WriteLine("Notification log message: " + e.Message);
31+
}
32+
33+
private void Notifo_OnNotificationReceived(object sender, NotificationEventArgs e)
34+
{
35+
System.Diagnostics.Debug.WriteLine("Notification received: " + e.Notification.Subject);
2336
}
2437

2538
private void Current_OnNotificationOpened(object source, NotificationEventArgs e)

sample/Sample/Views/EventsPage.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
xmlns="http://xamarin.com/schemas/2014/forms"
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:prism="http://prismlibrary.com"
7+
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
8+
ios:Page.UseSafeArea="True"
79
prism:ViewModelLocator.AutowireViewModel="True"
810
BackgroundColor="White"
911
Title="Events">
@@ -19,17 +21,15 @@
1921
Margin="8,0"
2022
FontAttributes="Bold"
2123
FontSize="18"
22-
Text="{Binding Subject}"
23-
TextColor="Black" />
24-
24+
Text="{Binding Subject}"/>
25+
2526
<Label
2627
Margin="8,0"
2728
FontAttributes="None"
2829
FontSize="14"
29-
Text="{Binding Body}"
30-
TextColor="Black" />
31-
32-
<Label
30+
Text="{Binding Body}"/>
31+
32+
<Label
3333
Margin="8,0"
3434
FontAttributes="None"
3535
FontSize="14"

sample/Sample/Views/LoginPage.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:prism="http://prismlibrary.com"
77
prism:ViewModelLocator.AutowireViewModel="True"
8+
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
9+
ios:Page.UseSafeArea="True"
810
Title="Login">
911

1012
<ContentPage.Content>
@@ -21,7 +23,7 @@
2123
Text="Enter API Key"
2224
HorizontalOptions="CenterAndExpand" />
2325

24-
<Entry Text="{Binding ApiKey, Mode=TwoWay}" />
26+
<Editor Text="{Binding ApiKey, Mode=TwoWay}" TextColor="Magenta" BackgroundColor="WhiteSmoke" />
2527

2628
<Button Command="{Binding LoginCommand}" Text="Login" />
2729
</StackLayout>

0 commit comments

Comments
 (0)