Android GridLayout and Space backport

后端 未结 3 2030
傲寒
傲寒 2021-01-27 00:13

Is there a backport of GridLayout and Space (both introduced in SDK 4.0) available (or planned) for older SDK\'s?

相关标签:
3条回答
  • 2021-01-27 00:46

    This should become available in the compatibility library. But nothing prevents you in already using it. See my post at http://blog.peterkuterna.net/2011/11/using-new-gridlayout-on-pre-ice-cream.html

    0 讨论(0)
  • 2021-01-27 00:59

    The new version of the compatibility library does support the GridLayout and SpaceLayout but you have to add the tools as a library project. If you're using Eclipse you can import an existing project, navigate to where the Android SDK lives, and select the v7 compatibility directory.
    Once you have that imported you can go into project properties and add the library project through the Android page in that menu. The reason for this seems to be because of additional layout parameters that can't be included in a normal Jar file.

    0 讨论(0)
  • 2021-01-27 01:04

    The new version of the compatibility library (or support package, or whatever Google is calling it now) has arrived: http://developer.android.com/sdk/compatibility-library.html

    (Actually, I think support package is the new name?)

    There is no mention in the release notes or the documentation of the Gridlayout or the Space widget.

    On the other hand, if you try to add these widgets to a project based on an older SDK then you get a helpful message offering to add them as long as you use the support package.

    But, given the mixed messaging I'm scared to use them. Perhaps the lack of any mention or documentation from Google means that they the support is rather alpha and only for the brave (or foolish)?

    0 讨论(0)
提交回复
热议问题