SlidingDrawer 中的处理程序和内容之间的空间

发布于 2024-10-09 13:09:33 字数 876 浏览 0 评论 0原文

当我尝试在水平方向使用 SlidingDrawer 时,处理程序和内容之间有一个空格。知道我怎样才能摆脱它吗?在垂直方向上我没有空间。

<SlidingDrawer
    android:id="@+id/module_trafic_map_drawer"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:topOffset="0dp"
    android:bottomOffset="0dp"
    android:handle="@+id/module_trafic_map_handle"
    android:content="@+id/module_trafic_map_content">
    <ImageView
        android:id="@id/module_trafic_map_handle"
        android:layout_width="wrap_content"
        android:layout_height="match_parent" 
        android:src="@drawable/trafic_info_popup_right"
    />
    <WebView
        android:id="@+id/module_trafic_map_content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"            
    />
</SlidingDrawer>

When I try to use a SlidingDrawer in the horizontal orientation I get a space between the handler and the content. Any idea how I can get rid of it? In the vertical orientation I do not get a space.

<SlidingDrawer
    android:id="@+id/module_trafic_map_drawer"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:topOffset="0dp"
    android:bottomOffset="0dp"
    android:handle="@+id/module_trafic_map_handle"
    android:content="@+id/module_trafic_map_content">
    <ImageView
        android:id="@id/module_trafic_map_handle"
        android:layout_width="wrap_content"
        android:layout_height="match_parent" 
        android:src="@drawable/trafic_info_popup_right"
    />
    <WebView
        android:id="@+id/module_trafic_map_content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"            
    />
</SlidingDrawer>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海夜未眠 2024-10-16 13:09:33

在 ImageView 中尝试 android:scaleType="center" 。

Try android:scaleType="center" in your ImageView.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文