- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.emphie.fod/org.emphie.fod.preferences}: android.view.InflateException: Binary XML file line #7: Error inflating class include
我试图在支持它的版本中包含一个开关首选项,否则包含一个复选框首选项。公平地说,我无法在包含的内容中找到任何文档,但我看到的示例都是针对布局的,而不是首选项。
当只有一些元素需要不同的定义时,要求所有首选项 fragment 为其适当的 API 完全定义似乎很疯狂。
屏幕:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:enabled="true" android:fragment="org.emphie.fod.preferences$prefFrag1" >
<PreferenceCategory android:title="Preferences" >
<include android:key = "@+id/send_sms" xml="@xml/pref_send_sms" />
</PreferenceCategory>
</PreferenceScreen>
包含的首选项:在 res-v14 中:
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
<SwitchPreference
android:defaultValue="true"
android:disableDependentsState="false"
android:key="@+id/send_SMS"
android:summaryOff="Just generate insults"
android:summaryOn="Actually send the wanker insults"
android:switchTextOff="No"
android:switchTextOn="Yes"
android:title="Send SMS" />
</merge>
在 res-v8 中
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
<CheckBoxPreference
android:defaultValue="true"
android:disableDependentsState="false"
android:key="@+id/send_SMS"
android:summaryOff="Just generate insults"
android:summaryOn="Actually send the wanker insults"
android:switchTextOff="No"
android:switchTextOn="Yes"
android:title="Send SMS" />
</merge>
非常感谢收到适当的 docco 链接,以及 google-fu 提示。我是否在根本上、句法上或愚蠢地做错了什么?
最佳答案
好吧,经过大量研究,事实证明这是完全不合理和不可能的。
关于android - 错误膨胀类包含在 PreferenceActivity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11604722/
在我的配置 Activity 中,我需要创建一个首选项屏幕,顶部有一个固定 View ,显示页面中配置的内容的预览。我不想更改主首选项屏幕(我已经有一个单独的 Activity )我想要一个不同的“嵌
我有这样的偏好选项: public class Opciones extends PreferenceActivity { @Override public void onCreate
我正在尝试使用以下代码在首选项 Activity 中设置工具栏。它确实显示了工具栏,但它覆盖了首选项列表。 Here来 self 的应用程序的屏幕截图链接我正在做这个 bcz 我正在运行时更改样式主题
我用谷歌搜索但没有找到显示 android 中 PreferenceActivities 生命周期的等效流程图。这样的流程图存在吗?显示基本 Activity 生命周期的那个对理解 Activity
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.emphie.fod/org.emphie.fod.pre
使用 Android 注释。我的偏好: @SharedPref(value = SharedPref.Scope.APPLICATION_DEFAULT) public interface MyPre
我是 android 开发的新手,我正在尝试弄清楚如何将用户带到我的 PreferenceActivity。我已经创建了一个具有相应布局的 Preferences 类,但是我无法弄清楚如何在没有物理菜
我最近接触了 PreferenceActivity,我想改变我处理与 xml 中定义的 EditTextPreference 交互的方式。 我已经在样板文件覆盖 onListItemClick( 的地
我试图在单击后退按钮后关闭首选项 Activity ..但是当我按下它然后单击多任务按钮时,我看到为我的应用程序打开了两个 Activity ,一个是我当前正在使用的 Activity ,另一个是 p
我读了http://developer.android.com/reference/android/app/Activity.html但我对 PreferenceActivity 生命周期有疑问: P
我正在编写一个带有 PreferenceFragment 的 PreferenceActivity,当设备的方向发生变化时(即从横向到纵向),将抛出一个 InstantiationException反
我看到一些应用程序在某些应用程序的设置中有弹出窗口(如果您在 Google Play 的设置中单击“开源许可证”)和搜索栏(通常用于音量和字体大小)。 这些是如何实现的?在res/xml/pref.x
我正在实现 PreferenceActivity,它会要求用户输入用户名和密码。我将使用 EditTextPreference 作为用户名,但我需要什么元素才能有“密码输入”,这将隐藏输入的数据(即更
在我的 android 应用程序中,我想制作一个反馈对话框,该对话框将在应用程序第二次启动时显示。我怎样才能做到这一点 ?我可以通过 PreferenceActivity 中的变量来完成吗?如果pre
我最重要的问题是:在 Android 中 PreferenceActivity , 我怎样才能写一个 OnClickListener当我浏览 PreferenceScreen 时,这将具有与按 And
我有一个 MainActivity 和一个从该 Activity 调用的 PreferenceActivity。我还有一项服务正在运行以查询这些首选项。 当我打印这些值时。我明白了: D/pref_s
在我的应用程序中,我想在我的应用程序中使用特定首选项时显示警告。我试过使用 PreferenceActivity.onPreferenceTreeClick 和 onPreferenceClickLi
我有这样一段代码:)我想编辑我的自定义首选项布局的文本属性。但是从 getView 函数对对象所做的任何更改都不会影响首选项屏幕中的实际列表。有任何想法吗?我知道我不能扩展 PreferenceScr
我有一个扩展 Preference 的自定义类,我将它与 PreferenceActivity 结合使用。 当我尝试调整我的 Preference 正在使用的布局中的高度(使用静态 layout_he
在PreferenceActivity中使用一个preference文件(而不是默认的共享preferences)的方法如下: public class MyPreferencesActivity e
我是一名优秀的程序员,十分优秀!