You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using tooltip library to show Guide tour in my app. My Whole app works with fragments. On right side of action bar i have button which opens Drawer menu . I want to show tooltip options in my Fragment . Here is a code which i have used to show tooltip.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (rootView != null) {
ViewGroup parent = (ViewGroup) rootView.getParent();
if (parent != null) {
parent.removeView(rootView);
}
}
else
{
if (rootView == null) {
rootView = inflater.inflate(R.layout.fragment_networks, container, false);
mSearchEditText = (EditText) rootView.findViewById(R.id.et_search_fragment_networks);
TourGuide mTourGuideHandler = TourGuide.init(getActivity()).
with(TourGuide.Technique.Click).setPointer(new Pointer()).setToolTip(new ToolTip().setTitle("Welcome!")
.setDescription("Click on Get Started to begin...")).setOverlay(new Overlay(true,R.color.red, Overlay.Style.Rectangle)).playOn(mSearchEditText);
}
}
return rootView;
}
When i run app i can't see any overlay on screen . But i can see tooltip on perfect position . Can you help me to solve this issue ? I can see Overlay in Kitkat but i can't see overlay in Lolipop and above versions.
Thanks
The text was updated successfully, but these errors were encountered:
I had a similar problem.
I think mSearchEditText isn't layed out yet, inside onCreateView method and TourGuide can't compute EditText size and position well.
Try something like:
mSearchEditText = (EditText) rootView.findViewById(R.id.et_search_fragment_networks);
mSearchEditText.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
public void onGlobalLayout() {
if (Build.VERSION.SDK_INT < 16)
mSearchEditText.getViewTreeObserver().removeGlobalOnLayoutListener(this);
else
mSearchEditText.getViewTreeObserver().removeOnGlobalLayoutListener(this);
TourGuide mTourGuideHandler = TourGuide.init(getActivity()).with(TourGuide.Technique.Click)
.setPointer(new Pointer())
.setToolTip(new ToolTip().setTitle("Welcome!")
.setDescription("Click on Get Started to begin..."))
.setOverlay(new Overlay(true,R.color.red, Overlay.Style.Rectangle))
.playOn(mSearchEditText);
}
});
I am using tooltip library to show Guide tour in my app. My Whole app works with fragments. On right side of action bar i have button which opens Drawer menu . I want to show tooltip options in my Fragment . Here is a code which i have used to show tooltip.
When i run app i can't see any overlay on screen . But i can see tooltip on perfect position . Can you help me to solve this issue ? I can see Overlay in Kitkat but i can't see overlay in Lolipop and above versions.
Thanks
The text was updated successfully, but these errors were encountered: