4

I have textview with shadow to show,I put parameters of Shadow ShadowX and ShadowY and ShadowRadius like in following XML code

 <TextView
            android:id="@+id/Title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowColor="#e41919"
            android:shadowRadius="0.6"
            android:text="@string/nader"
            android:textColor="#e1e1e1"
            android:textStyle="bold" />

but I don't know that how Shadow X ,Shadow Y and Shadow Radius work in background and how android evaluate these parameters values conceptually?

android:shadowDx – specifies the X-axis offset of shadow. You can give -/+ values, where -Dx draws a shadow on the left of text and +Dx on the right

android:shadowDy – it specifies the Y-axis offset of shadow. -Dy specifies a shadow above the text and +Dy specifies below the text.

android:shadowRadius – specifies how much the shadow should be blurred at the edges. Provide a small value if shadow needs to be prominent.

how does android logically use these above attribute values without specifying values in any format like ,please send me any tutorial URL about these attributes

dp pixel

if you have any tutorial and reference about shadow parameter then please help and send me the Blogs URL tutorial about these properties of Shadow

user2508815
  • 73
  • 1
  • 1
  • 5
  • check this link http://stackoverflow.com/questions/3297437/shadow-effect-for-a-text-in-android – Rgv Apr 29 '16 at 11:37

2 Answers2

2

Please Refer the following link:

http://android--code.blogspot.in/2015/05/android-textview-text-shadow.html

You have to take the 3-4 textview's in yout xml file, then change the shadowDx, shadowDy and color of the shadow for each textview, then you will observe the difference.

Saritha G
  • 2,588
  • 1
  • 15
  • 27
  • thank you dear for your good suggestion,but the my question is that how did the ShadowX and ShafowY work internally and logically ,l need more Conceptual Understanding So I can customize Show of TextView like following https://en.wikipedia.org/wiki/Shadow_mapping – user2508815 May 02 '16 at 04:43
0

Add the attributes in the TextView XML:

android:shadowColor="#ff6ccDze0"
android:shadowRadius="5"
android:shadowDy="6"
android:shadowDx="7"
Floern
  • 33,559
  • 24
  • 104
  • 119
Ramesh Prajapati
  • 654
  • 6
  • 10
  • Please alter your answer with an explanation of your code. – Robert Apr 29 '16 at 14:27
  • dear I don't need any examples of TextView shadow,I need that how does ShadowX ,ShadowY and ShadoRadius work logically and concptually on TextView Android,how did these attributes effect the shadow of textview – user2508815 Apr 29 '16 at 15:19