기능추가 : 커스텀 에디트뷰#23
Open
huhsay wants to merge 2 commits into
Open
Conversation
low version can't open 'line_bottom.xml' file in 'drawable-v24' or 'drawable-v21' dir so copy 'line_bottom.xml' to 'drawable' dir
ch-Yoon
reviewed
Jan 20, 2019
| } | ||
|
|
||
|
|
||
| @Override |
There was a problem hiding this comment.
그룹화 시키고 싶은 함수들은 엔터 1번, 다른 그룹의 함수들을 엔터 2번으로 구분되어 있네요.
자체적인 코드 컨벤션을 지키는 것 같아 보기 좋네요 :)
ch-Yoon
reviewed
Jan 20, 2019
| android:viewportWidth="24.0" | ||
| android:viewportHeight="24.0"> | ||
| <path | ||
| android:fillColor="#FF000000" |
Author
There was a problem hiding this comment.
안드로이드 자체 백터이미지를 가져온거라 생각하지 못했던 부분입니다. 감사합니다 😄
parkdaye
reviewed
Jan 20, 2019
| @Override | ||
| public boolean onTouch(View v, MotionEvent event) { | ||
| final int x = (int) event.getX(); | ||
| if (clearDrawable.isVisible() && x > getWidth() - getPaddingRight() - clearDrawable.getIntrinsicWidth()) { |
Author
There was a problem hiding this comment.
에디트뷰 오른쪽에 x이미지를 붙여놓은 상태입니다.
때문에 터치된 x좌표가 전체 뷰의 크기에서 패딩과, x이미지의 가로크리를 뺀 좌표 이상이면 x 이미지가 클릭된 것으로 간주한 것입니다.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
커스텀 에디트뷰
X버튼을 추가하여, 검색어 작성후 에디트뷰의 text를 지우는 기능을 추가하였습니다.drawable 파일 호환성