[英]How to add margin and not padding to compoundDrawable
我看到了如何向CompoundDrawable 添加填充。
但是無論如何要添加邊距嗎?
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(displayName, 0, 0, 0, 0);
這不可能。 您只能創建您的 ViewGroup 並向其添加 TextView 和 ImageView。 這是最簡單的解決方案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.