Android SlidingDrawer 处理程序的图像

标签 android image handle slidingdrawer

我想使用我自己的图像作为处理程序的图像。

enter image description here

如何将默认处理程序图像更改为其他图像? 谢谢, 埃亚尔。

最佳答案

您可以使用 ImageViewsrc 指向您的图像作为句柄:

<SlidingDrawer
     android:id="@+id/drawer"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"

     android:handle="@+id/handle"
     android:content="@+id/content">

     <ImageView
         android:id="@id/handle"
         android:src="@drawable/my_image"
         android:layout_width="wrap_content"
         android:layout_height="fill_parent" />

     ....

</SlidingDrawer>

您可能希望将该图像转换为 9patch,以便可以拉伸(stretch)它以填充窗口的高度。

关于Android SlidingDrawer 处理程序的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8979734/

相关文章:

.net - 如何在 .NET 中获取当前窗口句柄计数和窗口句柄限制?

c++ - 如何知道进程句柄是否准备就绪

java - 在主要 Activity 中处理来自 dialogfragment 的按钮

php - 如何通过一个独特的php文件下载多个图像?

css - 图像和表格在一行

python - 调整地面实况图像的大小,而不更改标签

Scalatest 中止的测试处理

android - 使用 Android 4.X 编译但支持 API Level 9

android - 使 Android 应用显示为专为平板电脑设计

java - Android Studio map 重置为默认 View 应用程序重新启动