复选框programtically

复选框programtically

本文介绍了一般同步设置"自动同步"复选框programtically的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种方式来启用/禁用自动同步复选框,在常规同步设置。

AFAIR股票功率控制部件有这个功能了。如果这个小工具可以做,应该有我一个解决方案也一样,对不对?请你们帮我了,我拼命寻找在网络上的解决方案,但没有成功。

难道一个用户交互是强制执行此操作?我知道我可以发送一个Intent打开同步查看但这不是我的本意!

我不是在寻找特定帐户的同步设置,因为我发现在这个论坛上像

  ContentResolver.setSyncAutomatically(客户账户,串权威,布尔同步);
 

解决方案

更新

尝试 setMasterSyncAutomatically() ContentResolver的

I am looking for a way to enable/disable the "auto-sync" checkbox in the "general sync settings".

Afair the stock power control widget has this feature too. If this widget can do, there should be a solution for me too, right? Please guys help me out, I am desperately looking for a solution on the web with no success.

Is it possible that a user interaction is mandatory for this operation?? I know I can send an Intent to open the Sync View but this is not my intention!

I am not looking for the sync settings for a specific account as I found in this forum like

ContentResolver.setSyncAutomatically(Account account, String authority, boolean sync);
解决方案

UPDATE

Try setMasterSyncAutomatically() on ContentResolver.

这篇关于一般同步设置"自动同步"复选框programtically的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 02:27