Skip to content

When the Value_Changed called the text in the segment is align to vertical in android. #99

Description

@Sahithi-Snovasys

I am using this plugin for both iOS and Android.
I am facing a strang issue for Android. Initially the text on the segments is properly aligned but Value_Changed event is fired the text on the segment is aligning to the vertical.

Here is my code:

 <segmentedcontrols:SegmentedControl ValueChanged="SegControl_ValueChanged" x:Name="SegControl" HorizontalOptions="FillAndExpand" TintColor="#0d2241" SelectedSegment="0" BackgroundColor="White">
                            <segmentedcontrols:SegmentedControl.Children>
                                <segmentedcontrols:SegmentedControlOption VerticalOptions="CenterAndExpand" Text="Test" />
                                <segmentedcontrols:SegmentedControlOption VerticalOptions="CenterAndExpand" Text="Sample" />
                              
                            </segmentedcontrols:SegmentedControl.Children>
                        </segmentedcontrols:SegmentedControl>

public async void Handle_ValueChanged(object o, int e)
 {
 switch (e)
 {
 case 0:
 MainPageContainer.Children.Clear();
 MainPageContainer.Children.Add(TestView);
 
 

 break;
 case 1:
 MainPageContainer.Children.Clear();
 MainPageContainer.Children.Add(SampleView);
 
 break;
 }
 }
I dont have any such issues for iOS.

Here is how Iam facing the issue
Screen Shot 2019-04-04 at 07 19 24

Screen Shot 2019-04-04 at 07 19 34

How to resolve this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions