This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChatAdapter( | |
private val listener: ListListener | |
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { | |
private val DIFF_CALLBACK = object : DiffUtil.ItemCallback<EkoMessage>() { | |
override fun areItemsTheSame(oldItem: EkoMessage, newItem: EkoMessage): Boolean { | |
return oldItem.getMessageId() == newItem.getMessageId() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.google.android.exoplayer2.ui.PlayerView | |
android:id="@+id/matchPlayer" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:controller_layout_id="@layout/exoplay_custom_ui" | |
app:layout_constraintTop_toTopOf="parent"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HomeVideoFragment() : Fragment(R.layout.video_player) { | |
var fullScreen = 0 | |
var name = "" | |
var url = "" | |
var count = 0 | |
var videoThumbnail = "" | |
var currentPosition: Long = 0 | |
var playWhenReady = true | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<include | |
android:id="@+id/chat_reply" | |
layout="@layout/chat_reply" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_above="@+id/chat_text_input_player" | |
android:layout_marginEnd="0dp" | |
android:layout_marginBottom="0dp" | |
android:visibility="gone" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun initEkoClient() { | |
EkoClient.setup(apikey) | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe() | |
EkoClient.registerDevice(userID) | |
.displayName(userName) | |
.build() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App : Application(){ | |
override fun onCreate() { | |
super.onCreate() | |
EkoClient.setup(API_KEY) | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe() | |
EkoClient.registerDevice("Mobile_USER") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ListListener { | |
fun onItemClick(chatItem: EkoMessage, position: Int, holder: View) | |
fun onItemLongClick(chatItem: EkoMessage, position: Int, holder: View) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/container" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_margin="5dp" | |
android:clickable="true" | |
android:focusable="true"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/container" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:clickable="true" | |
android:focusable="true" | |
android:padding="10dp"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<androidx.recyclerview.widget.RecyclerView | |
android:id="@+id/content_recycler" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:keepScreenOn="false" |
OlderNewer