[accents] hook VKTabLayout instead of TabLayout
This commit is contained in:
@@ -3,15 +3,15 @@ package ru.vtosters.lite.themes.hooks;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.vk.core.view.VKTabLayout;
|
||||
|
||||
import ru.vtosters.lite.utils.Themes;
|
||||
|
||||
public class TabLayoutHook implements BaseHook {
|
||||
@Override
|
||||
public void inject(View view, int i, boolean z) {
|
||||
if (view instanceof TabLayout) {
|
||||
var tabLayout = (TabLayout) view;
|
||||
if (view instanceof VKTabLayout) {
|
||||
var tabLayout = (VKTabLayout) view;
|
||||
tabLayout.setSelectedTabIndicatorColor(Themes.getAccentColor());
|
||||
tabLayout.setTabRippleColor(ColorStateList.valueOf(Themes.getAccentColor()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user