本文整理了Java中android.widget.TextView.setLetterSpacing()
方法的一些代码示例,展示了TextView.setLetterSpacing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setLetterSpacing()
方法的具体详情如下:
包路径:android.widget.TextView
类名称: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"));
内容来源于网络,如有侵权,请联系作者删除!