|
9 | 9 |
|
10 | 10 | import androidx.appcompat.app.AppCompatActivity; |
11 | 11 | import androidx.appcompat.widget.AppCompatImageView; |
| 12 | +import androidx.appcompat.widget.AppCompatTextView; |
12 | 13 | import androidx.core.content.ContextCompat; |
13 | 14 |
|
14 | 15 | import com.cometchat.chatuikit.shared.cometchatuikit.CometChatUIKit; |
@@ -38,6 +39,7 @@ public class MainActivity extends AppCompatActivity { |
38 | 39 |
|
39 | 40 | private AppCompatImageView ivLogo; |
40 | 41 |
|
| 42 | + private AppCompatTextView tvCometChat; |
41 | 43 | private LinearLayout parentView; |
42 | 44 |
|
43 | 45 | @Override |
@@ -69,6 +71,7 @@ public void onError(CometChatException e) { |
69 | 71 | superhero3 = findViewById(R.id.superhero3); |
70 | 72 | superhero4 = findViewById(R.id.superhero4); |
71 | 73 | ivLogo = findViewById(R.id.ivLogo); |
| 74 | + tvCometChat = findViewById(R.id.tvComet); |
72 | 75 | findViewById(R.id.login).setOnClickListener(view -> startActivity(new Intent(MainActivity.this, LoginActivity.class))); |
73 | 76 |
|
74 | 77 | superhero1.setOnClickListener(view -> { |
@@ -117,9 +120,11 @@ private void setUpUI() { |
117 | 120 | if (AppUtils.isNightMode(this)) { |
118 | 121 | Utils.setStatusBarColor(this, ContextCompat.getColor(this, R.color.app_background_dark)); |
119 | 122 | parentView.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(this, R.color.app_background_dark))); |
| 123 | + tvCometChat.setTextColor(getResources().getColor(R.color.app_background)); |
120 | 124 | } else { |
121 | 125 | Utils.setStatusBarColor(this, getResources().getColor(R.color.app_background)); |
122 | 126 | parentView.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.app_background))); |
| 127 | + tvCometChat.setTextColor(getResources().getColor(R.color.app_background_dark)); |
123 | 128 | } |
124 | 129 | } |
125 | 130 |
|
|
0 commit comments