Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Android 文档中导航抽屉的示例屏幕截图显示了一个计数器徽章ListView(蓝色背景和白色“3”)。如何在我的应用程序中添加具有相同外观的徽章?
ListView
您将在自定义适配器中为您的 ListView 提供自定义布局。
布局将有两个子视图 - 一个文本视图和一个 ImageView。
在您的适配器中,您不仅可以设置文本视图的文本,还可以设置 ImageView 的图像源。