为片段添加一个弹出窗口

时间:2016-06-16 12:46:13

标签: java android android-fragments

我想在这个片段中添加一个弹出窗口,但我不知道如何,有什么帮助吗?

public class Info extends Fragment {

    public Info() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.kaynaklar_info, container, false);
    }

}

1 个答案:

答案 0 :(得分:0)

PopupDialog dialog = new PopupDialog(getActivity());