本文整理汇总了Java中android.provider.ContactsContract.CommonDataKinds.Website.TYPE_CUSTOM属性的典型用法代码示例。如果您正苦于以下问题:Java Website.TYPE_CUSTOM属性的具体用法?Java Website.TYPE_CUSTOM怎么用?Java Website.TYPE_CUSTOM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.provider.ContactsContract.CommonDataKinds.Website
的用法示例。
在下文中一共展示了Website.TYPE_CUSTOM属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getType
private String getType(Integer type, String label) {
if (type == null) {
throw new InvalidCursorTypeException();
}
switch (type) {
case Website.TYPE_BLOG:
return "Blog";
case Website.TYPE_FTP:
return "FTP";
case Website.TYPE_PROFILE:
return "Profile";
case Website.TYPE_HOME:
return "Home";
case Website.TYPE_HOMEPAGE:
return "Home Page";
case Website.TYPE_WORK:
return "Work";
case Website.TYPE_OTHER:
return "Other";
case Website.TYPE_CUSTOM:
default:
return label;
}
}
示例2: getAndroidWebsiteType
public static int getAndroidWebsiteType(WebsiteType type) {
switch (type) {
case TYPE_CUSTOM:
return Website.TYPE_CUSTOM;
case TYPE_HOME:
return Website.TYPE_HOME;
case TYPE_HOMEPAGE:
return Website.TYPE_HOMEPAGE;
case TYPE_OTHER:
return Website.TYPE_OTHER;
case TYPE_WORK:
return Website.TYPE_WORK;
case TYPE_BLOG:
return Website.TYPE_BLOG;
case TYPE_FTP:
return Website.TYPE_FTP;
case TYPE_PROFILE:
return Website.TYPE_PROFILE;
default:
return Website.TYPE_OTHER;
}
}
示例3: getWebsiteType
public static WebsiteType getWebsiteType(int androidType) {
switch (androidType) {
case Website.TYPE_CUSTOM:
return WebsiteType.TYPE_CUSTOM;
case Website.TYPE_OTHER:
return WebsiteType.TYPE_OTHER;
case Website.TYPE_HOME:
return WebsiteType.TYPE_HOME;
case Website.TYPE_WORK:
return WebsiteType.TYPE_WORK;
case Website.TYPE_BLOG:
return WebsiteType.TYPE_BLOG;
case Website.TYPE_FTP:
return WebsiteType.TYPE_FTP;
case Website.TYPE_HOMEPAGE:
return WebsiteType.TYPE_HOMEPAGE;
case Website.TYPE_PROFILE:
return WebsiteType.TYPE_PROFILE;
default:
return WebsiteType.TYPE_OTHER;
}
}
示例4: getWebsiteType
private int getWebsiteType(String websiteType) {
initWebsiteTypesMap();
Integer type = mWebsiteTypesMap.get(websiteType.toLowerCase());
return type != null ? type : Website.TYPE_CUSTOM;
}