MGDroid
MGDroid

Reputation: 1659

GridLayout compatibility

I am working on an application for which I need to make GridLayout compatible. So I am following the steps given in this link. I have downloaded zip folder and also have made it library. Everything is working fine till implementation. When I am trying to change main.xml as described as in the given link , I am getting . The error code is as follow.

<com.gridlayout.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:gridlayout="http://schemas.android.com/apk/res/com.CompatGrid.MakeCompatible"
android:layout_width="match_parent"
android:layout_height="match_parent"
gridlayout:alignmentMode="alignBounds"
gridlayout:columnCount="4"
gridlayout:columnOrderPreserved="false"
gridlayout:useDefaultMargins="true" >

My package name is "com.CompatGrid" and my Activity is "MakeCompatible". Error is in 3rd , 4th, 5th and 6th line. Errors are something like that.

error:No resource identifier found for attribute 'alignmentMode' in package 'MakeCompatible'.
error:No resource identifier found for attribute 'columnCount' in package 'MakeCompatible'.
error:No resource identifier found for attribute 'columnOrderPreserved' in package 'MakeCompatible'.
error:No resource identifier found for attribute 'useDefaultMargins' in package 'MakeCompatible'.

I have done as the instructions are given.

Upvotes: 0

Views: 2459

Answers (1)

MGDroid
MGDroid

Reputation: 1659

After reading again and again I found out my error. It was in 2nd line.

xmlns:gridlayout="http://schemas.android.com/apk/res/com.CompatGrid.MakeCompatible"

I edit it to

xmlns:gridlayout="http://schemas.android.com/apk/res/com.CompatGrid"

My mistake was I had to use the package name , not the main Activity Class name in the main.xml.

Upvotes: 1

Related Questions