마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 list popupwindow ,popupmenu위치

0 추천

 안드로이드 list popupwindow 위치

fff.JPG

위 사진처럼 버튼의 왼쪽에 메뉴가 나오게하고싶은데 처음에 popupmenu로 했을때는 글씨도 편집이 안돼서

listpopupwindow로 아래처럼은 만들었습니다.

위아래로는 나오는데 위치를 따로 정해줄순 없나요???

그리고 뒷배경을 어둡게만드는것도 따로있나요?

1.JPG KakaoTalk_20140716_211822954.jpg

터끼터끼 (210 포인트) 님이 2014년 7월 17일 질문

2개의 답변

0 추천
/**
     * Set where the optional prompt view should appear. The default is
     * {@link #POSITION_PROMPT_ABOVE}.
     * 
     * @param position A position constant declaring where the prompt should be displayed.
     * 
     * @see #POSITION_PROMPT_ABOVE
     * @see #POSITION_PROMPT_BELOW
     */
    public void setPromptPosition(int position) {
        mPromptPosition = position;
    }



이나..

 

/**
     * Set the horizontal offset of this popup from its anchor view in pixels.
     * 
     * @param offset The horizontal offset of the popup from its anchor.
     */
    public void setHorizontalOffset(int offset) {
        mDropDownHorizontalOffset = offset;
    }

/**
     * Set the vertical offset of this popup from its anchor view in pixels.
     * 
     * @param offset The vertical offset of the popup from its anchor.
     */
    public void setVerticalOffset(int offset) {
        mDropDownVerticalOffset = offset;
        mDropDownVerticalOffsetSet = true;
    }

이나...

/**
     * Set the gravity of the dropdown list. This is commonly used to
     * set gravity to START or END for alignment with the anchor.
     *
     * @param gravity Gravity value to use
     */
    public void setDropDownGravity(int gravity) {
        mDropDownGravity = gravity;
    }

이 메소드 호출하면 조정이 가능할거같습니다...

 

 

 

whdrb19 (23,520 포인트) 님이 2014년 7월 17일 답변
0 추천
배경은 혹시 해결하셨나요?
행인28 (480 포인트) 님이 2016년 7월 15일 답변
...