![](/img/trans.png)
[英]How to make EditText stick to top of screen while scrolling the view below it?
[英]How to stick TabWidget in top of the screen while scrolling the layout in Android?
我的代码中有一个Tabwidget。 如何将其放置在屏幕顶部的布局中?
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="55dp"
android:tabStripEnabled="false">
</TabWidget>
如何实现呢?
使用相对布局尝试
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_alignParentTop="true"
android:tabStripEnabled="false">
</TabWidget>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.