ListView에 Scrollbar 감추기

listview.xml

<ListView android:id="@+id/listview" ... android:scrollbars="none" >

ListView에 이동하는 스크롤바 적용하기(fast scroll)

listview.xml

<ListView android:id="@+id/listview" ... android:fastScrollEnabled="true" >


자바코드(or Activity)에서 string.xml 값 가져오기

String st1 = getString(R.string.s1);
CharSequence st2 = getText(R.string.s2);


 실행환경

 Desktop

 조립식

 CPU

 Intel(R) Core(TM) i7-3770 3.50GHz

 Memory

 4 GB

 OS

 Window 7 Professional 32bit

 Java

 1.7.0_51

 Android

 SDK : 4.4.2 (KitKat) / 테스트기기 : Galaxy S3 4.3(Jelly Bean)

 WebServer

 Apache Tomcat 7.0

 DB

 MySQL 5.6.15


문제점

xml에서 개행(엔터)을 넣어주고 싶을 경우.


해결방안

개행할 곳에 \n을 넣어준다.

<string name="msg">
    개행하기\n
    두번째 줄</string>


res - values - strings.xml 에서 굵게하고 싶은 글자에 <b> 태그를 넣는다.

<string name="msg">
    <b>GPS 사용 시 실내에선 정확하지 않을 수도 있습니다.</b>   
</string>


+ Recent posts