lisovaccaro
lisovaccaro

Reputation: 33966

Customize fastScrollOverlay?

I'm trying to customize the letter popup that appears during scroll. I was able to change it's colors and the position from my styles, but I need to make the text and the whole element bigger as well as move it closer to the vertical center of the screen. Is any of these things possible? How can I do them?

This is my current code from my style.xml file:

    <item name="android:fastScrollOverlayPosition">floating</item>
    <item name="android:fastScrollTextColor">#000000</item>
    <item name="android:fastScrollPreviewBackgroundLeft">@drawable/square</item>
    <item name="android:fastScrollPreviewBackgroundRight">@drawable/square</item>

Upvotes: 2

Views: 615

Answers (1)

Josh
Josh

Reputation: 10738

I don't have any info about further customization of the default overlay.

There's a more flexible alternative, though. You could add a TextView to your layout which only appears when the user is scrolling, and show the letter returned from your SectionIndexer's getPositionForSection method. You could then style this view exactly to your liking, and center it in a full-screen RelativeLayout.

Upvotes: 1

Related Questions