From a75bcc5d35f27bf0e39b4083960096b6f89cf810 Mon Sep 17 00:00:00 2001 From: Ztiany Date: Mon, 18 Nov 2019 11:00:33 +0800 Subject: [PATCH] optimize TabManager --- .../com/android/base/app/fragment/tools/TabManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_base/src/main/java/com/android/base/app/fragment/tools/TabManager.java b/lib_base/src/main/java/com/android/base/app/fragment/tools/TabManager.java index dbc1f0c..727e8b8 100644 --- a/lib_base/src/main/java/com/android/base/app/fragment/tools/TabManager.java +++ b/lib_base/src/main/java/com/android/base/app/fragment/tools/TabManager.java @@ -155,7 +155,11 @@ public abstract class TabManager { } FragmentInfo homePage() { - return mPages.get(0); + return mPages.get(defaultIndex()); + } + + protected int defaultIndex() { + return 0; } public int size() {