Android问题:String types not allowed (at 'layout_gravity' with value 'top/right').
16lz
2021-01-26
android:layout_gravity="top/right"
出错的是这一句。
实际上应该是:
android:layout_gravity="top|right",这里的top和right的关系是并行的。
再说说layout_gravity的用法:
<p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">属性可选的值有:</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">top、bottom、left、right、center_vertical、fill_vertical、center_horizontal、fill_horizontal、center、fill、clip_vertical。</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">而且这些属性是可以多选的,用“|”分开。</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">默认这个的值是:Gravity.LEFT</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">来自:</p><p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;">http://blog.csdn.net/wanderocn/article/details/6424876</p>
更多相关文章
- Android(安卓)animation - 基础
- Android(安卓)环形布局: FloatingActionButton + ConstraintLayou
- Android(5)---Toast用法总结
- android html 与webview属性从冲突
- android启动页白屏的问题
- 3.23-
- 腾讯微博android授权 SharedPreferences用法
- android8.0应用崩溃 Only fullscreen opaque activities can req
- NineOldAnimations 设计解析