icon Material Tap Target Prompt GitHub

FAQ

The prompt is too wide

Use setMaxTextWidth to set the maximum width that the primary and secondary text can be. The background is size is calculated based on the text size. Setting the maximum width for the text will then alter the background calculated size

Show from a life-cycle event

If a view has not yet been created the library won’t be able to find it. To get around this post a runnable which creates the prompt:

new android.os.Handler(Looper.getMainLooper()).post(new Runnable()
{
    @Override
    public void run()
    {
        // Create the prompt here
    }
})
Edit this page