在 Android 中创建自定义布局
如何在Android中创建自定义布局?我的问题是我在网格视图中显示图像,当用户到达网格视图中的最后一个图像时,它必须显示消息:“单击此处查看更多图像”
How to create Customize Layout in Android? My problem is I'm displaying Images in grid view, when the user reaches the last image in the grid view, it must display the message: "click here to View More Images"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过简单的方式做到这一点。无需自定义布局。您可以通过以下方式做到这一点:
OnclickListener:
if(位置==适配器.getCount - 1){
告诉消息();
}
You can do it in a simple way. No need to customize layout. You can do it in this way:
OnclickListener:
if(position == adapter.getCount - 1){
tellMessage();
}