Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在调用方法Fragment之前运行一些代码。如果用户单击肯定按钮,我想onCreateView显示一个AlertDialog并且我想第一次打电话。onCreateView那可能吗?
Fragment
onCreateView
AlertDialog
不它不是。您可以在用户单击时为该片段显示一个对话框和commit一个。transaction
commit
transaction