Skip to content

Commit fe7ba3b

Browse files
Merge pull request #69 from cometchat/dev
v1.0.5
2 parents cb45e9d + 878d2cd commit fe7ba3b

6 files changed

Lines changed: 345 additions & 324 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ This is a reference application showcasing the integration of [**CometChat's And
2424
public static final String REGION = "XX";
2525
```
2626
4. Run the app on a device or emulator.
27-
28-
![image (2)](https://github.com/cometchat/cometchat-sample-app-android-java/assets/2210730/5f78442e-11f1-438f-9344-d379a865a529)
27+
28+
<div style="
29+
display: flex;
30+
align-items: center;
31+
justify-content: center;">
32+
<img src="./Screenshots/main_screen.png" alt="login" width="300">
33+
</div>
2934
3035
## Help and Support
3136
For issues running the project or integrating with our UI Kits, consult our [documentation](https://www.cometchat.com/docs/android-uikit/integration) or create a [support ticket](https://help.cometchat.com/hc/en-us) or seek real-time support via the [CometChat Dashboard](http://app.cometchat.com/).

Screenshots/main_screen.png

207 KB
Loading

Screenshots/uikit_screens.png

-69.2 KB
Binary file not shown.

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
applicationId "com.cometchat.javasampleapp"
1010
minSdk 21
1111
targetSdk 33
12-
versionCode 5
13-
versionName "1.0.4"
12+
versionCode 6
13+
versionName "1.0.5"
1414

1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
manifestPlaceholders = [file_provider: "com.cometchat.javasampleapp"]
@@ -33,7 +33,7 @@ android {
3333
}
3434

3535
dependencies {
36-
implementation 'com.cometchat:chat-uikit-android:4.2.+'
36+
implementation 'com.cometchat:chat-uikit-android:4.+'
3737
implementation 'androidx.appcompat:appcompat:1.6.1'
3838
implementation 'com.google.android.material:material:1.8.0'
3939
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

app/src/main/java/com/cometchat/javasampleapp/activity/MainActivity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import androidx.appcompat.app.AppCompatActivity;
1111
import androidx.appcompat.widget.AppCompatImageView;
12+
import androidx.appcompat.widget.AppCompatTextView;
1213
import androidx.core.content.ContextCompat;
1314

1415
import com.cometchat.chatuikit.shared.cometchatuikit.CometChatUIKit;
@@ -38,6 +39,7 @@ public class MainActivity extends AppCompatActivity {
3839

3940
private AppCompatImageView ivLogo;
4041

42+
private AppCompatTextView tvCometChat;
4143
private LinearLayout parentView;
4244

4345
@Override
@@ -69,6 +71,7 @@ public void onError(CometChatException e) {
6971
superhero3 = findViewById(R.id.superhero3);
7072
superhero4 = findViewById(R.id.superhero4);
7173
ivLogo = findViewById(R.id.ivLogo);
74+
tvCometChat = findViewById(R.id.tvComet);
7275
findViewById(R.id.login).setOnClickListener(view -> startActivity(new Intent(MainActivity.this, LoginActivity.class)));
7376

7477
superhero1.setOnClickListener(view -> {
@@ -117,9 +120,11 @@ private void setUpUI() {
117120
if (AppUtils.isNightMode(this)) {
118121
Utils.setStatusBarColor(this, ContextCompat.getColor(this, R.color.app_background_dark));
119122
parentView.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(this, R.color.app_background_dark)));
123+
tvCometChat.setTextColor(getResources().getColor(R.color.app_background));
120124
} else {
121125
Utils.setStatusBarColor(this, getResources().getColor(R.color.app_background));
122126
parentView.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.app_background)));
127+
tvCometChat.setTextColor(getResources().getColor(R.color.app_background_dark));
123128
}
124129
}
125130

0 commit comments

Comments
 (0)