本文整理汇总了Java中com.google.zxing.client.result.AddressBookParsedResult.getPronunciation方法的典型用法代码示例。如果您正苦于以下问题:Java AddressBookParsedResult.getPronunciation方法的具体用法?Java AddressBookParsedResult.getPronunciation怎么用?Java AddressBookParsedResult.getPronunciation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.client.result.AddressBookParsedResult
的用法示例。
在下文中一共展示了AddressBookParsedResult.getPronunciation方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && !pronunciation.isEmpty()) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && !birthday.isEmpty()) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例2: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && !pronunciation.isEmpty()) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && !birthday.isEmpty()) {
long date = parseDate(birthday);
if (date >= 0L) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例3: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && !pronunciation.isEmpty()) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
ParsedResult.maybeAppend(
PhoneNumberUtils.formatNumber(number), contents);
}
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && !birthday.isEmpty()) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(
DateFormat.getDateInstance(DateFormat.MEDIUM).format(
date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0,
namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例4: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && !pronunciation.isEmpty()) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && !birthday.isEmpty()) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()),
contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例5: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && !pronunciation.isEmpty()) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && !birthday.isEmpty()) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例6: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && pronunciation.length() > 0) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURL(), contents);
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例7: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && pronunciation.length() > 0) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例8: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && !pronunciation.isEmpty()) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && !birthday.isEmpty()) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例9: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && pronunciation.length() > 0) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURL(), contents);
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance().format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
示例10: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && pronunciation.length() > 0) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURL(), contents);
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult
.maybeAppend(DateFormat.getDateInstance(DateFormat.MEDIUM).format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}
开发者ID:thomas-bornschlegel,项目名称:AndroidMultiChannelMiddleware,代码行数:46,代码来源:AddressBookResultHandler.java
示例11: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuilder contents = new StringBuilder(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && pronunciation.length() > 0) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURLs(), contents);
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance().format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
}
return contents.toString();
}
示例12: getDisplayContents
import com.google.zxing.client.result.AddressBookParsedResult; //导入方法依赖的package包/类
@Override
public CharSequence getDisplayContents() {
AddressBookParsedResult result = (AddressBookParsedResult) getResult();
StringBuffer contents = new StringBuffer(100);
ParsedResult.maybeAppend(result.getNames(), contents);
int namesLength = contents.length();
String pronunciation = result.getPronunciation();
if (pronunciation != null && pronunciation.length() > 0) {
contents.append("\n(");
contents.append(pronunciation);
contents.append(')');
}
ParsedResult.maybeAppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
ParsedResult.maybeAppend(PhoneNumberUtils.formatNumber(number), contents);
}
}
ParsedResult.maybeAppend(result.getEmails(), contents);
ParsedResult.maybeAppend(result.getURL(), contents);
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
Date date = parseDate(birthday);
if (date != null) {
ParsedResult.maybeAppend(DateFormat.getDateInstance().format(date.getTime()), contents);
}
}
ParsedResult.maybeAppend(result.getNote(), contents);
if (namesLength > 0) {
// Bold the full name to make it stand out a bit.
Spannable styled = new SpannableString(contents.toString());
styled.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, namesLength, 0);
return styled;
} else {
return contents.toString();
}
}