 |
Q.
애트리뷰트에는 존재하는데 실제로는 적용이 안되는듯 싶네요
이부분에 대해서 혹시 아시는 분 계신가요?
A.
아래와 같은 방식으로 TextView를 ScrollView로 Wrapping하셔야 될 듯합니다.
오류 : TextView에 android:scrollbars="vertical" attribute를 사용할 경우.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="30sp" android:scrollbars="vertical" <- 이 구조로는 scrollbar가 생성되지 않습니다. > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="10px" android:text="가나다라마바사아자차카타파하nabcdefghijklmnopqrstuvwxyznABCDEFGHIJKLMNOPQRSTUVWXYZn가나다라마바사아자차카타파하nabcdefghijklmnopqrstuvwxyznABCDEFGHIJKLMNOPQRSTUVWXYZ" /> </LinearLayout>
해법 : TextView를 ScrollView로 Wrapping
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="30sp" android:scrollbarFadeDuration="1000" android:scrollbarSize="12dip">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="10px" android:text="가나다라마바사아자차카타파하nabcdefghijklmnopqrstuvwxyznABCDEFGHIJKLMNOPQRSTUVWXYZn가나다라마바사아자차카타파하nabcdefghijklmnopqrstuvwxyznABCDEFGHIJKLMNOPQRSTUVWXYZ" /> </LinearLayout> </ScrollView> |
※ 회원등급 레벨 0 이상 읽기가 가능한 게시판입니다.
50
|