반응형
XML 파일을 통해 TextView 굵게 표시 하시겠습니까?
XML을 통해 TextView에서 텍스트를 굵게 표시하는 방법이 있습니까?
<TextView
android:textSize="12dip"
android:textAppearance="bold" -> ??
</TextView>
감사
다음과 같은 프로젝트가 있습니다 TextView
.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="@string/app_name"
android:layout_gravity="center"
/>
그래서 당신이 사용해야한다고 생각합니다. android:textStyle
그냥 사용
android:textStyle="bold"
예:
사용하다: android:textStyle="bold"
<TextView
android:id="@+id/txtVelocidade"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/txtlatitude"
android:layout_centerHorizontal="true"
android:layout_marginBottom="34dp"
android:textStyle="bold"
android:text="Aguardando GPS"
android:textAppearance="?android:attr/textAppearanceLarge" />
텍스트 스타일 속성을 굵게 사용
android:textStyle = "bold";
사용하다 android:textStyle="bold"
Android TextView Bold를 만드는 4 가지 방법
이처럼
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="12dip"
android:textStyle="bold"
/>
Android TextView를 굵게 만드는 방법에는 여러 가지가 있습니다.
Just you need to use
//for bold
android:textStyle="bold"
//for italic
android:textStyle="italic"
//for normal
android:textStyle="normal"
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="@string/userName"
android:layout_gravity="left"
android:textSize="16sp"
/>
참고 URL : https://stackoverflow.com/questions/5186786/textview-bold-via-xml-file
반응형
'development' 카테고리의 다른 글
영국 우편 번호 일치를위한 RegEx (0) | 2020.05.26 |
---|---|
jQuery에 Google의 CDN을 사용해야하는 이유는 무엇입니까? (0) | 2020.05.26 |
Unix 쉘 스크립트에서 읽을 수있는 JSON 형식으로 curl 출력 표시 (0) | 2020.05.26 |
UITextField의 초기 키보드 애니메이션에서 슈퍼 느린 지연 / 지연 (0) | 2020.05.26 |
Angular.js 지시문 동적 templateURL (0) | 2020.05.26 |