Home > Mobile > Instantiate the View times wrong Java. Lang. An IllegalStateException: System services not available
Instantiate the View times wrong Java. Lang. An IllegalStateException: System services not available
Time:10-01
Is this: When I was doing a custom Toast Need to get me with LayoutInflater custom Toast the layout of the But the error, error message is as follows: Java. Lang. An IllegalStateException: System services are not available to Activities before onCreate () And an error code is: The View layout=LayoutInflater. The from (this). Inflate (R.l ayout. Toast_layout, (ViewGroup) the findViewById (R.i which oast), true); After I also know about baidu is in the onCreate () in the instantiated, but I am a custom Toast classes, not the onCreate function, what should I do? In asking, answering...
CodePudding user response:
Why, there's no one there QAQ for bosses to solve
CodePudding user response:
This is you want to customize the Toast? If it is not inherited Activity, write a utility class