Bug 1321981 - [RTL] ViewPager Support - part 3. Skip set current item if adapter is empty, r=sebastian

MozReview-Commit-ID: L82yxhdG5bd

--HG--
extra : rebase_source : 71615c37c4e5b4abc67d2eb92a6e4662dc59b149
This commit is contained in:
maliu 2017-03-21 14:58:03 +08:00
Родитель a699dea057
Коммит 3fc1180e7a
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -129,7 +129,7 @@ public class RtlViewPager extends ViewPager {
registerRtlDataSetObserver(adapter);
}
super.setAdapter(adapter);
if (rtlReady) {
if (rtlReady && adapter.getCount() > 0) {
setCurrentItemWithoutNotification(0);
}
}