No orientation specified, and the default is

链接地址:http://jingyan.baidu.com/article/a24b33cd7722dc19fe002bd0.html

No orientation specified, and the default is horizontal. This is a common source of bugs when children are added dynamically.

没有方向指定,默认是水平的。

No orientation specified, and the default is
 

工具/原料

  • eclipse
  • ADT
  • JDK

方法/步骤

  1.  

    出现这种问题是因为直接布局无法定位其方向性,而在使用<LinearLayout>标签要指明方向

    No orientation specified, and the default is
  2.  

    只要指定一个orientation(定向,方向,定位)

    语句为:

    android:orientation = "vertical"

    No orientation specified, and the default is
  3.  

    在tab1下回车,

    No orientation specified, and the default is
  4.  

    并写入语句:

    android:orientation = "vertical"

    No orientation specified, and the default is
  5.  

    这时仍然提示错误,是因为你没有保存,保存(Ctrl+s)后即能解决:

    No orientation specified, and the default is
  6.  

    最后分别在tab2与tab3写入语句:android:orientation = "vertical"

    No orientation specified, and the default is
  7.  

    最后保存(Ctrl+s)即可:

    No orientation specified, and the default is
  8.  

posted @ 2016-02-01 10:37  *新星月-倪新生*  阅读(416)  评论(0编辑  收藏  举报