Back to project page advanced-textview.
The source code is released under:
Apache License
If you think the Android project advanced-textview listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sqisland.android.advanced_textview; /*from w w w . ja v a2 s .c o m*/ import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapShader; import android.graphics.Shader; import android.os.Bundle; import android.widget.TextView; public class PatternedTextActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_patterned_text); TextView textView = (TextView) findViewById(R.id.text); Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.cheetah_tile); Shader shader = new BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT); textView.getPaint().setShader(shader); } }