android.widget.TextView.setLetterSpacing()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(283)

本文整理了Java中android.widget.TextView.setLetterSpacing()方法的一些代码示例,展示了TextView.setLetterSpacing()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setLetterSpacing()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setLetterSpacing

TextView.setLetterSpacing介绍

暂无

代码示例

代码示例来源:origin: rey5137/material

v.setLetterSpacing(appearance.getFloat(attr, 0));

代码示例来源:origin: rey5137/material

v.setLetterSpacing(appearance.getFloat(attr, 0));
v.setLetterSpacing(a.getFloat(attr, 0));

代码示例来源:origin: bignerdranch/Typesetter

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void applyLetterSpacing() {
  String letterSpacing = binding.letterSpacingEditText.getText().toString();
  try {
    float letterEms = Float.parseFloat(letterSpacing);
    binding.fillerTextView.setLetterSpacing(letterEms);
    binding.letterSpacingTextInputLayout.setErrorEnabled(false);
  } catch (NumberFormatException e) {
    Log.e(TAG, "Unable to format letter spacing");
    binding.letterSpacingTextInputLayout.setErrorEnabled(true);
    binding.letterSpacingTextInputLayout.setError(getString(R.string.nah));
  }
}

代码示例来源:origin: AppLozic/Applozic-Android-SDK

TextView headerTv = new TextView(context);
LinearLayout.LayoutParams textViewParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
headerTv.setLetterSpacing(0.04f);
headerTv.setText(model.getHeaderText());
headerTv.setTextColor(Color.parseColor("#646262"));
  textView.setLayoutParams(textViewParams);
  textView.setGravity(Gravity.CENTER);
  textView.setLetterSpacing(0.05f);
  textView.setPadding(DimensionsUtils.dp(9), DimensionsUtils.dp(7), DimensionsUtils.dp(9), DimensionsUtils.dp(7));
  textView.setTextSize(Dimension.SP, 12);

代码示例来源:origin: hsllany/HtmlNative

String ss = value.toString();
if (ss.equals("normal")) {
  textView.setLetterSpacing(textView.getLetterSpacing());
} else {
  try {
    PixelValue f = toPixel(value);
    textView.setLetterSpacing(f.getEmValue());
  } catch (ParametersUtils.ParametersParseException e) {
    e.printStackTrace();

代码示例来源:origin: jelic98/dynamico

textView.setLetterSpacing((float) attributes.getDouble("letterSpacing"));

相关文章

TextView类方法