File tree Expand file tree Collapse file tree 7 files changed +25
-15
lines changed
java/com/example/chattutorialjava
src/main/java/com/example/chattutorial Expand file tree Collapse file tree 7 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ android {
3737}
3838
3939dependencies {
40- implementation " io.getstream:stream-chat-android-ui-components:4.5.1 "
40+ implementation " io.getstream:stream-chat-android-ui-components:4.5.3 "
4141 implementation ' io.coil-kt:coil:1.1.1'
4242
4343 implementation " androidx.recyclerview:recyclerview:1.1.0"
4444 implementation " androidx.appcompat:appcompat:1.2.0"
4545 implementation " androidx.constraintlayout:constraintlayout:2.0.4"
46- implementation " com.google.android.material:material:1.2.1 "
46+ implementation " com.google.android.material:material:1.3.0 "
4747}
Original file line number Diff line number Diff line change @@ -41,11 +41,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
4141 user .getExtraData ().put ("name" , "Paranoid Android" );
4242 user .getExtraData ().put ("image" , "https://bit.ly/2TIt8NR" );
4343
44- client .setUser (
44+ client .connectUser (
4545 user ,
46- "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoic3VtbWVyLWJyb29rLTIifQ.CzyOx8kgrc61qVbzWvhV1WD3KPEo5ZFZH-326hIdKz0" ,
47- null
48- );
46+ "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoic3VtbWVyLWJyb29rLTIifQ.CzyOx8kgrc61qVbzWvhV1WD3KPEo5ZFZH-326hIdKz0"
47+ ).enqueue ();
4948
5049 // Step 3 - Set the channel list filter and order
5150 // This can be read as requiring only channels whose "type" is "messaging" AND
Original file line number Diff line number Diff line change 2020 app : layout_constraintBottom_toTopOf =" @+id/messageInputView"
2121 app : layout_constraintEnd_toEndOf =" parent"
2222 app : layout_constraintStart_toStartOf =" parent"
23- app : layout_constraintTop_toBottomOf =" @+id/messagesHeaderView" />
23+ app : layout_constraintTop_toBottomOf =" @+id/messagesHeaderView"
24+ app : streamUiMessageBackgroundColorMine =" #70AF74"
25+ app : streamUiMessageBackgroundColorTheirs =" #FFF"
26+ app : streamUiMessageTextColorMine =" #FFF"
27+ app : streamUiMessageTextColorTheirs =" #000" />
2428
2529 <io .getstream.chat.android.ui.textinput.MessageInputView
2630 android : id =" @+id/messageInputView"
Original file line number Diff line number Diff line change 3030 app : layout_constraintBottom_toTopOf =" @+id/messageInputView"
3131 app : layout_constraintEnd_toEndOf =" parent"
3232 app : layout_constraintStart_toStartOf =" parent"
33- app : layout_constraintTop_toBottomOf =" @+id/typingHeaderView" />
33+ app : layout_constraintTop_toBottomOf =" @+id/typingHeaderView"
34+ app : streamUiMessageBackgroundColorMine =" #70AF74"
35+ app : streamUiMessageBackgroundColorTheirs =" #FFF"
36+ app : streamUiMessageTextColorMine =" #FFF"
37+ app : streamUiMessageTextColorTheirs =" #000" />
3438
3539 <io .getstream.chat.android.ui.textinput.MessageInputView
3640 android : id =" @+id/messageInputView"
Original file line number Diff line number Diff line change 2525 <io .getstream.chat.android.ui.messages.view.MessageListView
2626 android : id =" @+id/messageListView"
2727 android : layout_width =" match_parent"
28-
2928 android : layout_height =" 0dp"
3029 android : background =" #f3f5f8"
3130 app : layout_constraintBottom_toTopOf =" @+id/messageInputView"
3231 app : layout_constraintEnd_toEndOf =" parent"
3332 app : layout_constraintStart_toStartOf =" parent"
34- app : layout_constraintTop_toBottomOf =" @+id/typingHeaderView" />
33+ app : layout_constraintTop_toBottomOf =" @+id/typingHeaderView"
34+ app : streamUiMessageBackgroundColorMine =" #70AF74"
35+ app : streamUiMessageBackgroundColorTheirs =" #FFF"
36+ app : streamUiMessageTextColorMine =" #FFF"
37+ app : streamUiMessageTextColorTheirs =" #000" />
3538
3639 <io .getstream.chat.android.ui.textinput.MessageInputView
3740 android : id =" @+id/messageInputView"
Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ android {
3939}
4040
4141dependencies {
42- implementation " io.getstream:stream-chat-android-ui-components:4.5.1 "
42+ implementation " io.getstream:stream-chat-android-ui-components:4.5.3 "
4343 implementation ' io.coil-kt:coil:1.1.1'
4444
4545 implementation " androidx.recyclerview:recyclerview:1.1.0"
4646 implementation ' androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-rc01'
4747 implementation " androidx.appcompat:appcompat:1.2.0"
4848 implementation " androidx.constraintlayout:constraintlayout:2.0.4"
4949 implementation ' androidx.activity:activity-ktx:1.1.0'
50- implementation " com.google.android.material:material:1.2.1 "
50+ implementation " com.google.android.material:material:1.3.0 "
5151}
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ class MainActivity : AppCompatActivity() {
3737 extraData[" name" ] = " Paranoid Android"
3838 extraData[" image" ] = " https://bit.ly/2TIt8NR"
3939 }
40- client.setUser (
40+ client.connectUser (
4141 user = user,
4242 token = " eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoic3VtbWVyLWJyb29rLTIifQ.CzyOx8kgrc61qVbzWvhV1WD3KPEo5ZFZH-326hIdKz0"
43- )
43+ ).enqueue()
4444
4545 // Step 3 - Set the channel list filter and order
4646 // This can be read as requiring only channels whose "type" is "messaging" AND
@@ -55,7 +55,7 @@ class MainActivity : AppCompatActivity() {
5555 // Step 4 - Connect the ChannelsViewModel to the ChannelsView, loose coupling makes it easy to customize
5656 viewModel.bindView(binding.channelsView, this )
5757 binding.channelsView.setChannelItemClickListener { channel ->
58- startActivity(ChannelActivity2 .newIntent(this , channel))
58+ startActivity(ChannelActivity4 .newIntent(this , channel))
5959 }
6060 }
6161}
You can’t perform that action at this time.
0 commit comments