Swipeable-RecyclerView icon indicating copy to clipboard operation
Swipeable-RecyclerView copied to clipboard

Customisation of "undo" ?

Open skategui opened this issue 8 years ago • 1 comments

Is it possible to rename the text "undo" by something else ? and change the color ?

Have not found anything about that :/

skategui avatar Jun 08 '17 13:06 skategui

@skategui Hi there and sorry for the late response. You can customize the "undo" text by overriding the attribute action_undo in your strings.xml file:

<string name="action_undo">[custom "undo" text here]</string>

As to customizing the color, you might have success overriding the UndoButtonStyle style in your styles.xml by adding the following (though I haven't tried it yet):

<style name="UndoButtonStyle">
    <item name="android:background">?android:attr/selectableItemBackground</item>
    <item name="android:textColor">[custom text color here]</item>
    <item name="android:textSize">16sp</item>
</style>

There should probably be an easier way to adjust the styles of various views used in this library, but I currently don't have the time to implement any of this. If someone is willing to throw in a pull request for this please let me know and I'll guide you through this. Thanks!

taltstidl avatar Jun 09 '17 10:06 taltstidl