Skip to content

Commit 7430f8b

Browse files
Updating Sample App to use FAB control
1 parent d2306da commit 7430f8b

File tree

9 files changed

+34
-20922
lines changed

9 files changed

+34
-20922
lines changed

samples/Xamarin/SimpleContacts/SimpleContacts.Android/SimpleContacts.Android.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
1818
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
1919
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
20-
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
20+
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
2121
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
2222
<AndroidUseAapt2>true</AndroidUseAapt2>
2323
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>

samples/Xamarin/SimpleContacts/SimpleContacts/App.xaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<Application xmlns="http://xamarin.com/schemas/2014/forms"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
x:Class="SimpleContacts.App">
4+
x:Class="SimpleContacts.App"
5+
xmlns:fab="clr-namespace:ThunderDesign.Xamarin.Forms.FloatingActionButton.Controls;assembly=ThunderDesign.Xamarin.Forms.FloatingActionButton">
56
<!--
67
Define global resources and styles here, that apply to all pages in your app.
78
-->
@@ -67,6 +68,14 @@
6768
</Setter.Value>
6869
</Setter>
6970
</Style>
71+
72+
<Style x:Key="RoundFAB" TargetType="fab:FloatingActionButton">
73+
<Setter Property="TextColor" Value="White"></Setter>
74+
<Setter Property="FontSize" Value="30"></Setter>
75+
<Setter Property="WidthRequest" Value="56"></Setter>
76+
<Setter Property="HeightRequest" Value="56"></Setter>
77+
<Setter Property="CornerRadius" Value="28"></Setter>
78+
</Style>
7079
<Style TargetType="Button">
7180
<Setter Property="TextColor" Value="White"></Setter>
7281
<Setter Property="VisualStateManager.VisualStateGroups">
@@ -86,6 +95,24 @@
8695
</VisualStateGroupList>
8796
</Setter>
8897
</Style>
98+
<Style TargetType="fab:FloatingActionButton">
99+
<Setter Property="VisualStateManager.VisualStateGroups">
100+
<VisualStateGroupList>
101+
<VisualStateGroup x:Name="CommonStates">
102+
<VisualState x:Name="Normal">
103+
<VisualState.Setters>
104+
<Setter Property="BackgroundColor" Value="{StaticResource Primary}" />
105+
</VisualState.Setters>
106+
</VisualState>
107+
<VisualState x:Name="Disabled">
108+
<VisualState.Setters>
109+
<Setter Property="BackgroundColor" Value="#332196F3" />
110+
</VisualState.Setters>
111+
</VisualState>
112+
</VisualStateGroup>
113+
</VisualStateGroupList>
114+
</Setter>
115+
</Style>
89116
</ResourceDictionary>
90117
</Application.Resources>
91118
</Application>

samples/Xamarin/SimpleContacts/SimpleContacts/Controls/FloatingActionButton.xaml

Lines changed: 0 additions & 41 deletions
This file was deleted.

samples/Xamarin/SimpleContacts/SimpleContacts/Controls/FloatingActionButton.xaml.cs

Lines changed: 0 additions & 117 deletions
This file was deleted.

samples/Xamarin/SimpleContacts/SimpleContacts/Extentions/ElementExtensions.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)