腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
SwitchPreference
不能
正常
工作
-
为什么
?
android
、
sharedpreferences
、
preferences
、
preferenceactivity
、
android-night-mode
我在我的首选项活动中使用切换首选项来更改应用程序主题,但它
不能
正常
工作
。我不知道我做错了什么这里是我的代码 这是我的prefs.xml <
SwitchPreference
final
Sw
浏览 25
提问于2019-06-03
得票数 0
回答已采纳
2
回答
SwitchPreference
以编程方式创建,setChecked无法
工作
android
、
android-support-library
、
android-preferences
、
android-preference-v14
我也想
Swit
浏览 0
提问于2017-03-22
得票数 1
回答已采纳
1
回答
Android首选项- SwtichPrefrence在SettingsActivity屏幕外滚动时发生变化
android
、
android-sharedpreferences
:key="show_notes" android:defaultValue="true" /> android:summary="@string/pref_ads_summary"
浏览 3
提问于2016-02-01
得票数 1
回答已采纳
2
回答
按钮监听器在首选项片段中不起作用
android
我已经创建了一个实现CompoundButton.OnCheckedChangeListener的PreferenceFragment子类。我有一个包含Switch (CompoundButton的子类)的首选项。下面是我为switch的值发生变化时创建的回调:public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { Log.v("rose_tag", "hi&
浏览 0
提问于2013-06-13
得票数 6
回答已采纳
1
回答
如果我在Android中定制了一个布局,我如何知道每个小部件的id?
android
、
android-layout
某些默认小部件的布局可能不适合我,所以我使用自定义布局<
SwitchPreference
如果我使用自定义布局,如何找到小部件ID?更新问题: 我尝试使用android:id="@android:id/switch_widget",它提示消息requires API level 24,我忽略这条消息并运行应用程序,结
浏览 2
提问于2017-08-25
得票数 0
1
回答
SwitchPreference
默认设置始终为Off
android
、
android-layout
、
android-preferences
、
switchpreference
我有一个
SwitchPreference
:android:key="@string/ground_guidance_halt_display_key" android我的其他首选项类型的默认值可以
正常
工作
。我是Android的新手,我真的不知道还能发布什么来帮助我找到答案--对不起!
浏览 4
提问于2014-11-21
得票数 0
4
回答
在Android Lollipop中扩展首选项类=丢失动画
android
、
android-5.0-lollipop
、
android-preferences
、
material-design
我想扩展
SwitchPreference
来强制< 21使用SwitchCompat而不是他们使用的默认api (这显然是错误的)。我知道我可以编写我的preference.xml的两个实例(在内部值-v21上),它将会
工作
……但我想知道
为什么
会发生这种情况,以及是否有人知道在没有两个preference.xml的情况下的解决方案。代码示例:
浏览 1
提问于2015-05-20
得票数 7
1
回答
为什么
我
不能
与CheckBoxPreference交换
SwitchPreference
?
android
、
android-studio
、
android-preferences
、
switchpreference
of your device" ></CheckBoxPreference> android:summary="Enables the WLAN usage" android:defaultValue="true"></<e
浏览 3
提问于2016-11-12
得票数 6
回答已采纳
1
回答
安卓
SwitchPreference
在4.2.2中无法
正常
工作
android
、
android-4.2-jelly-bean
、
preferencescreen
你知道
为什么
在一个PreferenceScreen中有多个SwitchPreferences会产生一个问题吗?如果你选择了任何一个框,就会导致其他框发生变化?><PreferenceCategory android:title="@string/description_photo_preference">
浏览 0
提问于2013-07-16
得票数 3
回答已采纳
3
回答
无法在自定义
SwitchPreference
中切换开关
android
、
switchpreference
disableDependentsState="true" />public class CustomSwitch extends
SwitchPreference
{
浏览 18
提问于2015-04-26
得票数 2
1
回答
androidx.preference.
SwitchPreference
Android的问题
java
、
android
、
switch-statement
、
androidx
、
preferences
我是应用程序开发的新手,我
不能
让它
工作
。; private
SwitchPreference
darkModeSwitchdarkModeSwitch = (
SwitchPreference
) findPreference("darkmode"); assert darkModeSwitch !这是我在setOnPreferenciesChangeListener
浏览 3
提问于2020-04-27
得票数 1
回答已采纳
3
回答
具有自定义布局的
SwitchPreference
侦听器
android
、
preferencefragment
、
android-switch
我正尝试在我的设置页中使用
SwitchPreference
,但我无法让侦听器
工作
。我正在使用一个自定义的小部件布局来设置开关的样式,因为我找不到如何使用主题来实现这一点。在我的settings.xml中,我有以下内容: android:key="uitestmode" android:widgetLay
浏览 3
提问于2014-07-09
得票数 2
1
回答
为什么
不能
正常
工作
?
javascript
、
jquery
我一直在尝试,但是当我输入一些用于过滤的内容时,我没有得到任何结果。我认为一切都是正确的,但我不知道。任何帮助都是非常感谢的。<div id="resultado"> <div> <input autocomplete='off' class='filter' name=
浏览 1
提问于2020-09-03
得票数 0
回答已采纳
3
回答
为什么
not
不能
正常
工作
?
javascript
、
angularjs
、
ng-show
为什么
电视节目
不能
正常
工作
?;在我的小提琴中它是
工作
,但在我的项目中不
工作
,我理解如果没有所有的代码,您就无法知道是哪种错误,但可能是同一个bug和回忆器如何修复它。 谢谢。
浏览 4
提问于2015-09-22
得票数 2
回答已采纳
1
回答
前安卓7中的
SwitchPreference
总是被关闭
android
、
xml
、
switchpreference
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <
SwitchPreference
编辑:如果我将UI元素更改为CheckBoxPreference,那么一切都可以
正常
工作
,即使是在Android6和pre-6中。此外,在我开始使用androidX之前,
SwitchPreference
也可以
工作
。Edit
浏览 2
提问于2019-08-08
得票数 1
回答已采纳
1
回答
设置onPreferenceChangeListener后
SwitchPreference
未更改状态
android
、
switchpreference
在初始化
switchPreference
变量(在片段中)之后,我将OnPreferenceChangeListener设置为它。问题是,当我设置一个监听器时,我
不能
改变开关按钮的状态(它保持在相同的位置)。如果我禁用了设置监听器的语句,那么切换按钮就可以
正常
工作
,状态也会被保存。
浏览 4
提问于2015-02-17
得票数 4
1
回答
如何使用
SwitchPreference
?(ClassCastException)
java
、
android
、
android-preferences
、
switchpreference
我试图在一个
SwitchPreference
中使用2 PreferenceActivity。在PreferenceActivity的第一次启动时,一切都
正常
工作
;活动开始时没有问题,settings.xml会显示问题,如果有人参加关闭PreferenceActivity或更改
SwitchPreference
的
SwitchPreference
或使用该方法在主要活动中。如果<em
浏览 1
提问于2017-01-19
得票数 0
回答已采纳
3
回答
为什么
android:transcriptMode=“
正常
”
不能
正常
工作
?
android
、
android-layout
我一直在处理一个我一直有问题的问题。每次向我的listview (适配器)添加一个项目时,如果我在最后一个项目(它会在一定程度上做到这一点),我希望它会自动滚动;但是,如果一次添加3个或更多项目,它不会自动滚动。 <ListView android:id="@android:id/list" android:layout_height="0dip" android:layout_weight="1
浏览 4
提问于2011-04-02
得票数 6
回答已采纳
1
回答
为什么
clearInterval()
不能
正常
工作
?
javascript
我试图做一个简单的点击动画。我按下的按钮应该向左移动,然后再点击一次就可以返回了。我使用clearInterval()的方式有问题,但我看不到任何错误。你能帮我吗? var backBack = document.getElementById('btn'); var loop = 'off'; if(loop == 'off') { } if(loop == '
浏览 1
提问于2017-10-14
得票数 0
回答已采纳
2
回答
为什么
jReject
不能
正常
工作
?
jquery
、
popup
我想在我的网站上使用jReject。为了进行测试,我将mse 10添加到浏览器列表中,并且应该为该浏览器显示jReject。 有人有什么想法吗?
浏览 4
提问于2013-09-03
得票数 2
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
为什么链接不能正常访问?|缩我短网址
为什么维护工作让数据中心工作人员夜不能寐?
一则历史:为什么网络路径前加一个盘符还能正常工作
工作创业 | 程序员为什么不能一次性写好,需要一直改Bug?
爬虫离开代理IP还能工作吗
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券