Toolbar กำหนดค่า default ของ contentInsetStart ไว้ที่ 16dp ทำให้เวลาเราทำ custom toolbar จะมีช่องว่างระหว่าง navigation icon และ title
ใน Material Design spec มี attribute ตัวหนึ่งที่ชื่อว่า contentInsetStartWithNavigation และกำหนดค่าเริ่มต้นไว้ที่ 16dp เราสามารถกำหนดค่าของ contentInsetStartWithNavigation ให้เป็น 0dp ได้ในกรณีที่เรามีกำหนด navigation icon ไว้
ก่อนกำหนดค่าให้ใหม่กับ contentInsetStartWithNavigation
หลังกำหนดค่าให้ใหม่กับ contentInsetStartWithNavigation เป็น 0dp
0 ความคิดเห็น:
แสดงความคิดเห็น