Android full-screen dialog callback issue

前端 未结 4 2094
暖寄归人
暖寄归人 2020-12-28 21:46

I am having trouble wrapping my head around something but let me first describe my setup:

\"flow\"

I ha

4条回答
  •  时光说笑
    2020-12-28 22:35

    add this line to oncreate in your custom dialog fragment.

    setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Black_NoTitleBar_Fullscreen);
    

    On the other hand, you can use content resolvers to store your children datas. It has observer pattern. So each CursorAdapter attached to that content it refreshes itself without calling notifySetDataChanged();.

    I think you are using RecyclerView.Adapter. You can use this class.

    Another advice for implementing adding child feature is using startActivityForResult(activity);. You can send back datas by using getIntent().getExtras().put(key,value); You can search for custom start activity for result.

    Good luck

提交回复
热议问题