tomergoldst / tooltips

Simple to use library for android, enabling to add a tooltip near any view with ease
835 stars 97 forks source link

Tooltip too large inside fragment. #13

Closed davida5 closed 7 years ago

davida5 commented 7 years ago

I'm trying to create a tooltip inside a fragment and it spans the whole page and goes beyond. Am I missing something or it's a bug?

    mToolTipsManager = new ToolTipsManager();

    mTextViewRadiusLabel = (TextView) rootView.findViewById(R.id.textViewRadiusTitle);
    mTextViewRadiusLabel.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            ToolTip.Builder builder = new ToolTip.Builder(getContext(), mTextViewRadiusLabel, container, "Tip message asdf asasd asdfasd", ToolTip.POSITION_BELOW);
            builder.setTextSize(12);
            mToolTipsManager.show(builder.build());
        }
    });

I'm using latest SDK 25

tomergoldst commented 7 years ago

It needs to work. From the short code you posted I can't see anything wrong. Try to replace container with (ViewGroup) getView()

davida5 commented 7 years ago

Thanks for the reply, I tried passing root LinearLayout as a ViewGroup that made the tooltip not appear at all, then I tried to downgrade to SDK 24 that didn't help either. So because this was urgent I switched to another framework. You can close this issue if you want, oh looks like I can close it too.

fahad9022 commented 7 years ago

same issue