Skip to content

Tooltip view going outside #52

@mariooooo

Description

@mariooooo

Tooltip view going outside of view. How fix this?

code:

var toolTipBuilder = ToolTip.Builder(
            context, hint,
            root, getString(R.string.hint), ToolTip.POSITION_ABOVE
        )
        toolTipBuilder.setBackgroundColor(ContextCompat.getColor(this, R.color.blue))
        toolTipBuilder.setTypeface(ResourcesCompat.getFont(this, R.font.gf_bold)!!)
        hint.setOnClickListener {
               toolTip = toolTipsManager.show(toolTipBuilder.build())
        }

xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/nested_scroll_view"
        android:visibility="visible"
        android:fillViewport="true">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >
            <TextView/>
            <androidx.core.widget.NestedScrollView>
                <TextView/>
            </androidx.core.widget.NestedScrollView>

            <TextView/>

            <ImageView
                android:id="@+id/hint"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:src="@drawable/ic_info"
                android:translationZ="15dp"
                app:layout_constraintBottom_toBottomOf="@+id/label_day_select"
                app:layout_constraintStart_toEndOf="@+id/label_day_select"
                app:layout_constraintTop_toTopOf="@+id/label_day_select"
                app:tint="@color/green" />

            <com.skydoves.powerspinner.PowerSpinnerView/>
            <TextView/>
            <Button/>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>
</RelativeLayout>

screen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions