为什么不能在&QUOT上下文菜单中工作;记事本"教程? [英] Why doesn't the context menu work in the "Notepad" tutorial?

查看:84
本文介绍了为什么不能在&QUOT上下文菜单中工作;记事本"教程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过记事本教程中的开发人员指南给出工作: http://developer.android.com/guide/tutorials/notepad/index.html

I'm working through the 'notepad' tutorial given in the developer's guide: http://developer.android.com/guide/tutorials/notepad/index.html

由于某些原因,我使用他们的解决方案的文件,即使,上下文菜单没有拿出我的列表条目点击并按住

For some reason, even when i'm using their solution files, the context menu does not come up with i 'click and hold' on a list entry.

本类扩展ListActivity,并呼吁registerForContextMenu(getListView());

The class extends ListActivity, and calls "registerForContextMenu(getListView());"

但我从来没有看到上下文菜单中火。

but I never see the context menu fire.

任何想法有什么错呢?

推荐答案

他们铺陈行该教程的方式意味着你只能实际上使文本选择,而不是仅仅排它的。你是pressing行本身吗?

The way they lay out the rows in that tutorial means that you can only actually make a selection on text, not just the row it's on. Are you pressing on the row itself?

您可以修复使用的,而不是WRAP_CONTENT中的LinearLayout和在notes_list.xml的layout_width属性的ListView FILL_PARENT,并在里面notes_row.xml TextView的

You can fix that by using fill_parent instead of wrap_content in the layout_width attributes of the LinearLayout and ListView in notes_list.xml, and in the TextView inside notes_row.xml

这篇关于为什么不能在&QUOT上下文菜单中工作;记事本"教程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆