本文整理了Java中android.widget.TextView.setShadowLayer()
方法的一些代码示例,展示了TextView.setShadowLayer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.setShadowLayer()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:setShadowLayer
暂无
代码示例来源:origin: stackoverflow.com
TextView textv = (TextView) findViewById(R.id.textview1);
textv.setShadowLayer(1, 0, 0, Color.BLACK);
代码示例来源:origin: stackoverflow.com
TextView item = new TextView(getApplicationContext());
item.setText(R.string.text);
item.setTextColor(getResources().getColor(R.color.general_text_color));
item.setShadowLayer(0.01f, -2, 2, getResources().getColor(R.color.text_shadow_color));
代码示例来源:origin: HotBitmapGG/bilibili-android-client
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
代码示例来源:origin: rey5137/material
v.setShadowLayer(r, dx, dy, shadowColor);
代码示例来源:origin: facebook/facebook-android-sdk
connectedStateLabel.setTextColor(getResources().getColor(
R.color.usersettings_fragment_connected_text_color));
connectedStateLabel.setShadowLayer(1f, 0f, -1f,
getResources().getColor(
R.color.usersettings_fragment_connected_shadow_color));
R.color.usersettings_fragment_not_connected_text_color);
connectedStateLabel.setTextColor(textColor);
connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor);
connectedStateLabel.setText(getResources().getString(
R.string.usersettings_fragment_not_logged_in));
代码示例来源:origin: facebook/facebook-android-sdk
connectedStateLabel.setTextColor(getResources().getColor(
R.color.usersettings_fragment_connected_text_color));
connectedStateLabel.setShadowLayer(1f, 0f, -1f,
getResources().getColor(
R.color.usersettings_fragment_connected_shadow_color));
R.color.usersettings_fragment_not_connected_text_color);
connectedStateLabel.setTextColor(textColor);
connectedStateLabel.setShadowLayer(0f, 0f, 0f, textColor);
connectedStateLabel.setText(getResources().getString(
R.string.usersettings_fragment_not_logged_in));
代码示例来源:origin: rey5137/material
v.setShadowLayer(r, dx, dy, shadowColor);
代码示例来源:origin: DaxiaK/MyDiary
private TextView buildTextLayout(final String character) {
sortTextList.add(character);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1);
TextView sortTextView = new TextView(mContext);
sortTextView.setLayoutParams(layoutParams);
sortTextView.setGravity(Gravity.CENTER);
sortTextView.setClickable(true);
sortTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13);
sortTextView.setText(character);
sortTextView.setTextColor(ColorTools.getColor(getContext(), R.color.contacts_latter_text));
sortTextView.setShadowLayer(1, 1, 1, R.color.contacts_latter_text_shadow);
return sortTextView;
}
代码示例来源:origin: curtis2/SuperVideoPlayer
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
代码示例来源:origin: stackoverflow.com
TextView textHello = (TextView)findViewById(R.id.hello);
textHello.setShadowLayer(
5f, //float radius
10f, //float dx
10f, //float dy
0xFFffffff //int color
);
代码示例来源:origin: stackoverflow.com
TextView locationName = new TextView(getSupportActivity());
locationName.setId(IdGenerator.generateViewId());
locationName.setText(location.getName());
locationName.setLayoutParams(super.centerHorizontal());
locationName.setTextSize(24f);
locationName.setPadding(0, 0, 0, 15);
locationName.setTextColor(getResources().getColor(R.color.Church_Grey));
locationName.setShadowLayer(3, 1, 1, getResources().getColor(R.color.Shadow_Church));
代码示例来源:origin: de.keyboardsurfer.android.widget/crouton
private void initializeTextViewShadow(final Resources resources, final TextView text) {
int textShadowColor = resources.getColor(this.style.textShadowColorResId);
float textShadowRadius = this.style.textShadowRadius;
float textShadowDx = this.style.textShadowDx;
float textShadowDy = this.style.textShadowDy;
text.setShadowLayer(textShadowRadius, textShadowDx, textShadowDy, textShadowColor);
}
代码示例来源:origin: gpfduoduo/AirPlay-Receiver-on-Android
private void initializeTextViewShadow(final Resources resources, final TextView text) {
int textShadowColor = resources.getColor(this.style.textShadowColorResId);
float textShadowRadius = this.style.textShadowRadius;
float textShadowDx = this.style.textShadowDx;
float textShadowDy = this.style.textShadowDy;
text.setShadowLayer(textShadowRadius, textShadowDx, textShadowDy, textShadowColor);
}
代码示例来源:origin: sealtalk/sealtalk-android
public static void textViewShadowLayer(TextView text, Context context) {
if (null == text) {
return;
}
text.setShadowLayer(16F, 0F, 2F, context.getApplicationContext().getResources().getColor(R.color.callkit_shadowcolor));
}
代码示例来源:origin: garretyoder/app-theme-engine
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void process(@NonNull Context context, @Nullable String key, @NonNull View view, @NonNull String suffix) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN)
return;
final TextView tv = (TextView) view;
final ColorResult result = getColorFromSuffix(context, key, view, suffix);
if (result == null) return;
tv.setShadowLayer(tv.getShadowRadius(), tv.getShadowDx(), tv.getShadowDy(), result.getColor());
}
}
代码示例来源:origin: yoyiyi/bilisoleil
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
代码示例来源:origin: yixia/VitamioBundleStudio
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
代码示例来源:origin: gpfduoduo/AirPlay-Receiver-on-Android
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
代码示例来源:origin: hezhubo/HPlayer
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
代码示例来源:origin: XieShengda/FakeDouyu
public void setShadowLayer(float radius, float dx, float dy, int color) {
super.setShadowLayer(radius, dx, dy, color);
mBorderSize = radius;
mBorderColor = color;
requestLayout();
invalidate();
initPaint();
}
内容来源于网络,如有侵权,请联系作者删除!