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

xml에서 textview_wrapcontent_resizesurrounded 에러 #19

Closed
lsb156 opened this issue Dec 1, 2014 · 5 comments
Closed

xml에서 textview_wrapcontent_resizesurrounded 에러 #19

lsb156 opened this issue Dec 1, 2014 · 5 comments

Comments

@lsb156
Copy link

lsb156 commented Dec 1, 2014

안녕하세요 ScalableLayout로 어플만들고있습니다.
그런데 버그가 있는거 같아서 문의 드립니다.
XML 내에서 텍스트 사이즈를 딱 맞게 줄이려고
sl:textview_wrapcontent_direction="right"
sl:textview_wrapcontent_resizesurrounded="true" 로 쓰고있는데
그 부모들의 left나 top가 1이라도 있는 경우 출력자체가 안되는 버그가 있습니다.
부모뿐만 아니라 부모의 부모를 쭉 타고가서 루트까지 전부 left top이 0이여야 제대로 보여지는 현상이 있어서 이슈 적어봅니다.

@ssomai
Copy link
Owner

ssomai commented Dec 1, 2014

안녕하세요~.

혹시 제가 재현해볼수 있게 간단한 코드로 주실수 있을까요? ㅎ
java code나 xml 아무거나 주시면 될것 같습니다~.

이슈주셔서 감사합니다~.

@lsb156
Copy link
Author

lsb156 commented Dec 1, 2014

지금 커스텀뷰랑 add뷰랑 여러개가 섞여서 원래있는 소스는 드릴수 없는점 죄송합니다.
activity에 바로 그 부분 소스만 넣어보니 잘 작동하는게 이상합니다 -_-;;
그래서 이것저것 해보는도중 비슷한 오류가 하나 나서 소스 올려 드립니다.

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

    <LinearLayout
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="314"
    android:orientation="vertical" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <com.jnm.android.widget.ScalableLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                sl:scale_base_height="192"
                sl:scale_base_width="314"
                sl:scale_height="207"
                sl:scale_width="314" >

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="#f2f2f2"
                    android:orientation="vertical"
                    sl:scale_height="207"
                    sl:scale_left="0"
                    sl:scale_top="0"
                    sl:scale_width="247" >

                    <com.jnm.android.widget.ScalableLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="#FF0"
                        sl:scale_base_height="20"
                        sl:scale_base_width="247"
                        sl:scale_height="20"
                        sl:scale_width="247" >

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:orientation="horizontal"
                            sl:scale_height="20"
                            sl:scale_width="247" >

                            <com.jnm.android.widget.ScalableLayout
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:background="#f0f"
                                sl:scale_base_height="20"
                                sl:scale_base_width="80"
                                sl:scale_height="20"
                                sl:scale_width="80" >

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="match_parent"
                                    android:gravity="center_vertical"
                                    android:text="안나오는 텍스트"
                                    android:textColor="#666666"
                                    sl:scale_height="20"
                                    sl:scale_textsize="11"
                                    sl:scale_width="80"
                                    sl:textview_wrapcontent_direction="right"
                                    />
                            </com.jnm.android.widget.ScalableLayout>
                        </LinearLayout>
                    </com.jnm.android.widget.ScalableLayout>
                </LinearLayout>
            </com.jnm.android.widget.ScalableLayout>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>

마지막쪽 textview에 sl:textview_wrapcontent_resizesurrounded을 true로 주시면 텍스트가 안나옵니다.
아마 제가 났던 오류와 비슷한 오류가 아닐까 생각됩니다.
true로 할때 안나오는 부분이 좀 있는거 같습니다.

ScalableLayout java소스는 오늘 업데이트하여 최신소스입니다.

@ssomai
Copy link
Owner

ssomai commented Dec 2, 2014

답장이 늦었습니다. ㅠㅠ

일이 많다보니 아직 확인을 못했네요.

샘플코드 주셔서 감사합니다!!!

확인해보고 다시 코멘트 달겠습니다~

@ssomai
Copy link
Owner

ssomai commented Feb 4, 2015

아;;; ㅠㅠㅠㅠㅠㅠㅠ 죄송합니다.
요즘 다사다난하다보니... ㅠㅠㅠ
깜빡했었습니다. ㅠㅠㅠㅠㅠㅠ

빨리 확인 드리고 다시 코멘트 달겠습니다 ㅠㅠㅠㅠㅠㅠㅠ

@ssomai
Copy link
Owner

ssomai commented Aug 3, 2015

오 확인해보니까
중간쯤에

에서 layout_width="0dp" 라서 인것 같아요.
그래서

로 바꾸니까 잘 나와요~ ㅎ

@ssomai ssomai closed this as completed Aug 3, 2015
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