Forum Xamarin.Forms

Gray bar on right of entry control in Android only - XF 4.4

DanMiserDanMiser USMember ✭✭

I have a XF app working well and deployed that is using XF 4.3. I went to upgrade to 4.4, and on Android, I now see entry controls being displayed initially with a gray bar on the right-hand side. After maybe half a second, the bar disappears. I see the same behavior with XF 4.5. Note that this does not happen on iOS in either version. I have isolated it down to the one and only change being: XF 4.3.0.991221 behaves well and XF 4.4.0.991640 does not.

Screen shot attached. I'm wondering if anyone has seen this, or has some general pointers. I'm using code for all of the controls, so I'll need to spend some time ripping things out of my production app to get to a stand-alone sample, but I was hoping this might be something that someone else has already seen and dealt with.

Best Answer

  • YelinzhYelinzh Member, Xamarin Team Xamurai
    Accepted Answer

    on Android, I now see entry controls being displayed initially with a gray bar on the right-hand side

    I created a basic demo to test the Entry in Xamarin.Forms 4.4 - 4.5, it worked well. I found a similar link on github, and the author is facing similar problems. the author put the entry in a scrollView and set the style for the Entry.

    After testing with differnet conditions, I got that whening setting HeightRequest and put the Entry in a layout like ScrollView or ListView. When both conditions were met, the gray effect occured.

    <StackLayout>
        <ScrollView>
            <Entry
                HeightRequest="40"
                VerticalOptions="Center"
                Text="wierd effect ->"/>
        </ScrollView>
    </StackLayout>
    

    How did you use the Entry? If the code is the same as I described, try to remove the HeightRequest property of Entry.

    This may be a potential issue, you can report the issue on github to the produce team.

Answers

  • SreeeeSreeee INMember ✭✭✭✭✭

    I am also noticed a gray bar in my pages for the android app, in my case it is at the end of buttons.

    Screenshot:

    My XF version is 4.4.0.991210-pre2.

  • YelinzhYelinzh Member, Xamarin Team Xamurai
    Accepted Answer

    on Android, I now see entry controls being displayed initially with a gray bar on the right-hand side

    I created a basic demo to test the Entry in Xamarin.Forms 4.4 - 4.5, it worked well. I found a similar link on github, and the author is facing similar problems. the author put the entry in a scrollView and set the style for the Entry.

    After testing with differnet conditions, I got that whening setting HeightRequest and put the Entry in a layout like ScrollView or ListView. When both conditions were met, the gray effect occured.

    <StackLayout>
        <ScrollView>
            <Entry
                HeightRequest="40"
                VerticalOptions="Center"
                Text="wierd effect ->"/>
        </ScrollView>
    </StackLayout>
    

    How did you use the Entry? If the code is the same as I described, try to remove the HeightRequest property of Entry.

    This may be a potential issue, you can report the issue on github to the produce team.

  • DanMiserDanMiser USMember ✭✭

    Thanks. The github link was the final piece of the puzzle for me, so I appreciate that. Turns out there are a bunch of issues already out there related to this, with various workarounds suggested. The one that worked for me, and was easiest because I already had a custom renderer that my controls were using, was to add this call (not the Vertical option in the link).

    Control.HorizontalScrollBarEnabled = false;
    

    https://github.com/xamarin/Xamarin.Forms/issues/9591

Sign In or Register to comment.