Một ListViewtrong ứng dụng của tôi có rất nhiều yếu tố chuỗi như name, experience, date of joining, vv Tôi chỉ muốn làm cho nameđậm. Tất cả các phần tử chuỗi sẽ nằm trong một chuỗi duy nhất TextView.
XML của tôi:
<ImageView
android:id="@+id/logo"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp" >
</ImageView>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/logo"
android:padding="5dp"
android:textSize="12dp" >
</TextView>
Mã của tôi để đặt TextView của mục ListView:
holder.text.setText(name + "\n" + expirience + " " + dateOfJoininf);