TextView textv = (TextView) findViewById(R.id.textview1); textv.setShadowLayer(1, 0, 0, Color.BLACK);
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));
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }
v.setShadowLayer(r, dx, dy, shadowColor);
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));
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));
v.setShadowLayer(r, dx, dy, shadowColor);
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; }
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }
TextView textHello = (TextView)findViewById(R.id.hello); textHello.setShadowLayer( 5f, //float radius 10f, //float dx 10f, //float dy 0xFFffffff //int color );
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));
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); }
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); }
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)); }
@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()); } }
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }
public void setShadowLayer(float radius, float dx, float dy, int color) { super.setShadowLayer(radius, dx, dy, color); mBorderSize = radius; mBorderColor = color; requestLayout(); invalidate(); initPaint(); }