XML 파일을 통해 TextView 굵게 표시 하시겠습니까? 표시하는 방법이 있습니까? <TextView android:textSize=”12dip”

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"
/>


답변