Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

fix TabViewIndicator position on RTL #1983

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,8 @@ void UpdateTabIndicatorPosition(ItemsViewScrolledEventArgs args)
void UpdateTabIndicatorPosition(View currentTabViewItem)
{
var width = TabIndicatorWidth > 0 ? (currentTabViewItem.Width - tabStripIndicator.Width) : 0;
var position = currentTabViewItem.X + (width / 2) - 1;
tabStripIndicator.TranslateTo(position, 0, tabIndicatorAnimationDuration, Easing.Linear);
var position = (currentTabViewItem.Width * SelectedIndex) + (width / 2) - 1;
tabStripIndicator.TranslateTo(FlowDirection == FlowDirection.RightToLeft ? -position : position, 0, tabIndicatorAnimationDuration, Easing.Linear);
}

internal virtual void OnTabSelectionChanged(TabSelectionChangedEventArgs e)
Expand Down