我实际上会考虑在这里使用片段。您可以为初始屏幕创建一个片段,并在您的活动首次开始时加载该片段。然后,一旦您的 json 加载/解析完成,您可以使用 FragmentTransaction 将您的第二个“屏幕”作为第二个片段加载,并让它替换您的加载屏幕。这也可以让你做一些漂亮的过渡动画。
This could be similarly done with the comment from njzk2, with two separate Activities. Essentially, you would do your parsing AsyncTask during the 'loading activity' and store the result as either a serializable object that could be passed to your other activity using an Intent extra or you could store the json into the SharedPreferences dictionary and reference that in your second activity.
You might also find that this is something you don't have to do every start up. If so, you should save either the serializable to disk so you can skip parsing or to the shared preferences so you can reference it there if it exists.