0

I was trying to use the snippet from 2nd answer of the following post:
How do you turn off share history when using ShareActionProvider?

Which can be dowloaded from here and after adding ActivityChooserView.java along with other files to my project, I cannot resolve:

import android.support.v7.internal.widget.ListPopupWindow;

Import of android.support.v7.appcompat does not give any errors.

Where can I find android.support.v7.internal.widget.ListPopupWindow class?

I googled it and found nothing :)

I am compiling for android v23 and using appcompat.v7 of the same version.

Community
  • 1
  • 1
Ivan
  • 6,388
  • 3
  • 24
  • 30

1 Answers1

1

As you can see here the package name is android.support.v7.widget, so the correct import is:

import android.support.v7.widget.ListPopupWindow;

ListPopupWindow was moved from android.support.v7.internal.widget to android.support.v7.widget in v7 appcompat library v21.0.0.

To fix the issue change the import to the updated one.

Mattia Maestrini
  • 32,270
  • 15
  • 87
  • 94
  • Thanks Mattia, I tried that before in Eclipse but it didn't work, however after migrating to the fresh Android studio from the not very up to date Eclipse ADT it allowed me to compile and create apk! – Ivan Oct 17 '15 at 09:16