[android-developers] Re: Someone use GridLayout (ADT-17) in v7?
I'm also trying to integrate the support library for GridLayout into my application. To test the integration I created a small project where I copied the layout from the previous post into the layout file. There are no errors or anything but when I check the layout in the visual editor or by running the test app on a device all 3 the elements (button, checkbox and button) are placed on the first row side by side. But if I interpret the XML correctly each element should be displayed on a single row and column. So I'm wondering why the layout_column and layout_row attributes are ignored. Any suggestion how to fix this or what I'm doing wrong? On Apr 19, 4:58 pm, Tor Norbye tnor...@google.com wrote: You have to make sure not just to use android.support.v7.widget.GridLayout for the layout itself, but you have to use the app namespace for all of its attributes too, since layout_row, rowCount etc are not defined in the android namespace for versions older than API 14. As of ADT 17 there's improved handling for library project resource namespaces (res-auto), so your layout should look something like this: ?xml version=1.0 encoding=utf-8? android.support.v7.widget.GridLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res-auto; the namespace used for the library project android:layout_width=match_parent android:layout_height=match_parent app:columnCount=6 = notice how we're using app:columnCount here, not android:columnCount! Button android:id=@+id/button1 app:layout_column=1 === again, note the app: namespace app:layout_columnSpan=2 app:layout_gravity=left app:layout_row=1 android:text=Button / CheckBox android:id=@+id/checkBox1 app:layout_column=4 app:layout_gravity=left app:layout_row=2 android:text=CheckBox / Button android:id=@+id/button2 app:layout_column=5 app:layout_gravity=left app:layout_row=3 android:text=Button / android.support.v7.widget.Space === space widgets also need the full support package path android:layout_width=21dp === use the android namespace for width, height etc -- only use app: for the grid layout library's new resources android:layout_height=1dp app:layout_column=0 app:layout_gravity=fill_horizontal app:layout_row=0 / ... -- Tor On Thursday, April 5, 2012 7:56:37 AM UTC-7, Siddharth Menon wrote: Thanks Tor I tried using *android.support.v7.widget.GridLayout* gives me no error but I will not render as grid. Has anybody successfully got this working? On Wednesday, April 4, 2012 6:56:48 PM UTC+5:30, Tor Norbye wrote: You need to use android.support.v7.widget.GridLayout. -- Tor On Wed, Apr 4, 2012 at 5:02 AM, Siddharth Menon Hi, So finally give GridLayout support for older version. Added GridLayout project from sdk/extras/android/support/v7/gridlayout Added this project as lib to my working project (Target API 7 to 15) Now in the XML when I use GridLayout or android.widget.GridLayout I get the following error GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML) Can somebody please guide me what is that I am doing wrong? Cheers Siddharth Menon On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- Atenciosamente, André Luiz R. Silva @andreronsilva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Someone use GridLayout (ADT-17) in v7?
I'm also trying to integrate the support library for GridLayout into my application. To test the integration I created a small project where I copied the layout from the previous post into the layout file. There are no errors or anything but when I check the layout in the visual editor or by running the test app on a device all 3 the elements (button, checkbox and button) are placed on the first row side by side. But if I interpret the XML correctly each element should be displayed on a single row and column. So I'm wondering why the layout_column and layout_row attributes are ignored. Any suggestion how to fix this or what I'm doing wrong? On Thursday, April 19, 2012 4:58:16 PM UTC+2, Tor Norbye wrote: You have to make sure not just to use android.support.v7.widget.GridLayout for the layout itself, but you have to use the app namespace for all of its attributes too, since layout_row, rowCount etc are not defined in the android namespace for versions older than API 14. As of ADT 17 there's improved handling for library project resource namespaces (res-auto), so your layout should look something like this: ?xml version=1.0 encoding=utf-8? android.support.v7.widget.GridLayout xmlns:android= http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res-auto; the namespace used for the library project android:layout_width=match_parent android:layout_height=match_parent app:columnCount=6 = notice how we're using app:columnCount here, not android:columnCount! Button android:id=@+id/button1 app:layout_column=1 === again, note the app: namespace app:layout_columnSpan=2 app:layout_gravity=left app:layout_row=1 android:text=Button / CheckBox android:id=@+id/checkBox1 app:layout_column=4 app:layout_gravity=left app:layout_row=2 android:text=CheckBox / Button android:id=@+id/button2 app:layout_column=5 app:layout_gravity=left app:layout_row=3 android:text=Button / android.support.v7.widget.Space=== space widgets also need the full support package path android:layout_width=21dp === use the android namespace for width, height etc -- only use app: for the grid layout library's new resources android:layout_height=1dp app:layout_column=0 app:layout_gravity=fill_horizontal app:layout_row=0 / ... -- Tor On Thursday, April 5, 2012 7:56:37 AM UTC-7, Siddharth Menon wrote: Thanks Tor I tried using *android.support.v7.widget.GridLayout* gives me no error but I will not render as grid. Has anybody successfully got this working? On Wednesday, April 4, 2012 6:56:48 PM UTC+5:30, Tor Norbye wrote: You need to use android.support.v7.widget.GridLayout. -- Tor On Wed, Apr 4, 2012 at 5:02 AM, Siddharth Menon Hi, So finally give GridLayout support for older version. Added GridLayout project from sdk/extras/android/support/v7/gridlayout Added this project as lib to my working project (Target API 7 to 15) Now in the XML when I use GridLayout or android.widget.GridLayout I get the following error GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML) Can somebody please guide me what is that I am doing wrong? Cheers Siddharth Menon On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- Atenciosamente, André Luiz R. Silva @andreronsilva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Someone use GridLayout (ADT-17) in v7?
You have to make sure not just to use android.support.v7.widget.GridLayout for the layout itself, but you have to use the app namespace for all of its attributes too, since layout_row, rowCount etc are not defined in the android namespace for versions older than API 14. As of ADT 17 there's improved handling for library project resource namespaces (res-auto), so your layout should look something like this: ?xml version=1.0 encoding=utf-8? android.support.v7.widget.GridLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res-auto; the namespace used for the library project android:layout_width=match_parent android:layout_height=match_parent app:columnCount=6 = notice how we're using app:columnCount here, not android:columnCount! Button android:id=@+id/button1 app:layout_column=1 === again, note the app: namespace app:layout_columnSpan=2 app:layout_gravity=left app:layout_row=1 android:text=Button / CheckBox android:id=@+id/checkBox1 app:layout_column=4 app:layout_gravity=left app:layout_row=2 android:text=CheckBox / Button android:id=@+id/button2 app:layout_column=5 app:layout_gravity=left app:layout_row=3 android:text=Button / android.support.v7.widget.Space=== space widgets also need the full support package path android:layout_width=21dp === use the android namespace for width, height etc -- only use app: for the grid layout library's new resources android:layout_height=1dp app:layout_column=0 app:layout_gravity=fill_horizontal app:layout_row=0 / ... -- Tor On Thursday, April 5, 2012 7:56:37 AM UTC-7, Siddharth Menon wrote: Thanks Tor I tried using *android.support.v7.widget.GridLayout* gives me no error but I will not render as grid. Has anybody successfully got this working? On Wednesday, April 4, 2012 6:56:48 PM UTC+5:30, Tor Norbye wrote: You need to use android.support.v7.widget.GridLayout. -- Tor On Wed, Apr 4, 2012 at 5:02 AM, Siddharth Menon Hi, So finally give GridLayout support for older version. Added GridLayout project from sdk/extras/android/support/v7/gridlayout Added this project as lib to my working project (Target API 7 to 15) Now in the XML when I use GridLayout or android.widget.GridLayout I get the following error GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML) Can somebody please guide me what is that I am doing wrong? Cheers Siddharth Menon On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- Atenciosamente, André Luiz R. Silva @andreronsilva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Someone use GridLayout (ADT-17) in v7?
Thanks Tor I tried using *android.support.v7.widget.GridLayout* gives me no error but I will not render as grid. Has anybody successfully got this working? On Wednesday, April 4, 2012 6:56:48 PM UTC+5:30, Tor Norbye wrote: You need to use android.support.v7.widget.GridLayout. -- Tor On Wed, Apr 4, 2012 at 5:02 AM, Siddharth Menon Hi, So finally give GridLayout support for older version. Added GridLayout project from sdk/extras/android/support/v7/gridlayout Added this project as lib to my working project (Target API 7 to 15) Now in the XML when I use GridLayout or android.widget.GridLayout I get the following error GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML) Can somebody please guide me what is that I am doing wrong? Cheers Siddharth Menon On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- Atenciosamente, André Luiz R. Silva @andreronsilva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Someone use GridLayout (ADT-17) in v7?
Edit the attrs.xml and redefine the attributes as: attr name=layout_marginStart format=dimension / attr name=layout_marginEnd format=dimension / Then clean your GridLayout library project. Looks like someone made a mistake when putting it together as those attributes don't exist in the android namespace prior to API level 14. Joe On Mar 22, 8:06 pm, André Luiz R. Silva macolinkal...@gmail.com wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- *Atenciosamente, André Luiz R. Silva @andreronsilva* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Someone use GridLayout (ADT-17) in v7?
Hi, So finally give GridLayout support for older version. 1. Added GridLayout project from sdk/extras/android/support/ v7/gridlayout 2. Added this project as lib to my working project (Target API 7 to 15) 3. Now in the XML when I use GridLayout or android.widget.GridLayout I get the following error GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML) Can somebody please guide me what is that I am doing wrong? Cheers Siddharth Menon On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- *Atenciosamente, André Luiz R. Silva @andreronsilva* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Someone use GridLayout (ADT-17) in v7?
You need to use android.support.v7.widget.GridLayout. -- Tor On Wed, Apr 4, 2012 at 5:02 AM, Siddharth Menon siddharthme...@gmail.com wrote: Hi, So finally give GridLayout support for older version. Added GridLayout project from sdk/extras/android/support/v7/gridlayout Added this project as lib to my working project (Target API 7 to 15) Now in the XML when I use GridLayout or android.widget.GridLayout I get the following error GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML) Can somebody please guide me what is that I am doing wrong? Cheers Siddharth Menon On Friday, March 23, 2012 12:36:16 AM UTC+5:30, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- Atenciosamente, André Luiz R. Silva @andreronsilva -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Someone use GridLayout (ADT-17) in v7?
I'm getting this exact same error, has anyone figure out how to fix it? Andrew On Thursday, March 22, 2012 12:06:16 PM UTC-7, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- *Atenciosamente, André Luiz R. Silva @andreronsilva* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Someone use GridLayout (ADT-17) in v7?
I've been struggling with this all afternoon. I've tried dragging a gridlayout in on the layout editor and telling it to import the project, doesn't work. I try manually creating a project from the project folder and then manually linking my project to it, it appears to work, there's a nice green checkmark next to the link, but I still can't use the GridLayout widget. I don't know what else to try, has anybody made this work? On Apr 4, 1:32 pm, ashughes ashug...@gmail.com wrote: I'm getting this exact same error, has anyone figure out how to fix it? Andrew On Thursday, March 22, 2012 12:06:16 PM UTC-7, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- *Atenciosamente, André Luiz R. Silva @andreronsilva* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Someone use GridLayout (ADT-17) in v7?
Hi, I got the same error messages when I tried to use the library provided with the v7 compatibility package plus another one: ..\gridlayout_v7\res\values\attrs.xml:22: error: Attribute orientation has already been defined I tried both adding the project via ADT and importing it manually into my workspace. The former resulted into an empty gridlayout_v7 folder and the latter returned the error messages above plus a problem in the generated R.java: A closing curly brace is missing at the end of the file to close the R class. But I suppose that is a consecutive fault of the errors above? Also: ADT installs the support package every time I try to add a GridLayout to a layout.xml file, even though it should be clearly marked as installed. I suppose I cannot just use the .jar file provided in the lib package, can I? The .xml files in the values folder seem to be responsible for the export of some style variables. Kind regards Christian Geschkat On Thursday, 22 March 2012 20:06:16 UTC+1, André Luiz R. Silva wrote: Someone use GridLayout (ADT-17) in v7? Errors: [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginEnd [GridLayoutTest] ERROR: In declare-styleable GridLayout_Layout, unable to find attribute android:layout_marginStart Use sdk/extras/android/support/v7/gridlayout. -- *Atenciosamente, André Luiz R. Silva @andreronsilva* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en