Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Is there any way to use it with Maven instead of Gradle? #5

Closed
rodoufu opened this issue Feb 18, 2014 · 6 comments
Closed

Is there any way to use it with Maven instead of Gradle? #5

rodoufu opened this issue Feb 18, 2014 · 6 comments

Comments

@rodoufu
Copy link

rodoufu commented Feb 18, 2014

Hi,

My projects use maven and I put the dependencie bellow in the pom.xml:

<dependency>
      <groupId>com.github.eluleci</groupId>
      <artifactId>flatui</artifactId>
      <version>0.1.2</version>
</dependency>

So, my layout file is something like that:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:flatui="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <com.cengalabs.flatui.views.FlatEditText
        android:id="@+id/edittext_flat"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        flatui:cornerRadius="3dip"
        flatui:fieldStyle="flat"
        flatui:theme="Sand" />
</LinearLayout>

My project doesn't work, it has some errors:
Error parsing XML: unbound prefix
Attribute is missing the Android namespace prefix

I really liked this library and I'd like too much to use it with maven.

Thank you,

@eluleci
Copy link
Owner

eluleci commented Feb 19, 2014

There shouldn't be any problem with maven. I guess the reason of your problem is not adding the namespace line to your layout. You should add this line to be able to use "flatui" name space.

xmlns:flatui="http://schemas.android.com/apk/res-auto"

If you open the sample application's layout file you'll see there is this line.
https://github.com/eluleci/FlatUI/blob/master/sample/src/main/res/layout/activity_main.xml

Also there is another thing. The reason of using Gradle is that assets files are also available in the library. (like fonts in assets folder) While using Maven you'll not be able to get these fonts. So the thing you have to do is copying these font files and putting into your project's assets folder. (If you want to use one of these fonts)

@rodoufu
Copy link
Author

rodoufu commented Feb 19, 2014

Thank you eluleci, I'll try it.
I corrected this issue to show my code correctly and highlight it so now it's possible to see it right.

In this case a used:

<LinearLayout xmlns:flatui="http://schemas.android.com/apk/res/android">

Instead of:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:flatui="http://schemas.android.com/apk/res-auto">

I think that I used it in one of my tries but I'm not so sure and I'll try.
I hope to solve the problem.

@eluleci
Copy link
Owner

eluleci commented Feb 24, 2014

Could you make it work? I'll close the issue if you could solve it.

@eluleci eluleci closed this as completed Mar 8, 2014
@beydogan
Copy link

@rodoufu could you make it work? I couldnt make it work with Maven.

@eluleci
Copy link
Owner

eluleci commented Apr 11, 2014

Yes right. You need to have the android namespace too (I didn't realise that you just used flatui namespace). I hope it works as I said. But also you'll have problems with the resource files. So don't forget to copy them too.

@rodoufu
Copy link
Author

rodoufu commented Apr 16, 2014

@beydogan unfortunately I coudn't.
I was always getting the same problems, and for now I have no time to keep trying.
Sorry I had take so long to answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants