简体   繁体   English

Android操作栏标题文本在某些手机上无法点击

[英]Android Action Bar Title Text not clickable on certain phones

I have a project that I am currently updating. 我有一个当前正在更新的项目。 In previous versions I have been able to select the title text, and it would react as part of the back button in the action bar. 在以前的版本中,我已经能够选择标题文本,并且它会作为操作栏中的“后退”按钮的一部分进行响应。 I currently have no icon in the actionbar by design and in previous versions the text was still interactive. 目前,根据设计,我在操作栏中没有图标,在以前的版本中,文本仍是交互式的。

I tried implementing different layouts for varying screen sizes, however, since then on normal and small screen sized phones (tested: Samsung Galaxy S III Mini and Sony Xperia tipo ) now only the back button ("<") reacts to touch. 我尝试为不同的屏幕尺寸实现不同的布局,但是,此后,在普通和小屏幕尺寸的手机(经过测试: Samsung Galaxy S III MiniSony Xperia tipo )上,现在只有后退按钮(“ <”)才有反应。

The title text is still clickable on an Samsung Galaxy S4 and a Nexus 4 . Samsung Galaxy S4Nexus 4上仍可以单击标题文本。 I have reverted the code back to how it was before I made those changes, along with trying code from last week to make sure nothing has changed, and the bug still occurs. 我已将代码恢复到进行这些更改之前的状态,并尝试从上周开始尝试执行代码以确保没有任何更改,并且该错误仍然发生。 I have tried other apps on the Samsung Galaxy S III Mini and the text in RedReader is clickable, so it's definitely app side, but I am not sure what has changed that will cause this. 我已经在Samsung Galaxy S III Mini上尝试了其他应用程序,并且RedReader中的文本是可单击的,因此绝对是应用程序方面,但是我不确定是什么引起了这一变化。

I am currently at a loss as to why it is doing it. 我目前不知道为什么要这么做。 I've also attempted to update ActionBarSherlock to see if that may have caused an issue, but I am not sure what to try next. 我还尝试更新ActionBarSherlock,以查看是否可能引起了问题,但是我不确定下一步该怎么做。

Title on ActionBar is clickable from 4.2.2 version of Android. 从Android 4.2.2版本可以单击ActionBar上的标题。 Before only < or icon. 仅在<或图标之前。

If you have the need to implement this functionality in previous versions (including versions 2.x), you can use the ActionBarSherlock. 如果需要在以前的版本(包括版本2.x)中实现此功能,则可以使用ActionBarSherlock。

The library will automatically use the native action bar when appropriate or will automatically wrap a custom implementation around your layouts. 该库将在适当时自动使用本机操作栏,或自动在布局中包装自定义实现。 This allows you to easily develop an application with an action bar for every version of Android from 2.x and up. 这样一来,您便可以轻松针对2.x及更高版本的每个Android版本使用操作栏来开发应用程序。

Visit http://actionbarsherlock.com/ 请访问http://actionbarsherlock.com/

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM