Skip to main content

Posts

Showing posts with the label colors

Android textview outline text

Is there a simple way to have text be able to have a black outline? I have textviews that will be different colors, but some of the colors don't show up on my background so well, so I was wondering if there's an easy way to get a black outline or something else that will do the job? I'd prefer not to have to create a custom view and make a canvas and such.

Android: Selector isn"t working as expected in TableRow selection

I have a TAbleLayout in my XML with 1 row i.e. te headings row. Other all rows, I add dynamically. I want to make a row selected on clicking it & on touching it. I added clickListener to each row and am able to trap click event. But when the mouse is pressed or kept pressed, I see color change, then again it comes to normal color. I want the color to stay changed until I click other row or click somewhere else to deactivate the selected row. My selector XML code : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Active state --> <item android:state_selected="true" android:state_focused="false" android:state_pressed="false" android:drawable="@android:color/transparent" /> <!-- Inactive state--> <item android:state_selected="false" android:state_focused="false" android:state