eluleci / flatui Goto Github PK
View Code? Open in Web Editor NEWAndroid FlatUI Kit
Android FlatUI Kit
Hi all.
I want to help, but I want to know if this project is active. Is this project active?
in FlatUI Library can we change the color for that themes. and how can i change it? thanks a lot :D
It's easy enough to make a just have 2 views for this, but it would be great if it was supported natively.
Happened in a fragment on a nexus 6 device. Should be reproducible. Cannot provide StackTrace. Have fun debugging.
Hi, Im trying to implement the flatUI on my android app, but if you build it, it gives some build error, secondly there is no clear description how to use it on eclipse since I am not using android studio. Please advise. Thanks
Hello Eluleci,
How to we use the FlatUI in Eclipse IDE, had googled a lot, however no HELP was found.
Regards,
i had googled alot about the fix and tried all possible fixes but didn't succeed..
layout file ->http://i62.tinypic.com/2wfo5qe.jpg
error ->http://i61.tinypic.com/28a4a3o.jpg
Hi, new Google Play Services hit me with an error:
Error:Attribute "theme" has already been defined
It points to com.google.android.gms\play-services\4.4.52\res\values\wallet_attrs.xml
<!-- Attributes for the WalletFragment <fragment> tag -->
<declare-styleable name="WalletFragmentOptions">
<!-- Theme to be used for the Wallet selector -->
<attr name="theme" format="enum">
<enum name="holo_dark" value="0"/>
<enum name="holo_light" value="1"/>
</attr>
</declare-styleable>
Is there a way to fix it?
When I import the project to Android Studio, I got this error :
"Error:Gradle version 1.10 is required. Current version is 2.1. If using the gradle wrapper, try editing the distributionUrl in D:\FlatUI-master\gradle\wrapper\gradle-wrapper.properties to gradle-1.10-all.zip.
Please fix the project's Gradle settings."
Editing gradle-wrapper.properties and build.gradle files didn't work for me.
Hello,
I'd like to change the EditText text color as well as its hint color. Am I be able to do so with current build? I've tried other options such as textColor, backgroundColor, customBackgroundColor and textAppearance, but none of them works.
As the title suggests, there are no grass colors, just a copy of the sea colors.
<!-- grass -->
<color name="grass_darker">#1a3b6c</color>
<color name="grass_dark">#1c52a2</color>
<color name="grass_primary">#2d72d9</color>
<color name="grass_light">#d5e3f7</color>
<!-- sea -->
<color name="sea_darker">#1a3b6c</color>
<color name="sea_dark">#1c52a2</color>
<color name="sea_primary">#2d72d9</color>
<color name="sea_light">#d5e3f7</color>
I am using Flat Ui in my Android Application using Android Studio but i am unable to find AutoCompleteTextView inside Flat Ui and I have to use AutoCompleteTextview in my application so anyone suggest me the way to use that?
hey i want to use Flatui in android studio and then after i paste
compile 'com.github.eluleci:flatui:3.0.0' in my build.gradle on my project then doesnt work nothing can you help me?sorry cause im very new for this, thanks for read my issues.
hello
Error:Attribute "cornerRadius" has already been defined
i wantto make a change but while compiling sources are redefine how can i fix it ?
my build.gradle
compile 'com.github.eluleci:flatui:2.0.2'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.0.2'
attrs.xml content:
<!-- FlatButton -->
<declare-styleable name="fl_FlatButton">
<attr name="fl_theme" />
<attr name="fl_fontFamily" />
<attr name="fl_fontWeight" />
<attr name="fl_fontExtension" />
<attr name="fl_textAppearance" />
<attr name="fl_cornerRadius" />
<attr name="fl_touchEffect" />
<!-- Defines the height of the border bottom of the button -->
<attr name="fl_blockButtonEffectHeight" format="dimension" />
</declare-styleable>
And Errors Below Shew Up:
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_theme
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_touchEffect
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_cornerRadius
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_fontExtension
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_fontFamily
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_fontWeight
ERROR: In <declare-styleable> fl_FlatButton, unable to find attribute fl_textAppearance
In this file, there are also other declare-styleable items, and nothing bad happens to them, only this code snippet can't fit in. So Why?
I dont really know what is this or why is it happening ?? But its wasting a lot of my time .
Hey this is a great lib! I was just wondering if you have thought about integrating Colour. I think it could help extend your project. I might be interested in contributing this if you think it is a good idea.
In /app/build/intermediates/exploded-aar/com.google.android.gms/play-services/4.4.52/res/values/wallet_attrs.xml
Please tell why this is happening when i am trying to compile your library
Hi !
after adding the library to my project, i have encountered a problem with the fl_theme attribute, this one doesn't change at all and sticks to blood theme forever, i want to know why the flatui:fl_theme attribute doesn't work with the @array/OtherThemes value ?
PS : i searched the source code and found that in case" setThemeSilent(int theme, Resources resources) " raises an exception, the blood theme applies automatically, does this mean that the problem comes from @array/ value ? or did i miss something ?
thank you in advance ^^
Is it possible to share the source code of sample app?
01-07 13:38:10.096 10485-10485/com.pingbits E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.UnsupportedOperationException
at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:429)
at com.cengalabs.flatui.TouchEffectAnimator.onDraw(TouchEffectAnimator.java:139)
at com.cengalabs.flatui.views.FlatButton.onDraw(FlatButton.java:61)
at android.view.View.draw(View.java:11054)
at android.view.View.getDisplayList(View.java:10493)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.draw(View.java:11057)
at android.view.View.getDisplayList(View.java:10493)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.getDisplayList(View.java:10491)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.getDisplayList(View.java:10491)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.getDisplayList(View.java:10491)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.draw(View.java:11057)
at android.widget.FrameLayout.draw(FrameLayout.java:463)
at android.view.View.getDisplayList(View.java:10493)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.getDisplayList(View.java:10491)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.getDisplayList(View.java:10491)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.getDisplayList(View.java:10491)
at android.view.ViewGroup.drawChild(ViewGroup.java:2958)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2596)
at android.view.View.draw(View.java:11057)
at android.widget.FrameLayout.draw(FrameLayout.java:463)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2145)
at android.view.View.getDisplayList(View.java:10493)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:880)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:1911)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1635)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2455)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
Hi,
We have added the appcompat-v7+ dependencies to eclipse and we are facing this error when trying to import flat-ui to the android project.
Not sure why this is happening.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':sample'.
Could not resolve all dependencies for configuration ':sample:_debugCompile'.
Could not find any version that matches com.android.support:appcompat-v7:+.
Required by:
com.github.eluleci:sample:2.0.2
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Hi, maybe i misunderstood the using of yours library but following your sample i ran into this rendering Exception, can anybody helps?
RENDERING EXCEPTION - "#HEX" in attribute "fl_theme" is not a valid format.
thanks a lot
Getting this error when im trying to add a <com.cengalabs.flatui.views.FlatTextView
Tip: Use View.isInEditMode() in your code or show sample data when shown in the IDE
How do i fix this?
Hey guys I'm using Android Studio and I'm encountering a weird error, I have added this line to the XML layout: xmlns:flatui="http://schemas.android.com/apk/res-auto"
but to no avail. I'm using this attribute on a FlatButton, and nothing else has given me this issue either.
Appears to be an incorrect cast
Caused by: java.lang.ClassCastException: android.graphics.drawable.StateListDrawable cannot be cast to android.graphics.drawable.LayerDrawable
<com.cengalabs.flatui.views.FlatSeekBar
flatui:theme="@array/snow"
android:id="@+id/font_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="40"
/>
07-15 14:20:49.762 15298-15298/com.snap E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.snap, PID: 15298
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.snap/com.snap.DragAndDrop}: android.view.InflateException: Binary XML file line #179: Error inflating class com.cengalabs.flatui.views.FlatSeekBar
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.access$800(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5070)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
Caused by: android.view.InflateException: Binary XML file line #179: Error inflating class com.cengalabs.flatui.views.FlatSeekBar
at android.view.LayoutInflater.createView(LayoutInflater.java:629)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:739)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.inflate(LayoutInflater.java:500)
at android.view.LayoutInflater.inflate(LayoutInflater.java:410)
at android.view.LayoutInflater.inflate(LayoutInflater.java:361)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:2122)
at com.snap.DragAndDrop.onCreate(DragAndDrop.java:112)
at android.app.Activity.performCreate(Activity.java:5720)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1102)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2208)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.access$800(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5070)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:603)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:739)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.inflate(LayoutInflater.java:500)
at android.view.LayoutInflater.inflate(LayoutInflater.java:410)
at android.view.LayoutInflater.inflate(LayoutInflater.java:361)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:2122)
at com.snap.DragAndDrop.onCreate(DragAndDrop.java:112)
at android.app.Activity.performCreate(Activity.java:5720)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1102)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2208)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.access$800(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5070)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
Caused by: java.lang.ClassCastException: android.graphics.drawable.StateListDrawable cannot be cast to android.graphics.drawable.LayerDrawable
at com.cengalabs.flatui.views.FlatSeekBar.init(FlatSeekBar.java:83)
at com.cengalabs.flatui.views.FlatSeekBar.<init>(FlatSeekBar.java:31)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:603)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:739)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:805)
at android.view.LayoutInflater.inflate(LayoutInflater.java:500)
at android.view.LayoutInflater.inflate(LayoutInflater.java:410)
at android.view.LayoutInflater.inflate(LayoutInflater.java:361)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:350)
at android.app.Activity.setContentView(Activity.java:2122)
at com.snap.DragAndDrop.onCreate(DragAndDrop.java:112)
at android.app.Activity.performCreate(Activity.java:5720)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1102)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2208)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.access$800(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5070)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
I am using sea theme and I see that the FlatEditText box has similar background. Is there a way to change the background color to transperant?
Hi, I have noticed that all padding settings set in xml layout for FlatButton are ignored (tested on Galaxy Nexus and Galaxy Tab 3 10). It is happening because custom paddings are overriden by paddings added to background drawables ( which is (0, 0, 0, bottom)). I have solution for that (sorry that I haven't done that by pull request). At the beginning of init() method you should save FlatButton paddings and apply them when background drawable is set:
private void init(AttributeSet attrs) {
final int paddingTop = getPaddingTop();
final int paddingRight = getPaddingRight();
final int paddingLeft = getPaddingLeft();
final int paddingBottom = getPaddingBottom();
...
setBackgroundDrawable(states);
setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
...
}
Hello,
please i got this error while import sample project :
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
on styles.xml
I want to integrate this library to apply ripple effect on Listview.
Can you help me how I can achieve this ?
Colors deep_dark and deep_primary are the same - #2d3845.
Hi, can't seem to work with adding FlatUI xml elements into Fragments xml file for a slide menu project after following the instruction of adding xmlns and adding some FlatUI element xml on it. It seems intuitive to me to follow as stated by adding the FlatUI xml into the fragments xml.
This is the Slide Menu project
https://github.com/benjiwsp/SlideMenu-Android
Let me know, or maybe i'll just not use Flat.. haha
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,
You should prefix the library resources using the new android gradle option to avoid name clashes with other libraries:
android {
resourcePrefix 'mylib_'
}
The following code will result in a NullPointerException:
FlatButton flatButton = new FlatButton(context);
In FlatButton#init() I added the following code to get it working:
if (attributes == null) {
attributes = new Attributes(this);
attributes.setColors(getResources().getIntArray(Attributes.DEFAULT_THEME));
}
I barely started messing around with your fantastic library but thought it would be great to add support to dynamically add views. My solution probably isn't the best.
Hi your library is great and i use it in my applications.
i just wanted to know when you going to add new components like Spinner,Drop-down etc.
I would suggest drop AppComp dependency out from this library, only provide actionbar background drawable producer function in this library, and developer can change the actionbar bg by themself.
It's always good to keep library simple and less dependency, besides there still huge amount of people using ABS now.
Hi, I'm having this issue on Android Studio, I don't know how to fix it. It's weird because I did a test a month ago and everything worked fine. I'm using the API 19. I'm trying to add a simpel edit text. Also, if I run the app on the emulator, the control is not rendered properly.
Here's a screenshot of the error.
And here's the layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:flatui="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@color/background">
<com.cengalabs.flatui.views.FlatTextView
android:id="@+id/etUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:layout_marginLeft="5dip"
android:maxLines="1"
android:gravity="center_vertical"
android:text="Edit Texts"
flatui:textColor="main"
flatui:theme="@array/candy"/>
</RelativeLayout>
Thanks in advance
How do you change the placeholder color? I see it in your demo but I don't see it in the code. Should I be using textColor, textAppearance to set this?
I tried this but it doesn't work (gives an error Error parsing XML: unbound prefix
)
<com.cengalabs.flatui.views.FlatEditText
...
flatui:fl_fieldStyle="flat" />
However, this works
<com.cengalabs.flatui.views.FlatEditText
...
fl_fieldStyle="flat" />
If the latter is the expected behaviour, maybe the documentation can be updated.
Hi, nice work. I wonder if you've thought about putting Spinners in the library. In the interim if I wanted to style my Spinners to have a theme in the library how do I do that? Thanks again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.