Puede crear un ListDialogFragment que amplíe el SherlockDialogFragment y cree su propia interfaz Listener para que pueda manejar los eventos de selección.
public class ListDialogFragment extends SherlockDialogFragment {
private String[] mValues;
public interface ListDialogListener {
void onFinishListDialog(int selectedIndex, String tag);
}
private ListDialogFragment(String[] values) {
mValues = values;
}
public static ListDialogFragment newInstance(int index, String[] values) {
ListDialogFragment fragment = new ListDialogFragment(values);
// Supply index input as an argument.
Bundle args = new Bundle();
args.putInt("index", index);
fragment.setArguments(args);
return fragment;
}
public int getSelectedIndex() {
return getArguments().getInt("index", 0);
}
}
Estoy haciendo algo similar AQUÍ !!! http://stackoverflow.com/questions/16621070/get-context-of-popupmenu-like-contextmenu – toobsco42
Compruebe esta pregunta hecha previamente: [Alternativa adecuada a PopupMenu para pre-Honeycomb] (http://stackoverflow.com/questions/9878916/appropriate-alternative-to-popupmenu-for-pre-honeycomb) Te ayudará a superar el concepto. –
¿Qué hay de usar [HoloEverywhere] (https://github.com/Prototik/HoloEverywhere)? – azizbekian