0

Here is my Xml file

  <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/popup"
        android:layout_width="fill_parent"
        android:layout_height="350dip" >

        <RelativeLayout
            android:id="@+id/rl_top"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:background="#00000000" >

            <ImageView
                android:id="@+id/image_tringle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_alignParentTop="true"
                android:layout_marginRight="50dp"
                android:src="@drawable/notficationarrow_icon" />
        </RelativeLayout>

        <ListView
            android:id="@+id/listView1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_below="@id/textView1"
            android:background="#ffffff" >
        </ListView>

        <TextView
            android:id="@+id/notficationbglayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@+id/rl_top"
            android:background="#ffffff"
            android:gravity="center"
             style="@style/AudioFileInfoOverlayText"
            android:text="Notification"
            android:textColor="#666666"
            android:textSize="25dip"
            android:textStyle="bold" />

    </RelativeLayout>

enter image description here

i have tried much but unable to apply set Shadow effect please help .

i want set shadow effect on Textview where i have written Notification so its look like face book

enter image description here

i want make it like facebook please help and suggest how to apply Shadow effect

Edge
  • 925
  • 5
  • 15
  • 31

2 Answers2

0

You Should Probably Try This..
Refer This Link For More Effects : Text Shadows

you can directly add styles to TextView..

<TextView
        android:id="@+id/textview1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:shadowColor="@color/text_shadow"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="2"
        android:textColor="@color/light_font"
        android:textSize="14dp"
        android:textStyle="bold" />

or
You should be able to add the style, like this

styles.xml

 <style name="TextViewShadowEffect">
    <item name="android:paddingLeft">4px</item>
    <item name="android:paddingBottom">4px</item>
    <item name="android:textColor">#ffffffff</item>
    <item name="android:textSize">12sp</item>
    <item name="android:shadowColor">#000000</item>
    <item name="android:shadowDx">1</item>
    <item name="android:shadowDy">1</item>
    <item name="android:shadowRadius">1</item>
  </style>

And in your layout, use the style like this:

   <TextView 
       android:id="@+id/textview1"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       style="@style/TextViewShadowEffect"
       android:gravity="center" />
Pragnesh Ghoda シ
  • 8,318
  • 3
  • 25
  • 40
0

If you want an online editor to preview the shadow effect (+many other options) and at the end get the ready-made xml, then you can check this tool:

http://angrytools.com/android/button/

semsamot
  • 805
  • 9
  • 11