Browse Source

优化代码写法

Pq 4 months ago
parent
commit
146dfc5183

+ 2 - 2
student/src/main/java/com/cooleshow/student/ui/course/AppointmentCourseActivity.java

@@ -143,7 +143,7 @@ public class AppointmentCourseActivity extends BaseMVPActivity<ActivityAppointme
             public void onTabSelected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_131415));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
@@ -154,7 +154,7 @@ public class AppointmentCourseActivity extends BaseMVPActivity<ActivityAppointme
             public void onTabUnselected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_80000000));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));

+ 2 - 2
student/src/main/java/com/cooleshow/student/ui/course/MineCourseActivity.java

@@ -130,7 +130,7 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
             public void onTabSelected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_131415));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
@@ -141,7 +141,7 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseBindin
             public void onTabUnselected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_80000000));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));

+ 2 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/course/MineCourseActivity.java

@@ -135,7 +135,7 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseLayout
             public void onTabSelected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_131415));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
@@ -146,7 +146,7 @@ public class MineCourseActivity extends BaseMVPActivity<ActivityMineCourseLayout
             public void onTabUnselected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_80000000));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));

+ 2 - 2
teacher/src/main/java/com/cooleshow/teacher/ui/course/PianoCourseGroupDetailActivity.java

@@ -152,7 +152,7 @@ public class PianoCourseGroupDetailActivity extends BaseMVPActivity<AcPianoCours
             public void onTabSelected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_131415));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
@@ -163,7 +163,7 @@ public class PianoCourseGroupDetailActivity extends BaseMVPActivity<AcPianoCours
             public void onTabUnselected(TabLayout.Tab tab) {
                 if (tab != null && tab.getCustomView() != null) {
                     View customView = tab.getCustomView();
-                    TextView tv_text = customView.findViewById(com.cooleshow.chatmodule.R.id.tv_text);
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
                     tv_text.setTextSize(16);
                     tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_80000000));
                     tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));