输入入口控件会使文本显示在编辑器控件中

时间:2017-09-27 06:20:54

标签: xamarin.forms xamarin.android

我有一个xamarin表单应用程序,在listview中有一个编辑器和一个入口控件,

每当我输入入口控件时,尽管光标位于入口控件中,但文本仍显示在编辑器控件中。

此问题仅在小米Redmi Note4设备中运行,在Android 7.0上运行。 Xamarin Forms版本:2.3.4.247 Xamarin.Android版本:2.3.4.247

这样的问题有解决办法吗?感谢

enter image description here

这是代码:

 <StackLayout Orientation="Vertical" Padding="0,10,0,10" >

        <Label Text="{Binding TouchPointQuestionIDSync}" x:Name="lblYesNoWithTextField" IsVisible="False"/>
        <Label Text="{Binding Question}"  TextColor="Black" FontSize="17"/>

        <StackLayout VerticalOptions="Start" Orientation="Vertical" BackgroundColor="Red" Padding="{Binding TemplateBorderValue}">

            <Grid HeightRequest="30" BackgroundColor="#EEEEEE" Padding="5,10,5,10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.05*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="{Binding QuestionPaddingValue}"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="{Binding QuestionPaddingValue}"/>
                    <ColumnDefinition Width="20"/>

                </Grid.ColumnDefinitions>
                <Label x:Name="lblYes" Grid.Row="0" Grid.Column="0" TextColor="Black" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" Text="{Binding Yes}" FontSize="14"/>
                <ffimageloading:CachedImage x:Name="imgRadioYesWithTextField"  Source="{Binding ImgRadioYesSrc, Mode=TwoWay}" Grid.Row="0" Grid.Column="1" HorizontalOptions="Start" >

                    <ffimageloading:CachedImage.GestureRecognizers>

                        <TapGestureRecognizer Tapped="TapGestureRecognizer_TappedYesWithTextField" Command="{Binding ParentBindingContext.cmdListRadioButtonYesTapped,Source={x:Reference dtYesNoTextFieldPage}}"
                        CommandParameter="{Binding .}"/>
                    </ffimageloading:CachedImage.GestureRecognizers>
                </ffimageloading:CachedImage>
                <Label x:Name="lblNo" Grid.Row="0" Grid.Column="3" Text="{Binding No}" TextColor="Black" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" FontSize="14"/>

                <ffimageloading:CachedImage x:Name="imgRadioNoWithTextField" Source="{Binding ImgRadioNoSrc, Mode=TwoWay}" Grid.Row="0" Grid.Column="4" HorizontalOptions="Start">
                    <ffimageloading:CachedImage.GestureRecognizers>

                        <TapGestureRecognizer Tapped="TapGestureRecognizer_TappedNoWithTextField" Command="{Binding ParentBindingContext.cmdListRadioButtonNoTapped,Source={x:Reference dtYesNoTextFieldPage}}"
                        CommandParameter="{Binding .}"/>
                    </ffimageloading:CachedImage.GestureRecognizers>
                </ffimageloading:CachedImage>

            </Grid>

        </StackLayout>

        <StackLayout x:Name="stkEditorContainerWithTextField" IsVisible="{Binding bSetCommentBoxVisibility}" BackgroundColor="{Binding TemplateCommentBackground}" Padding="{Binding TemplateCommentBorderValue}">

            <local1:CustomEditor VerticalOptions = "FillAndExpand" x:Name="CommentBoxWithTextField"  Focused="CommentBox_FocusedWithTextField" Unfocused="CommentBox_UnfocusedWithTextField"  TextColor="Black" HeightRequest="150"  FontSize="Default" Keyboard="Default" Text="{Binding CommentBoxText, Mode=TwoWay}" IsEnabled="{Binding EnableControl}" />
        </StackLayout>
        <StackLayout IsVisible="{Binding bSetCommentBoxVisibility}" Padding="{Binding TemplatePaddingEstimateValue}" BackgroundColor="{Binding TemplateEstimateValueBackground}">

            <local1:CustomEntry x:Name="lblEstimatedValue" Focused="txtUserWithTextField_Focused" Keyboard="Numeric" Unfocused="txtUserWithTextField_Unfocused"  Placeholder="{Binding strEVPlaceHolder}" Text="{Binding ATFEntryText, Mode=TwoWay}"  PlaceholderColor="Gray" TextColor="Black"/>
        </StackLayout>

    </StackLayout>

0 个答案:

没有答案