我正在開發一個需要有這種文本格式的android應用程序,爲此我在下面的代碼中顯示的textview中使用shadowcolor,但是我無法完全實現。任何幫助將不勝感激。 這裏是我的TextView代碼:在Textview中創建文字陰影android
<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
參考http://stackoverflow.com/questions/ 3297437/shadow-effect-for-text-in-android – sasikumar
我已經添加了shadowcolor,shadowRadius,它完全不適合我我需要。 – AndroidFan