I am getting an error “The method show(FragmentManager, String)”

后端 未结 6 1082
礼貌的吻别
礼貌的吻别 2020-12-09 02:17

I am getting an error

The method show(FragmentManager, String) in the type DialogFragment is not applicable for the argumen

6条回答
  •  眼角桃花
    2020-12-09 02:57

    Even i had the same problem when running the code in gingerbread. But works fine for ICS. The solution is,

    instead of this:

    public class MainActivity extends Activity {
    }
    

    use extends FragmentActivty

    public class MainActivity extends FragmentActivity {
    }
    

提交回复
热议问题