eluleci / FlatUI

Android FlatUI Kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

rodoufu opened this issue · comments

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,

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)

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.

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

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

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.

@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.