I have a scrollView in my Activity,the background of scrollView is of multiple colours.
<ScrollView ---------->
<RelativeLayout -------------/>
</ScrollView>
To my RelativeLayout I have added Views dynamically.
inflated xml:
<RelativeLayout --------------android:background="some transparent image">
<TextView --------- ---------/>
</RelativeLayout>
I want my Text coloured to be same as Background colour. I have tried for the solution in many ways but could not succeed.
In iOS for achieving this they have used RSMaskedLabel (third party class), but I didn’t find anything similar to this in Android.
Still I didnt find any solution,can anyone help me please. I tried by using Bitmaps and Canvas but didnt worked for me.

Some guidelines how to achieve this with custom
TextView:TextViewcomponentBitmapandCanvaswhere you draw background and textCanvas(e.g.Color.argb(80, 255, 255, 255))Painthaving modePorterDuffXfermode(Mode.CLEAR)(Remember: Only allocateBitmapandCanvasonce) since you draw it intoBitmapBitmapintoTextViewscanvasHere is some sample code to get started with:
If you are setting text dynamically, you will need to reset
mBitmapToDrawin order to get it refreshed.