TextView secondTextView = new TextView(this);
Shader textShader=new LinearGradient(0, 0, 0, 20,
new int[]{Color.GREEN,Color.BLUE},
new float[]{0, 1}, TileMode.CLAMP);
secondTextView.getPaint().setShader(textShader);
More Related Contents:
- What is the difference between “px”, “dip”, “dp” and “sp”?
- Difference between a View’s Padding and Margin
- How to change the background color of the options menu?
- How do I align views at the bottom of the screen?
- How do I display the current value of an Android Preference in the Preference summary?
- How to detect swipe direction between left/right and up/down
- How do I get the height and width of the Android Navigation Bar programmatically?
- Grid of images inside ScrollView
- Updating Android UI using threads
- Is it a bad practice to use negative margins in Android?
- Android ViewPager with bottom dots
- Why are most UI frameworks single threaded?
- More efficient way of updating UI from Service than intents?
- Android Alarm Clock UI
- Accessing UI thread handler from a service
- How to display more than 3- levels of expandable List View?
- Android – Way to appear bordered text on the TextView?
- creating a strikethrough text?
- How to detect “Recent Apps” system button clicks (Honeycomb+)
- Detecting Webview Error and Show Message
- Is it possible to make a horizontal NumberPicker?
- Android 4.2.1 wrong character kerning (spacing)
- Flutter give container rounded border
- Android – Back button in the title bar
- How do you implement context menu in a ListActivity on Android?
- Error when adding buildFeatures in build.gradle file
- Multiple choice list with custom view?
- Make a wizard like application in Android
- Is there a view for inputing integers in Android?
- Getting rid of the gradient at the top of an Activity (Android)