0

I am developing an android application that needs to have this kind of text formatting, For this i am using shadowcolor in textview shown in below code but i didn't able to achieve exactly. Any Help will be appreciated. Here is my Textview code:

<TextView
        android:id="@+id/textpage"
        android:textAlignment="center"
        android:layout_marginLeft="@dimen/book_page_text_view_margin"
        android:layout_marginRight="@dimen/book_page_text_view_margin"
        android:gravity="bottom|center_horizontal"
        android:text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. "
        android:textColor="#050505"
        android:textSize="16sp"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        local:MvxBind="Text PageText"
        android:layout_marginBottom="2dp"
        android:layout_marginTop="20dp"
        android:shadowColor="#ffffff"
        android:shadowDx="-1"
        android:shadowDy="-1"
        android:shadowRadius="3"
        android:textStyle="bold"
        android:fadingEdge="horizontal"
        android:scrollHorizontally="true" />

Here is the image showing required text style in rectangle area

AndroidFan
  • 41
  • 7

2 Answers2

0

ummm... first solution strike in my mind is just use the FONT. I mean using different font styles you can achieve it.

Drop Shadow Fonts

here is the different kind of fonts available. I never tried it but yes it ll work as per my experience ;).

Just try it and let me know. :)

Andrei
  • 42,814
  • 35
  • 154
  • 218
Harsh Patel
  • 1,056
  • 2
  • 10
  • 20
0

Try this it will help

 <LinearLayout 
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical" 
 android:background="@color/Black"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent">
 <TextView android:textColor="@color/White"
 android:layout_width="wrap_content"
 android:text="Your Text"
 android:layout_height="wrap_content" 
 android:padding="2dp"
 android:shadowColor="@color/White" 
 android:shadowDx="0"
 android:shadowDy="0" 
 android:shadowRadius="3" />
</LinearLayout>
Aditya Vyas-Lakhan
  • 13,409
  • 16
  • 61
  • 96