我采用的做法是把第二屏的加载全部写到service中,开启服务就好,但是这里就是presentation的初始化函数 public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme. 这里的outerContext必须要activity,不知道怎么处理啊
4.0我就看到有app做分屏了,只是不知道如何实现,,,
我采用的做法是把第二屏的加载全部写到service中,开启服务就好,但是这里就是presentation的初始化函数 public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme. 这里的outerContext必须要activity,不知道怎么处理啊 没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。
我采用的做法是把第二屏的加载全部写到service中,开启服务就好,但是这里就是presentation的初始化函数 public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme. 这里的outerContext必须要activity,不知道怎么处理啊 没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。 The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display. 你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊
我采用的做法是把第二屏的加载全部写到service中,开启服务就好,但是这里就是presentation的初始化函数 public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme. 这里的outerContext必须要activity,不知道怎么处理啊 没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。 The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display. 你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊 你自己试过了吗?不行?
我采用的做法是把第二屏的加载全部写到service中,开启服务就好,但是这里就是presentation的初始化函数 public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme. 这里的outerContext必须要activity,不知道怎么处理啊 没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。 The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display. 你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊 你自己试过了吗?不行? 额,当然试过,这里好像必须要填一个activity的context,而且这个activity跳转后presentation就消失了,如果说用getApplicationContext()就直接报错,也不行
我采用的做法是把第二屏的加载全部写到service中,开启服务就好,但是这里就是presentation的初始化函数 public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme. 这里的outerContext必须要activity,不知道怎么处理啊 没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。 The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display. 你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊 你自己试过了吗?不行? 额,当然试过,这里好像必须要填一个activity的context,而且这个activity跳转后presentation就消失了,如果说用getApplicationContext()就直接报错,也不行 那直接换window去做吧,本来挺简单的,用Presentation本来就是在绕圈子,没必要的。
google给的方法是通过android.app.Presentation来写界面,在4.4的apiDemo中有例子的。
另外就是setting的开发选项中,有一个“模拟显示设备”的选项可以模拟出一个屏幕出来去玩玩吧,配合api demos,可以看到两个screen显示不同内容的效果。
另外你可以把那个presentation那个activity直接copy出来,自己做一个apk来跑。
设置window在第二屏幕的做法,你看看presentation里面怎么写的就知道了。
public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme.
这里的outerContext必须要activity,不知道怎么处理啊
public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme.
这里的outerContext必须要activity,不知道怎么处理啊
没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。
public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme.
这里的outerContext必须要activity,不知道怎么处理啊
没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。
The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display.
你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊
public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme.
这里的outerContext必须要activity,不知道怎么处理啊
没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。
The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display.
你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊
你自己试过了吗?不行?
public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme.
这里的outerContext必须要activity,不知道怎么处理啊
没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。
The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display.
你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊
你自己试过了吗?不行?
额,当然试过,这里好像必须要填一个activity的context,而且这个activity跳转后presentation就消失了,如果说用getApplicationContext()就直接报错,也不行
public Presentation (Context outerContext, Display display)Creates a new presentation that is attached to the specified display using the default theme.
这里的outerContext必须要activity,不知道怎么处理啊
没有说必须是activity,Presentation会自己建立一个新的context的,不是用传进来的context。
The context of the application that is showing the presentation. The presentation will create its own context (see getContext()) based on this context and information about the associated display.
你看,这是对那个context参数的解释,我知道presentation会创建自己的context,但是它是在这个参数context之上的啊
你自己试过了吗?不行?
额,当然试过,这里好像必须要填一个activity的context,而且这个activity跳转后presentation就消失了,如果说用getApplicationContext()就直接报错,也不行
那直接换window去做吧,本来挺简单的,用Presentation本来就是在绕圈子,没必要的。