Android面试题(牛客)
来源:互联网 发布:mac怎么导出照片 编辑:程序博客网 时间:2024/06/17 02:59
2.MCV模式
M是逻辑模型
V是视图模型,对应于android里面的View
c是控制器,android中的activity实现了这个职责
3.到目前为止,我发现RemoteView会用在两个地方: 一个是在AppWidget , 另外一个是在Notification.
先从官方对他的定义来看: RemoteView--
A class that describes a view hierarchy that can be displayed inanother process. The hierarchy is inflated from a layout resourcefile, and this class provides some basic operations for modifyingthe content of the inflatedhierarchy.
RemoteView描述一个view,而这个view是在另外一个进程显示的。它inflate于layout资源文件。并且提供了可以修改过view内容的一些简单基础的操作。
从这个定义我们就知道RemoteView是用来描述一个垮进程显示的view。 从而你就会明白为什么AppWidget和Nofication需要用到它了。
4.
A 设置Activity的android:screenOrientation="portrait"属性时,无法切换横竖屏,因此不但不会重新调用各个生命周期方法,而且onConfigurationChanged()方法也不会执行。
B 未设置Activity的android:configChanges属性,API上这样说"the activitywill be restarted if any of these configuration changes happen inthe system.";如何配置有改变,就会重启activity
ClaunchMode为singleTask的时候,通过Intent启到一个Activity, 如果系统已经存在一个实例,系统就会将请求发送到这个实例上,但这个时候,系统就不会再调用通常情况下我们处理请求数据的onCreate方法,而是调用onNewIntent方法
D用户正在操作某个Activity,这时如果其他应用程序需要内存。 此时的Activity是Foregroundprocess,应该按照Empty process,Background process,Serviceprocess,Visible process顺序kill,最后才是前台进程。
5.
一个GLSurfaceView类
1.管理一个平面,
2.管理一个EGL
3.接受一个用户提供的实际显示的Renderer
4.使用一个专用线程去渲染从而和UI
5.支持on-demand
6.可选的包,
0 0
- Android面试题(牛客)
- Android面试题(牛客)
- Android面试题(牛客)
- Android面试题(牛客)
- Android面试题(牛客)
- Android面试题(牛客)
- Android面试题(牛客)
- Android面试题(牛客)
- (转)android面试题
- Android面试题(一)
- Android面试题(二)
- Android面试题(三)
- Android面试题(四)
- Android面试题(五)
- android 面试题(1)
- android 面试题(史上最全)
- android面试题(一)
- android面试题(二)
- Android面试题(牛客)
- RMQ算法
- Java基础之语法
- windows下mysql忘记root密码的解决办法
- Android知识点之桌面部件
- Android面试题(牛客)
- Android网络编程 - TCP/IP协议实践 - OkHttp
- Java基础之方法
- Linux网络配置
- imooc js进阶篇 7-23编程练习
- 易语言之数组操作
- 易语言之猜数游戏
- Android面试题(牛客)
- Android知识点之传感器