简体   繁体   English

Android:我在操作栏中有一个操作栏和listview。 单击列表视图中的项目时,如何在新视图中显示图像

[英]Android: I have an actionbar and listview within the actionbar. How do I display an image in new view when I click on an item in the listview

I am new to Android and I have this issue: 我是Android的新手,但遇到以下问题:

I have created a tab action bar and have list items within the action bar. 我创建了一个选项卡操作栏,并在操作栏中包含列表项。 Now when I click on one of the list item, I want an image to be displayed in new screen. 现在,当我单击列表项之一时,我希望在新屏幕中显示图像。 How do I do this? 我该怎么做呢?

Create an new Activity with the image in it when the ListView was clicked. 单击ListView时,创建一个带有图像的新Activity Create a listener to handle the clicks from the ListView and start the Activity from that. 创建一个侦听器来处理来自ListView的单击,然后从中启动Activity。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 单击特定视图时,如何在列表视图中获取项目的位置? - How can I get the position of the item within a listview when I click on a specific view? 我在操作栏上实现了列表视图项的搜索,但它只搜索了一个字符 - I implement search on actionbar for listview item but it search only one character 单击ListView项目时如何关闭AlertDialog - How do I close AlertDialog when I click on ListView item 如何隐藏操作栏中的菜单项? - How do I hide a menu item in the actionbar? 单击ActionBar项以将其添加到ListView - ActionBar item click to add item to ListView 单击列表视图中的小部件时,如何使用ResourceCursorAdapter获取视图项 - How do i get the view item using a ResourceCursorAdapter when i click a widget in the listview 安卓 动作栏。 如何更改ActionBar标题颜色? - Android. ActionBar. How to change ActionBar title color? 如何通过多个项目的ListView在新活动中显示单个项目(Android) - How do I display a single item in a new activity from a ListView of multiple items (Android) 如何为Android中的ListView的每个项目设置背景图像? - How do I set a background image for each item of ListView in Android? 如何使用列表视图并仍然使用操作栏? - How can I use a listview and still use an actionbar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM