FlagchatAdapter는 마법에 걸린 재활용 재활용기 뷰 어댑터를 쉽게 구현할 수 있습니다. Adapter를 flagchatadapter로 확장하고 몇 가지 방법과 짜잔을 구현하십시오! 휴대 전화에서 가장 아름다운 채팅이 있습니다. 보일러 플레이트 코드 제로, 변수를 올바른 방향으로 넣으십시오.

FlagChatAdapter Maven, Gradle 또는 수동으로 설치할 수 있습니다.
1 단계. 빌드 파일에 Jitpack 저장소 추가
< repositories >
< repository >
< id >jitpack.io</ id >
< url >https://jitpack.io</ url >
</ repository >
</ repositories >2 단계. 종속성을 추가하십시오
< dependency >
< groupId >com.github.salmaanahmed</ groupId >
< artifactId >FlagChatAdapter</ artifactId >
< version >1.0.1</ version >
</ dependency >1 단계. 빌드 파일에 Jitpack 저장소 추가
allprojects {
repositories {
.. .
maven { url ' https://jitpack.io ' }
}
}2 단계. 종속성을 추가하십시오
dependencies {
implementation ' com.github.salmaanahmed:FlagChatAdapter:1.0.1 '
}위에서 언급 한 종속성 관리자 중 하나를 사용하지 않으려면 Java 폴더에 포함 된 파일을 프로젝트에 추가하여 FlagchatAdapter를 프로젝트에 수동으로 통합 할 수 있습니다.
Flagchatadapter로 어댑터를 확장하고 어댑터로 컨텍스트를 전달하십시오.
class ChatAdapter ( context : Context , private var list : ArrayList < Any >) : FlagChatAdapter(context)필요한 방법과 변수를 구현합니다. 하나의 줄 함수를 작성하십시오. 그렇게 간단하지 않습니까?) 세부 사항 설명을 위해 샘플을 볼 수 있습니다.
// return chat message on the position passed as parameter
abstract fun chatMessage ( position : Int ): String
// return time of message as string format on the position passed as parameter
abstract fun messageTime ( position : Int ): String
// return message sender on the position passed as parameter, if its you, return true
abstract fun isMe ( position : Int ): Boolean
// you must have a variable of animation in the object i.e. if you want to animate or not
abstract fun animation ( position : Int ): Boolean
// the animation variable must be set to false when animation is performed once, otherwise flags will animate on every scroll
abstract fun setAnimationStatus ( position : Int , animationStatus : Boolean )
// Name of the sender
abstract val otherName : String
// You shall simply return list.size
abstract val listSize : Int당신은 또한 Longclickevents를 얻었습니다
// You can implement whatever you want onLongClick event
abstract fun onMessageLongClicked ( position : Int )제공된 사용자 정의로 채팅을 아름답게하십시오. 깃발 색상을 변경할 수도 있습니다. 구현하기가 매우 간단하고 멋지게 보입니다. 샘플 앱에서 자세한 내용을 찾을 수 있습니다.
FlagChatAdapter MIT 라이센스에 따라 제공됩니다. 자세한 내용은 라이센스 파일을 참조하십시오.
풀 요청을 환영합니다! 최상의 기여는 일반적인 앱 라이프 사이클 동안 메인 스레드를 차단하는 것으로 알려진 클래스/메소드에 대한 대체 또는 구성으로 구성됩니다.
앱에서 Flagchatadapter를 사용하고 있는지 알고 싶습니다. Salmaan Ahmed에게 이메일을 보내십시오.