回答
這裏是一個blog posting,討論在ConstraintLayout
切緣陰性。
負利潤率
使用空格在ConstraintLayout視圖不能有負利潤率(它不支持)。然而,通過一個簡單的技巧,你可以通過插入一個空格(它基本上是一個空視圖)並將其大小設置爲你想要的空白來獲得類似的功能。
所以他們更好地支持負利潤率。它會創造更少的意見。 ContraintLayout就是這一切。 – Softlion
使用NEGATIVE MARGIN是不好的做法。
A ConstraintLayout是一個ViewGroup,它允許您以靈活的方式定位和確定小部件的大小。
請注意,保證金只能爲正數或等於零.ConstraintLayout不能有負的保證金。
您可以使用
- 安卓layout_marginStart
- 安卓layout_marginEnd
- 安卓layout_marginLeft
- 安卓layout_marginTop
- 安卓layout_marginRight
- 機器人:LAYO ut_marginBottom
請解釋爲什麼這是不好的做法。 – Softlion
@Softlion我認爲,可能是我錯了。請檢查https://stackoverflow.com/questions/10673503/is-it-a-bad-practice-to-use-negative-margins-in-android –
@Softlion FYI'ConstraintLayout不能有負邊距。 –
- 1. ConstraintLayout中的邊距行爲
- 2. ConstraintLayout頁邊距不起作用
- 3. Android負邊距不起作用
- 4. Android ConstraintLayout頁邊距不能正常工作
- 5. 負邊距 - 不工作
- 6. 不允許使用負值
- 7. 如何不允許負數?
- 8. 替代負邊距
- 9. 負邊距「包裝」?
- 10. ConstraintLayout指南中的邊距顯示不正確
- 11. 與ConstraintLayout問題 - 垂直邊距不工作
- 12. 問題與ConstraintLayout - ImageView的16:9不合適的上邊距
- 13. CSS負邊距不起作用?
- 14. Firefox顯示負邊距不正確
- 15. 滾動到負邊距
- 16. 負邊距IE8問題
- 17. 負下邊距在IE
- 18. 使用mootools的負邊距
- 19. 負邊距和重疊div
- 20. CSS定位的負邊距
- 21. 如何不允許變量爲負數?
- 22. 不允許h中的負數:inputText
- 23. 正則表達式不允許負數
- 24. 陣列不允許負索引C#
- 25. 負長度向量是不允許
- 26. 不允許按鈕按下負值
- 27. Infragistics:WebCurrencyEditor允許插入負值
- 28. 爲什麼負邊緣在bellman福特算法中允許?
- 29. 使用負邊距的替代方法?
- 30. 使用方框大小時,CSS負邊距不正確:邊框
您可以嘗試將項目限制在該指南的左側或右側。這將相對於佈局指南定位該項目。 –