当前位置: 首页>>代码示例>>Java>>正文


Java AddressBookParsedResult.getPronunciation方法代码示例

本文整理汇总了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();
  }
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:47,代码来源:AddressBookResultHandler.java

示例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();
    }
}
 
开发者ID:xiong-it,项目名称:ZXingAndroidExt,代码行数:47,代码来源:AddressBookResultHandler.java

示例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();
	}
}
 
开发者ID:yun2win,项目名称:tvConnect_android,代码行数:51,代码来源:AddressBookResultHandler.java

示例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();
	}
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:48,代码来源:AddressBookResultHandler.java

示例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();
    }
}
 
开发者ID:areebbeigh,项目名称:QRCodeUtility,代码行数:47,代码来源:AddressBookResultHandler.java

示例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();
  }
}
 
开发者ID:atomsheep,项目名称:sres-app,代码行数:45,代码来源:AddressBookResultHandler.java

示例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();
    }
}
 
开发者ID:yakovenkodenis,项目名称:Discounty,代码行数:45,代码来源:AddressBookResultHandler.java

示例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();
  }
}
 
开发者ID:srowen,项目名称:zxing-bsplus,代码行数:47,代码来源:AddressBookResultHandler.java

示例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();
    }
}
 
开发者ID:barterli,项目名称:barterli_android,代码行数:45,代码来源:AddressBookResultHandler.java

示例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();
}
 
开发者ID:phishman3579,项目名称:android-quick-response-code,代码行数:44,代码来源:AddressBookResultHandler.java

示例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();
  }
}
 
开发者ID:saqimtiaz,项目名称:BibSearch,代码行数:45,代码来源:AddressBookResultHandler.java


注:本文中的com.google.zxing.client.result.AddressBookParsedResult.getPronunciation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。