반응형
--> 전에 포스팅했던.. 키보드 위에 붙는 뷰를 개발했던 거를 팝업으로 바꿨음.
https://pub.dev/packages/keyboard_attachable
(flutter의 keyboard_attachable package 를 구현)
팝업은 rg.plugins.popup 을 사용.
https://github.com/rotorgames/Rg.Plugins.Popup
<pages:PopupPage
x:Class="DreamforaV2.Controls.Popups.HabitAddView"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:animations="clr-namespace:Rg.Plugins.Popup.Animations;assembly=Rg.Plugins.Popup"
xmlns:constants="clr-namespace:DreamforaV2.Constants"
xmlns:customrenderers="clr-namespace:DreamforaV2.Controls.CustomRenderers"
xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
xmlns:yummy="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
BackgroundColor="#33000000">
<pages:PopupPage.Animation>
<animations:ScaleAnimation
DurationIn="0"
DurationOut="0"
HasBackgroundAnimation="True"
PositionIn="Center"
PositionOut="Center" />
</pages:PopupPage.Animation>
<Grid x:Name="OuterGrid">
<Grid HorizontalOptions="Fill" VerticalOptions="Fill">
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBackgroundTapped" />
</Grid.GestureRecognizers>
</Grid>
<yummy:PancakeView
x:Name="habitAddAttachedView"
Padding="0,32,0,32"
BackgroundColor="{AppThemeBinding Dark=Black,
Light=White}"
CornerRadius="40,40,0,0"
VerticalOptions="End">
<StackLayout Margin="32,0,32,0">
<StackLayout
BackgroundColor="Transparent"
HorizontalOptions="Fill"
Orientation="Horizontal">
<customrenderers:NoBorderEntry
x:Name="habitAddEntry"
Margin="5,0,0,0"
ClearButtonVisibility="WhileEditing"
Completed="OnHabitAddEntryCompleted"
HorizontalOptions="FillAndExpand"
IsSpellCheckEnabled="false"
IsTextPredictionEnabled="false"
Placeholder="Typing"
ReturnType="Done">
<customrenderers:NoBorderEntry.Keyboard>
<Keyboard x:FactoryMethod="Create">
<x:Arguments>
<KeyboardFlags>None</KeyboardFlags>
</x:Arguments>
</Keyboard>
</customrenderers:NoBorderEntry.Keyboard>
</customrenderers:NoBorderEntry>
</StackLayout>
<ScrollView
Margin="0,24,0,0"
HorizontalScrollBarVisibility="Never"
Orientation="Horizontal"
VerticalScrollBarVisibility="Never">
<StackLayout Orientation="Horizontal">
<Grid VerticalOptions="Center">
<Frame
x:Name="habitRepeatDaysFrame"
Padding="13,10,13,10"
BackgroundColor="#F2F2F6"
CornerRadius="21"
HeightRequest="35"
HorizontalOptions="Start"
IsVisible="false"
VerticalOptions="Center">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnHabitRepeatDaysButtonClicked" />
</Frame.GestureRecognizers>
<StackLayout Orientation="Horizontal">
<Image
HeightRequest="14"
Source="repeatdays"
VerticalOptions="Center"
WidthRequest="14" />
<Label
x:Name="habitRepeatDaysLabel"
Margin="8,0,0,0"
CharacterSpacing="-0.34"
FontFamily="{x:Static constants:Fonts.DMSansMedium}"
FontSize="12"
TextColor="#7265E3"
VerticalOptions="Center" />
<Frame
Margin="5,0,0,0"
BackgroundColor="Transparent"
HeightRequest="40"
HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="40">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnHabitRepeatDaysDeleteTapped" />
</Frame.GestureRecognizers>
<Image
HeightRequest="12"
HorizontalOptions="Center"
Source="x_icon"
VerticalOptions="Center"
WidthRequest="12" />
</Frame>
</StackLayout>
</Frame>
<Frame
x:Name="habitRepeatDaysButton"
HeightRequest="40"
HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="40">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnHabitRepeatDaysButtonClicked" />
</Frame.GestureRecognizers>
<Image
HeightRequest="19"
HorizontalOptions="Center"
Source="repeatdays_gray"
VerticalOptions="Center"
WidthRequest="19" />
</Frame>
</Grid>
<Grid Margin="32,0,0,0">
<Frame
x:Name="habitReminderFrame"
Padding="13,10,13,10"
BackgroundColor="#F2F2F6"
CornerRadius="24"
HeightRequest="35"
HorizontalOptions="Start"
IsVisible="false"
VerticalOptions="Center">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnHabitReminderButtonClicked" />
</Frame.GestureRecognizers>
<StackLayout Orientation="Horizontal">
<Image
HeightRequest="14"
Source="dreamdetail_addhabit_clock"
VerticalOptions="Center"
WidthRequest="14" />
<Label
Margin="8,0,0,0"
CharacterSpacing="-0.34"
FontFamily="{x:Static constants:Fonts.DMSansMedium}"
FontSize="12"
TextColor="#030202"
VerticalOptions="Center">
<Label.FormattedText>
<FormattedString>
<Span Text="Remind me " />
<Span x:Name="habitReminderTimeSpan" />
</FormattedString>
</Label.FormattedText>
</Label>
<Frame
Margin="5,0,0,0"
BackgroundColor="Transparent"
HeightRequest="40"
HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="40">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnHabitReminderDeleteTapped" />
</Frame.GestureRecognizers>
<Image
HeightRequest="12"
HorizontalOptions="Center"
Source="x_icon"
VerticalOptions="Center"
WidthRequest="12" />
</Frame>
</StackLayout>
</Frame>
<Frame
x:Name="habitReminderButton"
HeightRequest="40"
HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="40">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnHabitReminderButtonClicked" />
</Frame.GestureRecognizers>
<Image
HeightRequest="19"
HorizontalOptions="Center"
Source="dreamdetail_addhabit_clock_gray"
VerticalOptions="Center"
WidthRequest="19" />
</Frame>
</Grid>
</StackLayout>
</ScrollView>
</StackLayout>
</yummy:PancakeView>
<customrenderers:DFCTimePicker
x:Name="habitReminderTimePicker"
DFTimeSelected="OnHabitReminderPickerTimeSelected"
IsVisible="false"
Unfocused="OnHabitReminderTimePickerUnfocused" />
</Grid>
</pages:PopupPage>
반응형
'프로그래밍 > App 개발' 카테고리의 다른 글
[Xamarin] Draw dashed(dotted) arc with SkiaSharp (not using AddArc()) (0) | 2021.06.14 |
---|---|
[Xamarin] Draw Arc with SkiaSharp (0) | 2021.06.14 |
[Xamarin] Lottie (xaml) (0) | 2021.05.27 |
기술스택 (0) | 2021.05.27 |
[Xamarin] Xamarin.Forms iOS Distribution (2021) (0) | 2021.04.21 |