Thứ Ba, 5 tháng 6, 2018

Hướng dẫn thêm font tùy chỉnh vào clock, text

Hướng dẫn thêm font tùy chỉnh vào clock, text

___Hướng dẫn thêm Font tùy thích vào clock hay text gì gì đó tùy ý mấy pro...___

Thôi không dài dòng ta vào chủ đề chính nha :))

     #Khâu chuẩn bị:

   Bước 1:Vào system/etc tìm fonts.xml và copy nó ra để ở chỗ nào dễ nhớ ( Sao lưu ý mà,đề phòng bất trắc vẫn hơn và để quay lại bản gốc thì có cái để mà copy vào😂)
   Bước 2:Chuẩn bị font abc.ttf (abc là tên font thí chủ muốn đặt)

     #Khâu đưa em về vinh:)):
  Mở system/etc/font.xml:
 Thêm code này:👇👇
    <family name="abc">
    <font weight="400"         style="normal">abc.ttf</font>
    </family>
 Lên trên code này:👇👇
    </familyset>  (Code này là code cuối cùng trong font.xml nhé)
  #Lưu lại và set quyền nha mấy thím:))

    #Chép font  abc.ttf vào system/fonts và set quyền cho nó.

Ví dụ như thêm font vào  text clock,các b có thể tham khảo để thêm font tương tự
(Thêm thêm code:
android:fontFamily="abc" ) như ở bên dưới
Code👇👇👇

                    <TextClock android:textSize="85.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="0.0dip" android:singleLine="true" android:layout_alignParentTop="true" android:fontFamily="abc" android:format12Hour="h:mm" android:format24Hour="k:mm" />

_____DONE____
  Reboot và chờ logo..Hehe
thanks to   Hào AV share

0 Post a Comment: