今天照着书上打代码又来问题了,报错了!
Wrong orientation? No orientation specified, and the default is horizontal, yet this layout has multiple children where at
least one has layout_width="match_parent"
我们先通过有道来瞅瞅这个大致是什么意思:没有方向指定,默认是水平的,然而这种布局有多个孩子在哪里。。。。(通过有道翻译得到)
其实就是少了行代码,我们只需要补上: android:orientation=“(ALT+/)”
不管是horizontal(水平)还是vertical(垂直)都可以解决问题
LinearLayout叫线性布局,当然要指定布局方向啦~!