Giter Site home page Giter Site logo

flatui's Introduction

Android FlatUI

FlatUI is a library that lets you use native android widgets with a better and customized look.

You can define the widgets in XML or create on run time in JAVA. Even though the widgets are customized, you can create your styles with attributes.

There are many predefined themes inside this library but you can also use your own colors easily.

!!! There may be some unexpected results with different screen resolutions and different Android versions. If you have some problems or solutions to those problems please let me know.

Features included

  • Creating widgets inside XML.
  • Creating widgets inside JAVA.
  • Using existing and custom themes.
  • Using existing and custom fonts.
  • Changing theme and attributes at runtime.
  • Changing ActionBar theme.

Latest Changes

  • Add ease and ripple effects to buttons : 3.0.0
  • Fix issue #30 - Merge pull requests #34 (@sherwinrobles), #32 (@aliok), #28 (@weiwelcome0) :2.2.0
  • Fix issue #22 - NPE-while-creating-views-dynamically :2.1.1
  • Fix issue #14, 15, 19, 26 - Attribute name clash (contribution from @aimanbaharum) :2.1.0
  • Fix issue #17 - FlatButton padding applied (solution from @jstefanowski) :2.0.4
  • Fix issue #18 - Consecutive activity opening (pull request from @michalbrz) :2.0.3

Widgets

Themes

Themes

Themes

Including into your project

Add the following dependency to your build.gradle.

dependencies {
    compile 'com.github.eluleci:flatui:3.0.0'
}

Main Java functions

// Converts the default values (radius, size, border) to dp to be compatible with different
// screen sizes. If you skip this there may be problem with different screen densities
FlatUI.initDefaultValues(this);

// Setting default theme to avoid to add the attribute "theme" to XML 
// and to be able to change the whole theme at once
FlatUI.setDefaultTheme(FlatUI.DEEP);
FlatUI.setDefaultTheme(R.array.my_custom_theme);    // for using custom theme as default

// Getting action bar drawable and setting it.
// Sometimes weird problems may occur while changing action bar drawable at runtime.
// You can try to set title of the action bar to invalidate it after setting background.
getActionBar().setBackgroundDrawable(FlatUI.getActionBarDrawable(FlatUI.DEEP, false));
getSupportActionBar().setBackgroundDrawable(FlatUI.getActionBarDrawable(FlatUI.DEEP, false));

Using custom colors

You can use your own colors in two ways.

1 - Creating color array in xml and referencing it.

<!-- CREATE A COLOR ARRAY IN COLORS XML -->
<color name="custom_theme_darker">#ad843d</color>
<color name="custom_theme_dark">#d4a14a</color>
<color name="custom_theme_primary">#fbbf58</color>
<color name="custom_theme_light">#fae8c8</color>

<integer-array name="custom_theme">
    <item>@color/custom_theme_darker</item> <!-- really much darker color of main color -->
    <item>@color/custom_theme_dark</item> <!-- a bit darker color of your main color -->
    <item>@color/custom_theme_primary</item> <!-- main color of your theme -->
    <item>@color/custom_theme_light</item> <!-- really much lighter color of main color -->
</integer-array>

<!-- REFERENCE THE ARRAY IN LAYOUT FILE -->
<com.cengalabs.flatui.views.FlatButton
    ...
    flatui:fl_theme="@array/custom_theme" />

2 - Creating color array in java and setting it

int[] myColors = {Color.RED, Color.BLUE, Color.GREEN, Color.BLACK};

((FlatSeekBar) findViewById(R.id.seekbar)).getAttributes().setColors(myColors);

Using custom fonts

Roboto and Open Sans are already included to the library but you can use any font with Android FlatUI. Place your font file in assets/fonts/ folder of your project and use fontFamily and fontWeight attributes to your view. Your font file's name should be formatted like 'fontname_fontweight.ttf'. It is important to name the font file in correct way otherwise the font cannot be created. If your font file is .otf you can use the 'fontExtension' attribute for it.

<!-- default values of the font. no need to use extension if it is already ttf -->
<!-- all the weights of the roboto and open sans are already included -->
<com.cengalabs.flatui.views.FlatTextView
    ...
    flatui:fl_fontFamily="roboto"
    flatui:fl_fontWeight="light"
    flatui:fl_fontExtension="ttf"/>

Attribute list

These are only common attributes for most of the views. You can see the full list of available attributes in attrs.xml

  • fl_theme : theme of the element (reference: @array/themeName)

  • fl_textAppearance : text color on the element. dark or light colors of the theme.(none, dark, light)

  • fl_fontFamily : name of the font family (string)

  • fl_fontWeight : font weight of the text (string) (extralight, light, regular, bold, extrabold)

  • fl_fontExtension : extension of the font. use if not ttf (string)

  • fl_borderWidth : border width of the element. (dimension)

  • fl_cornerRadius : corner radius of the element. (dimension)

  • fl_size : size of the element. (dimension)

Samples

Only showing specific attributes for views.

<!-- Add this line to the root element of the layout -->
xmlns:flatui="http://schemas.android.com/apk/res-auto"

<!-- General Attributes -->
<com.cengalabs.flatui.views.SomeFlatView
    ...
    flatui:fl_theme="@array/sand"
    flatui:fl_textAppearance="dark"
    flatui:fl_fontFamily="roboto"
    flatui:fl_fontWeight="light"
    flatui:fl_fontExtension="ttf"
    flatui:fl_borderWidth="2dp"
    flatui:fl_cornerRadius="5dp"
    flatui:fl_size="20dp" />


<!-- FlatTextView -->
<com.cengalabs.flatui.views.FlatTextView
    ...
    flatui:fl_textColor="main"
    flatui:fl_backgroundColor="darker"
    flatui:fl_customBackgroundColor="#00aff0" />


<!-- FlatEditText -->
<com.cengalabs.flatui.views.FlatEditText
	...
	flatui:fl_fieldStyle="flat" />
	

<!-- FlatSeekBar -->
<!-- has no special attribute -->
<com.cengalabs.flatui.views.FlatSeekBar
	...
	/>
	

<!-- FlatButton -->
<com.cengalabs.flatui.views.FlatButton
	...
    flatui:fl_touchEffect="fl_ripple"
	flatui:fl_blockButtonEffectHeight="3dp" />


<!-- FlatCheckBox -->
<com.cengalabs.flatui.views.FlatCheckBox
	...
	flatui:fl_dotMargin="5dip" />


<!-- FlatRadioButton -->
<com.cengalabs.flatui.views.FlatRadioButton
	...
	flatui:fl_dotMargin="5dip" />


<!-- FlatToggleButton -->
<!-- You can create different looks by playing with height, width, size, radius and space -->
<com.cengalabs.flatui.views.FlatToggleButton
	...
	flatui:fl_space="5dip" />

	

License

Copyright 2014 CengaLabs.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

flatui's People

Contributors

aliok avatar eluleci avatar michalbrz avatar sherwinrobles avatar weiwelcome0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flatui's Issues

EditText change placeholder color?

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?

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

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,

Can we changing color?

in FlatUI Library can we change the color for that themes. and how can i change it? thanks a lot :D

Dynamically adding FlatButton causes NPE

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.

Inflate exception for Seekbar on Android L

Appears to be an incorrect cast

Caused by: java.lang.ClassCastException: android.graphics.drawable.StateListDrawable cannot be cast to android.graphics.drawable.LayerDrawable

https://github.com/eluleci/FlatUI/blob/master/library/src/main/java/com/cengalabs/flatui/views/FlatSeekBar.java#L83

<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)

Have you thought about intergrating Colour?

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.

cornerRadius

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'

flatui:fl_theme issue

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 ^^

Error:Gradle version 1.10 is required. Current version is 2.1

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.

Missing grass colors (just a copy of sea)

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>

The following classes could not be instantiated:

Getting this error when im trying to add a <com.cengalabs.flatui.views.FlatTextView

  • com.cengalabs.flatui.views.FlatTextView
    (Open Class, Show Exception)

Tip: Use View.isInEditMode() in your code or show sample data when shown in the IDE

How do i fix this?

Google Play Services 4.4.52 attribute theme error

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 &lt;fragment&gt; 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?

how to use in android studio

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.

Error ADT import

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

Cannot add padding to FlatButton.

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);
        ...
    }

Remove AppComp dependency

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.

Spinners?

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.

Integration with Listview

I want to integrate this library to apply ripple effect on Listview.
Can you help me how I can achieve this ?

Rendering problems on Android Studio

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.

rendering

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

Ability to change EditText's text & hint color

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.

Strange Issue on Consecutive Activity Opening.

screenshot_2014-06-21-10-32-40
screenshot_2014-06-21-10-32-08
screenshot_2014-06-21-10-32-20
screenshot_2014-06-21-10-32-27
screenshot_2014-06-21-10-32-33

The editbox and buttons gets rounded and border width gets broader each time i open the activity and goes back to normal to restarting application.
Also this affects all the activities and radiobuttons stop working/or doesn't show to be working.

Project Build Error?

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

How to use in Eclipse

Hello Eluleci,

How to we use the FlatUI in Eclipse IDE, had googled a lot, however no HELP was found.

Regards,

Support New Components

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.

Attribute Errors Occured, unable to find attribute.

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?

Runtime exception when using FlatUI on Android 4.0.4

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)

Is this project active?

Hi all.

I want to help, but I want to know if this project is active. Is this project active?

Flat Ui in Android using Android Studio

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?

Documentation - Samples

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.

Support for CheckedTextView

It's easy enough to make a just have 2 views for this, but it would be great if it was supported natively.

Error with dependencies in Android Eclipse JUNO

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.