mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-13 23:00:45 -04:00
Move VerticalTabLayout.java to use Android Support Design hidden API
This commit is contained in:
parent
cd2c8be5a7
commit
6c373cb9d1
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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.*;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user