2014-09-24 87 views
0

我必须在我的Android Wear客户端中添加HorizontalScrollView。通常,在手机上,我们将有Android Wear Horizo​​ntalScrollView没有结束标记

<HorizontalScrollView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/horizontalScrollView2" 
    android:layout_gravity="center_horizontal|bottom" /> 

并与结束标记</HorizontalScrollView>
在磨损项目中,我注意到了horizo​​ntalScrollView没有结束标记。有谁知道这件衣服是如何工作的?先谢谢你。

回答

0

还有为HorizontalScrollView上关闭标签Android的穿为好,但在示例代码中你与我们分享了Horizo​​ntalScrollView通过/>已经关闭。
所以要澄清一些事情:

/>

等于:

<HorizontalScrollView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"> 
</HorizontalScrollView> 

有了,当你写/>你不能把了滚动内享有唯一的区别。

0
<your package name 
      android:id="@+id/horizontal_listview" 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent" 
      android:background="#ddd" /> 

试试这个。我想我可能会为你工作。在该包中添加Horizo​​ntialListView.class。在你的xml文件中添加上面的代码行。

+0

http://pastie.org/9590145这里是Horizo​​ntialListView.class复制这个类并粘贴到你的包中。 – Prathyusha 2014-09-24 09:20:45

相关问题