Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scalablelayout 사용시 getLayoutParams.width 값 관련 #62

Open
JinohK opened this issue Aug 8, 2018 · 1 comment
Open

scalablelayout 사용시 getLayoutParams.width 값 관련 #62

JinohK opened this issue Aug 8, 2018 · 1 comment

Comments

@JinohK
Copy link

JinohK commented Aug 8, 2018

width 값이 필요한 상황인데, 어떤 부분에서는 값이 잘 나오고 어떤 부분에서는 -2가 나오는 상황입니다.

어떤이유인지 전혀 감히안잡히는 상황인데 어떤부분을 확인해봐야할까요?

@ssomai
Copy link
Owner

ssomai commented Aug 8, 2018

getLayoutParams.width가 -2로 나오는 이유는 그 레이아웃의 width에 세팅된 값이 LayoutParams.WRAP_CONTENT라서 일거에요.

https://developer.android.com/reference/kotlin/android/view/ViewGroup.LayoutParams#wrap_content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants