Move VerticalTabLayout.java to use Android Support Design hidden API

This commit is contained in:
khanhduytran0 2020-10-03 18:51:58 +07:00
parent cd2c8be5a7
commit 6c373cb9d1
2 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.kdt.pojavlaunch.launcheruiv3; package android.support.design.widget;
import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP; import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
import static android.support.v4.view.ViewPager.SCROLL_STATE_DRAGGING; import static android.support.v4.view.ViewPager.SCROLL_STATE_DRAGGING;
@ -2159,7 +2159,7 @@ public class VerticalTabLayout extends ScrollView {
* A {@link TabLayout.OnTabSelectedListener} class which contains the necessary calls back * A {@link TabLayout.OnTabSelectedListener} class which contains the necessary calls back
* to the provided {@link ViewPager} so that the tab position is kept in sync. * to the provided {@link ViewPager} so that the tab position is kept in sync.
*/ */
public static class ViewPagerOnTabSelectedListener implements TabLayout.OnTabSelectedListener { public static class ViewPagerOnTabSelectedListener implements VerticalTabLayout.OnTabSelectedListener {
private final ViewPager mViewPager; private final ViewPager mViewPager;
public ViewPagerOnTabSelectedListener(ViewPager viewPager) { public ViewPagerOnTabSelectedListener(ViewPager viewPager) {
@ -2167,17 +2167,17 @@ public class VerticalTabLayout extends ScrollView {
} }
@Override @Override
public void onTabSelected(TabLayout.Tab tab) { public void onTabSelected(VerticalTabLayout.Tab tab) {
mViewPager.setCurrentItem(tab.getPosition()); mViewPager.setCurrentItem(tab.getPosition());
} }
@Override @Override
public void onTabUnselected(TabLayout.Tab tab) { public void onTabUnselected(VerticalTabLayout.Tab tab) {
// No-op // No-op
} }
@Override @Override
public void onTabReselected(TabLayout.Tab tab) { public void onTabReselected(VerticalTabLayout.Tab tab) {
// No-op // No-op
} }
} }

View File

@ -4,6 +4,7 @@ import android.app.*;
import android.content.*; import android.content.*;
import android.graphics.*; import android.graphics.*;
import android.os.*; import android.os.*;
import android.support.design.widget.*;
import android.support.v4.app.*; import android.support.v4.app.*;
import android.support.v7.app.*; import android.support.v7.app.*;
import android.text.*; import android.text.*;