网格布局支持Android的API 10 [英] Grid Layout support in android API 10

查看:134
本文介绍了网格布局支持Android的API 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了目标API为15的布局,包括网络布局的应用程序。现在,当我改变目标API来10我与电网规划与其他元素空间越来越问题。 Eclipse提示我下载一个支持库的2.3.3,我做到了......但还是有问题。

I had developed an app with target API as 15. The layout includes a grid layout. Now when i am changing the Target API to 10 I am getting issues with the grid Layout and another element 'space'. Eclipse prompts me to download a supporting library for 2.3.3, Which i did... But still having the issue.

推荐答案

网​​格布局确实被反向移植到与API 7级及以上兼容。这是支持库(在某种程度上)的一部分。在您下载的支持库,你会发现在当地的SDK文件夹一个Android库项目位于:

GridLayout has indeed been backported to be compatible with API level 7 and up. It's (sort of) part of the support library. After you've downloaded the support library, you'll find an Android library project in your local sdk folder located at:

<sdk_folder>\extras\android\compatibility\v7\gridlayout

将它设置为你工作项目的依赖。在这之后,你需要从15级版本改变整个项目的引用,这种兼容性之一,以支持pre-ICS设备。在版式文件从网格布局更改的XML android.support.v7.widget.GridLayout。用法应该是相似的,如果不相同。

Set it up as dependency of the project you're working on. After that, you'll need to change the references throughout your project from the level 15 version to this compatibility one in order to support pre-ICS devices. In the Layout files change your xml from GridLayout to android.support.v7.widget.GridLayout. Usage should be similar, if not identical.

关于 空格 部件:我还没有实际使用这个(还),但它似乎是某种可以被取代或者设置保证金/填充现有的意见或自己的泛型查看添加是完全透明的。

这篇关于网格布局支持Android的API 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆