카카오톡 채팅방 추가 버튼

조회수 3452회

1

이사진보면 왼쪽 이미지의 오른쪽밑에 +버튼있잖아요. 이렇게 채팅방 목록에서 버튼만 그자리에 계속 띄우고 싶은데 이거 어떻게 하는건가요?

1 답변

  • 좋아요

    0

    싫어요
    채택 취소하기

    1 이런 버튼을 말씀하시는 거라면 아래의 링크에서 제공되는 오픈소스를 적용하면 좋을것 같습니다. https://github.com/gowong/material-sheet-fab

    사용법이라면 build.gradle에 compile 'com.gordonwong:material-sheet-fab:1.2.1'를 적용하시고

    클래스를 만들어서 FAB버튼을 구현해주시면 됩니다.

    import android.support.design.widget.FloatingActionButton;
    
    public class Fab extends FloatingActionButton implements AnimatedFab {
    
       /**
        * Shows the FAB.
        */
        @Override
        public void show() {
            show(0, 0);
        }
    
        /**
         * Shows the FAB and sets the FAB's translation.
         *
         * @param translationX translation X value
         * @param translationY translation Y value
         */
        @Override
        public void show(float translationX, float translationY) {
            // NOTE: Using the parameters is only needed if you want
            // to support moving the FAB around the screen.
            // NOTE: This immediately hides the FAB. An animation can 
            // be used instead - see the sample app.
            setVisibility(View.VISIBLE);
        }
    
        /**
         * Hides the FAB.
         */
        @Override
        public void hide() {
            // NOTE: This immediately hides the FAB. An animation can
            // be used instead - see the sample app.
            setVisibility(View.INVISIBLE);
        }
    }
    

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)