본문 바로가기
프로그래밍/App 개발

기술스택

by 엽기토기 2021. 5. 27.
반응형

이제 xaml 코드 짜는 속도가 거의 공장 찍어내는 급이 되었다.

근데, 애니메이션, 플랫폼 스페시픽 한 코드를 짜다보니 현타가 자주온다. 복잡하고 긴 줄 수도 덤.

키보드 위에 붙는 스티키한 뷰 만들면서 또 현타옴. 자말 코드만 올려본다. (코드 비하인드는 더 거지같음 거의 한땀한땀 바느질한 느낌)

 <!--#region Add Task-->
        <customrenderers:AttachedToKeyboardGrid
            x:Name="taskAddAttachedView"
            BackgroundColor="White"
            IsVisible="false"
            VerticalOptions="End">
            <yummy:PancakeView
                Padding="0,32,0,32"
                BackgroundColor="White"
                CornerRadius="40,40,0,0">

                <StackLayout Margin="32,0,32,0">

                    <StackLayout
                        BackgroundColor="Transparent"
                        HorizontalOptions="Fill"
                        Orientation="Horizontal">
                        <!--<Image
                        HeightRequest="22"
                        Source="big_green_ellipse"
                        WidthRequest="22" />-->
                        <customrenderers:NoBorderEntry
                            x:Name="taskAddEntry"
                            Margin="5,0,0,0"
                            ClearButtonVisibility="WhileEditing"
                            Completed="OnTaskAddEntryCompleted"
                            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="taskDueDateFrame"
                                    Padding="13,10,13,10"
                                    BackgroundColor="#F2F2F6"
                                    CornerRadius="21"
                                    HeightRequest="35"
                                    HorizontalOptions="Start"
                                    IsVisible="false"
                                    VerticalOptions="Center">
                                    <Frame.GestureRecognizers>
                                        <TapGestureRecognizer Tapped="OnTaskDueDateButtonClicked" />
                                    </Frame.GestureRecognizers>
                                    <StackLayout Orientation="Horizontal">
                                        <Image
                                            HeightRequest="14"
                                            Source="task_add_duedate_black"
                                            VerticalOptions="Center"
                                            WidthRequest="14" />
                                        <Label
                                            x:Name="taskDueDateLabel"
                                            Margin="8,0,0,0"
                                            CharacterSpacing="-0.34"
                                            FontFamily="{x:Static constants:Fonts.DMSansMedium}"
                                            FontSize="12"
                                            TextColor="#030202"
                                            VerticalOptions="Center" />
                                        <Frame
                                            Margin="5,0,0,0"
                                            BackgroundColor="Transparent"
                                            HeightRequest="40"
                                            HorizontalOptions="Start"
                                            VerticalOptions="Center"
                                            WidthRequest="40">
                                            <Frame.GestureRecognizers>
                                                <TapGestureRecognizer Tapped="OnTaskDueDateDeleteTapped" />
                                            </Frame.GestureRecognizers>
                                            <Image
                                                HeightRequest="12"
                                                HorizontalOptions="Center"
                                                Source="x_icon"
                                                VerticalOptions="Center"
                                                WidthRequest="12" />
                                        </Frame>
                                    </StackLayout>
                                </Frame>

                                <Frame
                                    x:Name="taskDueDateButton"
                                    HeightRequest="40"
                                    HorizontalOptions="Start"
                                    VerticalOptions="Center"
                                    WidthRequest="40">
                                    <Frame.GestureRecognizers>
                                        <TapGestureRecognizer Tapped="OnTaskDueDateButtonClicked" />
                                    </Frame.GestureRecognizers>
                                    <Image
                                        HeightRequest="19"
                                        HorizontalOptions="Center"
                                        Source="task_add_duedate_gray"
                                        VerticalOptions="Center"
                                        WidthRequest="19" />
                                </Frame>
                            </Grid>

                            <Grid Margin="32,0,0,0" VerticalOptions="Center">
                                <Frame
                                    x:Name="taskReminderFrame"
                                    Padding="13,10,13,10"
                                    BackgroundColor="#F2F2F6"
                                    CornerRadius="24"
                                    HeightRequest="35"
                                    HorizontalOptions="Start"
                                    IsVisible="false"
                                    VerticalOptions="Start">
                                    <Frame.GestureRecognizers>
                                        <TapGestureRecognizer Tapped="OnTaskReminderButtonClicked" />
                                    </Frame.GestureRecognizers>
                                    <StackLayout Orientation="Horizontal">
                                        <Image
                                            HeightRequest="14"
                                            Source="dreamdetail_addhabit_clock"
                                            VerticalOptions="Center"
                                            WidthRequest="14" />

                                        <StackLayout Margin="8,0,0,0" VerticalOptions="Center">
                                            <Label
                                                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="taskReminderTimeSpan" />
                                                    </FormattedString>
                                                </Label.FormattedText>
                                            </Label>
                                            <Label
                                                x:Name="taskReminderDateLabel"
                                                CharacterSpacing="-0.34"
                                                FontFamily="{x:Static constants:Fonts.DMSansRegular}"
                                                FontSize="10"
                                                Text="15 Nov 2021"
                                                TextColor="#030202"
                                                VerticalOptions="Center" />
                                        </StackLayout>
                                        <Frame
                                            Margin="5,0,0,0"
                                            BackgroundColor="Transparent"
                                            HeightRequest="40"
                                            HorizontalOptions="Start"
                                            VerticalOptions="Center"
                                            WidthRequest="40">
                                            <Frame.GestureRecognizers>
                                                <TapGestureRecognizer Tapped="OnTaskReminderDeleteTapped" />
                                            </Frame.GestureRecognizers>
                                            <Image
                                                HeightRequest="12"
                                                HorizontalOptions="Center"
                                                Source="x_icon"
                                                VerticalOptions="Center"
                                                WidthRequest="12" />
                                        </Frame>
                                    </StackLayout>
                                </Frame>
                                <Frame
                                    x:Name="taskReminderButton"
                                    HeightRequest="40"
                                    HorizontalOptions="Start"
                                    VerticalOptions="Center"
                                    WidthRequest="40">
                                    <Frame.GestureRecognizers>
                                        <TapGestureRecognizer Tapped="OnTaskReminderButtonClicked" />
                                    </Frame.GestureRecognizers>
                                    <Image
                                        HeightRequest="19"
                                        HorizontalOptions="Center"
                                        Source="dreamdetail_addhabit_clock_gray"
                                        VerticalOptions="Center"
                                        WidthRequest="19" />
                                </Frame>
                            </Grid>
                        </StackLayout>

                    </ScrollView>

                </StackLayout>

            </yummy:PancakeView>
        </customrenderers:AttachedToKeyboardGrid>
        <!--#endregion Add Task-->

 

곧 회사 스택을 flutter or swift native 로 갈아탄다. 두근두근 어떤 일이 펼쳐질까.

과연 xamarin 문제인가 내 손꾸락과 머리의 문제일까 ㅋ

반응형