简体   繁体   English

版本 1.6 上的蜂窝代码

[英]Honeycomb code on version 1.6

I would like to take the code example written for 3.1, and make it compile and work on 1.6 and up.我想采用为 3.1 编写的代码示例,并使其在 1.6 及更高版本上编译和工作。 For example - how can I have code example "Honeycomb Gallery " work on 1.6?例如 - 我如何让代码示例“Honeycomb Gallery ”在 1.6 上工作?

You would need to rewrite the Honeycomb gallery program to use the compatibility library and have it work on 1.6 with a different layout, eg a single pane one.您需要重写 Honeycomb 画廊程序以使用兼容性库,并使其在 1.6 上以不同的布局工作,例如单窗格的。

The compatibility library is somewhat limited, eg in areas such as the customisation of the actionbar, so you'll have to bring in whatever bits of 3.1 you'll need from that and code accordingly so that you don't load anything that you shouldn't when running under 1.6.兼容性库有些限制,例如在操作栏的自定义等领域,因此您必须从中引入您需要的任何 3.1 位并相应地编码,这样您就不会加载任何您不应该加载的内容在 1.6 下运行时不会。

The compatibility library sample sources have various fragment samples, although I don't have them to hand to see if they support running on 1.6, probably some of them do.兼容性库示例源有各种片段示例,虽然我手头没有它们来查看它们是否支持在 1.6 上运行,但可能其中一些支持。

Edit The compatibility library API demos sample does support a miniumum SDK version of 4 (1.6).编辑兼容性库 API 演示样本确实支持最小的 SDK 版本 4 (1.6)。

You can't, the code for 1.6 will work on higher api's but not the other way around.你不能,1.6 的代码可以在更高的 api 上工作,但反过来不行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM