首页 \ 问答 \ listview中的第一项无法获得焦点(The first item in listview does not gets the focus)

listview中的第一项无法获得焦点(The first item in listview does not gets the focus)

我在一个线性布局中有一个edittext和一个列表视图。假设在列表中当前可以看到5个结果。当我从编辑文本向下滚动到列表视图时,列表视图中的第5个项目(我想它的总是最后一个)获得焦点,而不是第一个项目! 我该怎么解决这个问题?


I have an edittext and a listview in a linear layout.Suppose there are 5 results currently visible in the list out of total 10.When i scroll down from the edit text on to the listview, the 5th item in the listview(I suppose its always the last one) gets the focus, instead of the first item! How should i solve this?


原文:https://stackoverflow.com/questions/4825398
更新时间:2022-03-22 11:03

最满意答案

我不认为aAddon有_repositoryAddon作为参数。 通过包括Console.jsm然后转到console.log('aAddon',aAddon) 。 (尝试只执行console.log可能已包含Console.jsm)。 然后打开浏览器控制台。 然后在浏览器控制台中,应该是最新的条目,然后在它旁边的链接上找到你的aAddon msg,点击它,然后在变量查看器中打开它。 在那里你可以看到aAddon所有的属性。 http://smg.photobucket.com/user/noitidart/media/i20dont20see20nsIInterfaceRequestor_zps7bfc9d43.png.html?sort=3&o=12

http://smg.photobucket.com/user/noitidart/media/my20code20works_zpsdd244f45.png.html?sort=3&o=11


I don't think aAddon has _repositoryAddon as a parameter. Find out by including Console.jsm and then going console.log('aAddon',aAddon). (Try just doing console.log Console.jsm might already be included). Then open up Browser Console. then in browser console, should be latest entry, find your aAddon msg then on the link next to it, click it, and it opens in variable viewer. There you can see what all properties aAddon has. http://smg.photobucket.com/user/noitidart/media/i20dont20see20nsIInterfaceRequestor_zps7bfc9d43.png.html?sort=3&o=12

http://smg.photobucket.com/user/noitidart/media/my20code20works_zpsdd244f45.png.html?sort=3&o=11

相关问答

更多
  • my_extension在主浏览器窗口中定义,而不是在弹出窗口中定义。 要从弹出窗口本身关闭弹出窗口,只需使用window.close 编辑:好的,所以我猜my_extension.close实际上看起来像: function() { // check input from popup window if (everythingIsGood) { my_extension.window.close() } } 在这种情况下,我建议你在弹出窗口中进行验证。 我知道,你不想在弹出窗口中放入 ...
  • 很可能是manifest.json文件中的错误。 仔细检查该代码; 如果它看起来都很好,请尝试暂时删除它中的可选内容,然后在调试器中删除并重新加载插件,直到它工作。 然后你可以缩小范围(很难确切地说,没有看到你的代码)。 JSON中最小的错误将导致插件无法加载(例如不合适的括号等)。 另请参见: WebExtension的剖析 The problem was that extensions must be saved in specific directory. In winows, the directo ...
  • 您错过了一个可能导致错误的参数: gBrowser.addEventListener("DOMContentLoaded", function(e) { var documentElement = e.originalTarget.defaultView.document; var div = documentElement.createElement("div"); div.innerHTML = Read("chrome://firefox_extension/content/l ...
  • 这很有趣。 我插入 Services.obs.addObserver(this, "*", false); istead Services.obs.addObserver(this, "Gesture:LongPress", false); 它的工作原理!! 用选定的单词看警报! 我会在文档中搜索一个原因。 谢谢! This is very interesting. I insert Services.obs.addObserver(this, "*", false); istead Services ...
  • 可以设置一个目录来“就地编辑”一个Firefox扩展。 通过这种方式,可以减少Firefox扩展的编辑和测试工作量。 我在博客https://blog.mozilla.org/addons/2009/01/28/how-to-develop-a-firefox-extension/上找到了很好的解释。 在此,我想介绍实现“就地编辑”所需的主要步骤, 第1步:您必须找到您的Firefox的个人资料目录 。 例如在Linux中,这通常会是这样的: ~/.mozilla/firefox/#%#%.default/ ...
  • 我无法评论Chrome ,所以我只是引用它们。 默认情况下,将禁用由第三方程序使用外部扩展部署选项安装的扩展。 当第三方程序安装扩展程序时,Chrome菜单会被标记,用户可以点击Chrome菜单,查看包含启用扩展程序或从计算机中删除扩展程序的选项的对话框。 (来源: http : //blog.chromium.org/2012/12/no-more-silent-extension-installs.html ) 不确定“徽章”位是否仍然如此,考虑到这篇文章来自2012年和IIRC,有计划在某些时候彻底禁 ...
  • 关键是Firefox 4代码是异步的 。 AddonManager.getAddonByID("Mf@mafiaafire.com", function(addon) { // alert("My extension's version is r" + addon.version); this_version = addon.version; }); 意思是,去获取这个插件的版本,当你得到它时,请在此处调用此函数告诉我。 当你到达第一个警报时,插件管理器还没有得到它。 由于在警报上单击“确定”之前 ...
  • 好的,我做了一些研究。 胡克是一个错误的方法。 我现在改了代码。 查看git以了解更多信息...... Okay, I did some research. The Hook was a wrong aproach. I changed the code now. Look into the git to find out more...
  • 我不认为aAddon有_repositoryAddon作为参数。 通过包括Console.jsm然后转到console.log('aAddon',aAddon) 。 (尝试只执行console.log可能已包含Console.jsm)。 然后打开浏览器控制台。 然后在浏览器控制台中,应该是最新的条目,然后在它旁边的链接上找到你的aAddon msg,点击它,然后在变量查看器中打开它。 在那里你可以看到aAddon所有的属性。 http://smg.photobucket.com/user/noitidart ...
  • 为什么不在首次运行时使用首选项值显示新安装选项卡,然后将首选项更改为false,如果卸载它,而不是尝试删除它,只需将其再次设置为true即可。 这样,如果你重新安装,你将再次显示它。 有关参考安装和卸载脚本,请参阅参考资料 Why don't you use the preference value to show the new install tab at first run, then you change the preference to false, and if you uninstall i ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)