반응형
XML 파일을 통해 TextView 굵은 글씨로 표시하시겠습니까?
XML을 통해 텍스트 보기의 텍스트를 굵게 표시하는 방법이 있습니까?
<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="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 TextView를 굵게 만드는 4가지 방법
이것처럼.
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="12dip"
android:textStyle="bold"
/>
Android TextView를 굵게 만드는 방법은 여러 가지가 있습니다.
텍스트 스타일 특성을 굵게 사용
android:textStyle = "bold";
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
반응형
'programing' 카테고리의 다른 글
멀티스레딩 대신 노드 JS 파악 (0) | 2023.09.04 |
---|---|
Node.js MySQL - 오류: connect ECONFUSED (0) | 2023.09.04 |
MariaDB to Zarr Array, 어떻게 해야 하나요? (0) | 2023.09.04 |
변수에 필요한/변수로 변환 (0) | 2023.09.04 |
오류 "입력 장치가 TTY가 아닙니다." (0) | 2023.09.04 |