본문 바로가기

Kotlin/안드로이드 공부

toast 대신 crouton

728x90

크루통ㅋㅋㅋ 뭔가 했더니 수프에 넣는 그 빵같은거..귀엽다

 

https://github.com/keyboardsurfer/Crouton

 

keyboardsurfer/Crouton

Context sensitive notifications for Android . Contribute to keyboardsurfer/Crouton development by creating an account on GitHub.

github.com

 

github보고 코드만 넣어서 쓰면 되는데 ㅠ

크루통코드실행하고 finish()하면 너무 빨리닫혀서 duration조절하려했는데 예시가 너무 없어서 방법을 못찾겠다 ..흑

크루통helper도 못쓰겠고..

https://github.com/codepath/android-crouton-sample

 

가장 원하는 방법은 main에서 다른 액티비티를 부르고 수정이 완료되어 main으로 돌아가면 여기에서 

크루통을 띄우는 건데...코틀린 초보는 웁니다...

 

 

-

 

https://github.com/codepath/android-crouton-sample

 

codepath/android-crouton-sample

Demonstrates how to use the crouton alert library. Contribute to codepath/android-crouton-sample development by creating an account on GitHub.

github.com

crouton 설정

val style = Style.Builder().setConfiguration(Configuration.Builder().setDuration(5000).build()).build()

Crouton.makeText(this, "내용이 수정되었습니다", style).show()
https://stackoverflow.com/questions/20234873/setting-the-duration-of-crouton-messages-in-android

 

Setting the duration of Crouton messages in Android

I have started using Crouton messages instead of toast messages because I could configure the time duration. Is there any way I can keep displaying the crouton message until a particular event rather

stackoverflow.com

 

'Kotlin > 안드로이드 공부' 카테고리의 다른 글

kotlin notification (firebase-fcm)  (0) 2020.03.29
가로모드로 고정  (0) 2020.03.21
프래그먼트, Glide 라이브러리  (0) 2020.03.13
Content Provider  (0) 2020.03.13
커스텀 뷰, onDraw()  (0) 2020.03.13