Skip to content

Commit e2af75b

Browse files
authored
Merge pull request #3 from seebosmile/patch-1
Add custom set paint color
2 parents a821f43 + 77873b7 commit e2af75b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

foldingtabbar/src/main/java/com/srx/widget/TabMainView.java

+9
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,15 @@ public void onUp(int position) {
398398
public void setOnAnimationEndListener(OnAnimationEndListener animationEndListener) {
399399
this.animationEndListener = animationEndListener;
400400
}
401+
402+
public void setTabPaintColor(int tabbarMainColor , int tabbarSecondColor , int tabbarBackgroundColor ) {
403+
404+
colors[0] = getResources().getColor(tabbarMainColor);
405+
colors[1] = getResources().getColor(tabbarSecondColor);
406+
colors[2] = getResources().getColor(tabbarBackgroundColor);
407+
invalidate();
408+
409+
}
401410

402411
public interface OnAnimationEndListener {
403412
void onAnimationEnd();

0 commit comments

Comments
 (0)