0

I used Calligraphy for loading custom fonts. In my activity's i attached the Calligraphy wrapper like below

 @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
    }

I am getting inflater = {CalligraphyLayoutInflater} in my onCreateView in my Fragment onCreateView

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_home, container, false);
        MapFragment fragment = (MapFragment) getChildFragmentManager().findFragmentById(R.id.map);

And i am getting null in my MapFragment.

how to solve this

George Thomas
  • 4,566
  • 5
  • 30
  • 65

1 Answers1

0

After a lot of wasted hours to find the actual problem, i found a quick fix for the time being. We can solve it by changing the getChildFragmentManager() to getFragmentManager()

I don't actually know why it behaves like that. But if you are looking for a quick fix you can use getFragmentManager() in your MapFragment.

You can follow the Issue Tracker for updates on this issue

EDIT 1:

I still get this issue in some devices like one plus.

George Thomas
  • 4,566
  • 5
  • 30
  • 65