Transcript Font - VNU
FONT GIỚI THIỆU Font mặc định: DroidSans.ttf Ưu điểm: Khá chuẩn, đẹp Font cho ứng dụng android có hỗ trợ cả tiếng việt và không. LẤY FONT Trong thư mục asset, tạo 1 thư mục fonts Tìm font copy vào thư mục font này Lấy font để set: Typeface myNewFace = Typeface.createFromAsset(getAssets(), "fonts/VNARABIAH.TTF"); SET FONT Tạo 1 đối tượng kiểu Typeface Sau đó gọi phương thức setTypeface cho đối tượng như: TextView, EditText, … LƯU Ý Nhiều font không hỗ trợ tiếng việt Kiểm tra ứng dụng thuộc loại nào trước khi set font TOGGEL BUTTON GIỚI THIỆU Là 1 Button Có 1 đèn sáng Hiển thị text tương ứng với check and uncheck CÁC ĐẶC TÍNH <ToggleButton android:id="@+id/alrm" android:layout_width="150dp" android:layout_height="wrap_content“ android:gravity="center" android:textOff="Off" android:textOn="On" />