|
@@ -1,6 +1,7 @@
|
|
|
package com.cooleshow.musicmerge.ui.work;
|
|
|
|
|
|
import android.content.Intent;
|
|
|
+import android.graphics.Typeface;
|
|
|
import android.os.Bundle;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
@@ -85,6 +86,32 @@ public class MyWorkActivity extends BaseMVPActivity<AcMyWorkLayoutBinding, MyWor
|
|
|
changeEditBt(position == 1);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ viewBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
|
+ @Override
|
|
|
+ public void onTabSelected(TabLayout.Tab tab) {
|
|
|
+ if (tab != null && tab.getCustomView() != null) {
|
|
|
+ View customView = tab.getCustomView();
|
|
|
+ TextView tv_text = customView.findViewById(R.id.tv_text);
|
|
|
+ tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_333333));
|
|
|
+ tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onTabUnselected(TabLayout.Tab tab) {
|
|
|
+ if (tab != null && tab.getCustomView() != null) {
|
|
|
+ View customView = tab.getCustomView();
|
|
|
+ TextView tv_text = customView.findViewById(R.id.tv_text);
|
|
|
+ tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_666666));
|
|
|
+ tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onTabReselected(TabLayout.Tab tab) {
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private void changeEditBt(boolean isSelectDraft) {
|