Is there any possibility to format the text inside Button differently? Suppose I need the half of the text in a Button be red and the other half to black. How can this be done?

    1 answer 1

    Why bother to use the button at all? Make your element and add onClickListener for it, here is Button.

    • Yes, thanks, solved the problem using ListView. - Phoenix888
    • I do not know what you have, but on your question you can still provide such a solution. Create a markup file with two layouts in the layout, and a java class, with fields that are the text of the view. You install them by ID on the creation of an object of this class, make it non-clickable, and lay out clickable. You hang the listener on it. You can in this class define a method that will switch the colors of each of the text with a view upon calling this method. Something like this - iamthevoid