【问题标题】:How to call fragment from activity without using fragmentactivity?如何在不使用片段活动的情况下从活动中调用片段?
【发布时间】:2014-12-02 13:28:53
【问题描述】:

在我的项目中,我正在使用片段和活动。在一项活动中,我使用了 youtube 视频 api,现在我想从该活动中调用片段,但他们不允许没有片段活动,我在该活动中扩展了 youtubebaseactivity。所以请帮助我

【问题讨论】:

标签: android android-activity android-fragments android-youtube-api


【解决方案1】:

使用ActionBarActivity 扩展yourclass,您可以访问这两个功能。

就是这样……

【讨论】:

  • 我在 json 对象中有 5 个 json 数组,请帮助我
  • 我没听懂你能详细解释一下吗?
  • 单个 json 对象中有 5 个不同的 json 数组。现在我想解析它们并想要存储这些数据
  • 我不能给出回应,但我可以给你结构{ "code":200, "error":null, "data":{ "fixtures":[ { "kickoff":"15:00 :00", "matchdate":"2012-07-28", "homescore":null, "awayscore":null, "attendance":null, "homepens":null, "awaypens":null, "division_id": "5059", "division":"Testing 1", "comp":"LGE", "location":null, "fixture_note":null, "hometeam_id":"64930", "hometeam":"Team 1", "awayteam_id":"64931", "awayteam":"Team 2" }"kickoff":"15:00:00", "matchdate":"2012-07-28", "homescore":null, "awayscore" :null, "出席":null, "homepens":null, "awaypens":null, } ] } }
  • 在上面的例子中,对象中有 2 个数组,就像我在单个对象中有 5 个数组一样
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-27
  • 2012-09-20
  • 1970-01-01
  • 2014-09-01
  • 2013-10-28
相关资源
最近更新 更多