获取Android的联系人排序preference [英] Obtaining Android Contacts Sorting Preference

查看:193
本文介绍了获取Android的联系人排序preference的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在联系人 - >设置在Android中,我们已经和排序名单查看联系人的名称为选项。有没有获得另一个应用程序内这些preferences的方法吗?这意味着我的应用程序有我自己的联系人列表的版本。我需要这些,以相应的排序。


解决方案

  INT SORT_ORDER =
Settings.System.getInt(getContentResolver(),ContactsContract preferences.SORT_ORDER);
    INR = display_order
Settings.System.getInt(getContentResolver(),ContactsContract preferences.DISPLAY_ORDER);

Inside "Contacts" -> "Settings" in android, we have "Sort list by" and "view contact name as" options. Is there any way of obtaining these preferences inside another app? Meaning my app has my own version of a contact list. I need these in order to sort it accordingly.

解决方案

    int sort_order = 
Settings.System.getInt(getContentResolver(),ContactsContract.Preferences.SORT_ORDER);
    inr display_order =
Settings.System.getInt(getContentResolver(),ContactsContract.Preferences.DISPLAY_ORDER);

这篇关于获取Android的联系人排序preference的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆