답변:
에서 strings.xml, 당신은 단순히 백 슬래시 특수 문자 (예 : 큰 따옴표)를 탈출 할 수 있습니다 :
"message \"quote string 1\" and \"quote string 2\" end message"
그러나 뷰 xml (예 :) layout.xml에서는 HTML 문자 엔티티 (예 :)를 사용해야합니다 ".
"message "quote string 1" and "quote string 2" end message"
자세한 내용은 http://developer.android.com/guide/topics/resources/string-resource.html을 방문 하십시오.
"이 하드 코드 문제를 해결 하려면 기호를 사용하십시오. :)
android:text="message "quote string 1""
strings.xml은 큰 문제입니다.
모든 xml 파일에서 유니 코드를 사용할 수 있습니다.
android:text="message \u0022quote string 1\u0022 and \u0022quote string 2\u0022 end message"
http://www.fileformat.info/info/unicode/char/0022/index.htm C / C ++ / Java 소스 코드 까지 아래로 스크롤 합니다.
<TextView
style="@style/TextStyle"
android:text='message "quote string 1" and "quote string 2" end message'
android:id="@+id/lblAboutPara3"
android:autoLink="web"/>
문자열에 큰 따옴표가 있으면이를 이스케이프 (\ ") 해야합니다 . 문자열을 작은 따옴표로 묶는 것은 작동하지 않습니다.
strings.xml에서
<string name="good_example">This is a \"good string\".</string>
출처 : http://developer.android.com/guide/topics/resources/string-resource.html