{"id":13694895,"url":"https://github.com/eluleci/FlatUI","last_synced_at":"2025-05-03T04:31:10.435Z","repository":{"id":11951508,"uuid":"14522206","full_name":"eluleci/FlatUI","owner":"eluleci","description":"Android FlatUI Kit","archived":true,"fork":false,"pushed_at":"2014-09-25T16:46:13.000Z","size":1719,"stargazers_count":1662,"open_issues_count":17,"forks_count":422,"subscribers_count":121,"default_branch":"master","last_synced_at":"2024-11-12T21:39:33.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eluleci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-19T11:13:10.000Z","updated_at":"2024-11-06T10:40:28.000Z","dependencies_parsed_at":"2022-09-11T14:12:24.109Z","dependency_job_id":null,"html_url":"https://github.com/eluleci/FlatUI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eluleci%2FFlatUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eluleci%2FFlatUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eluleci%2FFlatUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eluleci%2FFlatUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eluleci","download_url":"https://codeload.github.com/eluleci/FlatUI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252144556,"owners_count":21701432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T17:01:47.425Z","updated_at":"2025-05-03T04:31:06.224Z","avatar_url":"https://github.com/eluleci.png","language":"Java","readme":"Android FlatUI\n===================\n\nFlatUI is a library that lets you use native android widgets with a better and customized look.\n\nYou 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.\n\nThere are many predefined themes inside this library but you can also use your own colors easily.\n\n!!! 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.\n\n\nFeatures included\n-----------------\n* Creating widgets inside XML.\n* Creating widgets inside JAVA.\n* Using existing and custom themes.\n* Using existing and custom fonts.\n* Changing theme and attributes at runtime.\n* Changing ActionBar theme.\n\nLatest Changes\n-----------------\n* Add ease and ripple effects to buttons : 3.0.0\n* Fix issue #30 - Merge pull requests #34 (@sherwinrobles), #32 (@aliok), #28 (@weiwelcome0) :2.2.0\n* Fix issue #22 - NPE-while-creating-views-dynamically :2.1.1\n* Fix issue #14, 15, 19, 26 - Attribute name clash (contribution from @aimanbaharum) :2.1.0\n* Fix issue #17 - FlatButton padding applied (solution from @jstefanowski) :2.0.4\n* Fix issue #18 - Consecutive activity opening (pull request from @michalbrz) :2.0.3\n\nWidgets\n-----------\n![Themes][1]\n\nThemes\n-----------\n![Themes][2]\n\n\nIncluding into your project\n-------------------------\n\nAdd the following dependency to your `build.gradle`.\n\n    dependencies {\n        compile 'com.github.eluleci:flatui:3.0.0'\n    }\n\n\n\n## Main Java functions\n\n```java\n\n// Converts the default values (radius, size, border) to dp to be compatible with different\n// screen sizes. If you skip this there may be problem with different screen densities\nFlatUI.initDefaultValues(this);\n\n// Setting default theme to avoid to add the attribute \"theme\" to XML \n// and to be able to change the whole theme at once\nFlatUI.setDefaultTheme(FlatUI.DEEP);\nFlatUI.setDefaultTheme(R.array.my_custom_theme);    // for using custom theme as default\n\n// Getting action bar drawable and setting it.\n// Sometimes weird problems may occur while changing action bar drawable at runtime.\n// You can try to set title of the action bar to invalidate it after setting background.\ngetActionBar().setBackgroundDrawable(FlatUI.getActionBarDrawable(FlatUI.DEEP, false));\ngetSupportActionBar().setBackgroundDrawable(FlatUI.getActionBarDrawable(FlatUI.DEEP, false));\n\n```\n\n## Using custom colors\n\nYou can use your own colors in two ways.\n\n1 - Creating color array in xml and referencing it.\n\n```xml\n\n\u003c!-- CREATE A COLOR ARRAY IN COLORS XML --\u003e\n\u003ccolor name=\"custom_theme_darker\"\u003e#ad843d\u003c/color\u003e\n\u003ccolor name=\"custom_theme_dark\"\u003e#d4a14a\u003c/color\u003e\n\u003ccolor name=\"custom_theme_primary\"\u003e#fbbf58\u003c/color\u003e\n\u003ccolor name=\"custom_theme_light\"\u003e#fae8c8\u003c/color\u003e\n\n\u003cinteger-array name=\"custom_theme\"\u003e\n    \u003citem\u003e@color/custom_theme_darker\u003c/item\u003e \u003c!-- really much darker color of main color --\u003e\n    \u003citem\u003e@color/custom_theme_dark\u003c/item\u003e \u003c!-- a bit darker color of your main color --\u003e\n    \u003citem\u003e@color/custom_theme_primary\u003c/item\u003e \u003c!-- main color of your theme --\u003e\n    \u003citem\u003e@color/custom_theme_light\u003c/item\u003e \u003c!-- really much lighter color of main color --\u003e\n\u003c/integer-array\u003e\n\n\u003c!-- REFERENCE THE ARRAY IN LAYOUT FILE --\u003e\n\u003ccom.cengalabs.flatui.views.FlatButton\n    ...\n    flatui:fl_theme=\"@array/custom_theme\" /\u003e\n\n```\n\n2 - Creating color array in java and setting it\n\n```java\n\nint[] myColors = {Color.RED, Color.BLUE, Color.GREEN, Color.BLACK};\n\n((FlatSeekBar) findViewById(R.id.seekbar)).getAttributes().setColors(myColors);\n\n```\n\n## Using custom fonts\n\nRoboto and Open Sans are already included to the library but you can use any font with Android FlatUI.\nPlace your font file in assets/fonts/ folder of your project and use fontFamily and fontWeight attributes to your view.\n Your font file's name should be formatted like 'fontname_fontweight.ttf'.\n It is important to name the font file in correct way otherwise the font cannot be created.\n If your font file is .otf you can use the 'fontExtension' attribute for it.\n\n ```xml\n\n\u003c!-- default values of the font. no need to use extension if it is already ttf --\u003e\n\u003c!-- all the weights of the roboto and open sans are already included --\u003e\n\u003ccom.cengalabs.flatui.views.FlatTextView\n     ...\n     flatui:fl_fontFamily=\"roboto\"\n     flatui:fl_fontWeight=\"light\"\n     flatui:fl_fontExtension=\"ttf\"/\u003e\n\n ```\n\n## Attribute list\n\nThese are only common attributes for most of the views. You can see the full list of available attributes in [attrs.xml][3]\n\n- fl_theme          :  theme of the element (reference: @array/themeName)\n\n- fl_textAppearance :  text color on the element. dark or light colors of the theme.(none, dark, light)\n- fl_fontFamily     :  name of the font family (string)\n- fl_fontWeight     :  font weight of the text (string) (extralight, light, regular, bold, extrabold)\n- fl_fontExtension  :  extension of the font. use if not ttf (string)\n\n- fl_borderWidth    :  border width of the element. (dimension)\n- fl_cornerRadius   :  corner radius of the element. (dimension)\n- fl_size           :  size of the element. (dimension)\n\n## Samples\n\nOnly showing specific attributes for views.\n\n```xml\n\n\u003c!-- Add this line to the root element of the layout --\u003e\nxmlns:flatui=\"http://schemas.android.com/apk/res-auto\"\n\n\u003c!-- General Attributes --\u003e\n\u003ccom.cengalabs.flatui.views.SomeFlatView\n    ...\n    flatui:fl_theme=\"@array/sand\"\n    flatui:fl_textAppearance=\"dark\"\n    flatui:fl_fontFamily=\"roboto\"\n    flatui:fl_fontWeight=\"light\"\n    flatui:fl_fontExtension=\"ttf\"\n    flatui:fl_borderWidth=\"2dp\"\n    flatui:fl_cornerRadius=\"5dp\"\n    flatui:fl_size=\"20dp\" /\u003e\n\n\n\u003c!-- FlatTextView --\u003e\n\u003ccom.cengalabs.flatui.views.FlatTextView\n    ...\n    flatui:fl_textColor=\"main\"\n    flatui:fl_backgroundColor=\"darker\"\n    flatui:fl_customBackgroundColor=\"#00aff0\" /\u003e\n\n\n\u003c!-- FlatEditText --\u003e\n\u003ccom.cengalabs.flatui.views.FlatEditText\n\t...\n\tflatui:fl_fieldStyle=\"flat\" /\u003e\n\t\n\n\u003c!-- FlatSeekBar --\u003e\n\u003c!-- has no special attribute --\u003e\n\u003ccom.cengalabs.flatui.views.FlatSeekBar\n\t...\n\t/\u003e\n\t\n\n\u003c!-- FlatButton --\u003e\n\u003ccom.cengalabs.flatui.views.FlatButton\n\t...\n    flatui:fl_touchEffect=\"fl_ripple\"\n\tflatui:fl_blockButtonEffectHeight=\"3dp\" /\u003e\n\n\n\u003c!-- FlatCheckBox --\u003e\n\u003ccom.cengalabs.flatui.views.FlatCheckBox\n\t...\n\tflatui:fl_dotMargin=\"5dip\" /\u003e\n\n\n\u003c!-- FlatRadioButton --\u003e\n\u003ccom.cengalabs.flatui.views.FlatRadioButton\n\t...\n\tflatui:fl_dotMargin=\"5dip\" /\u003e\n\n\n\u003c!-- FlatToggleButton --\u003e\n\u003c!-- You can create different looks by playing with height, width, size, radius and space --\u003e\n\u003ccom.cengalabs.flatui.views.FlatToggleButton\n\t...\n\tflatui:fl_space=\"5dip\" /\u003e\n\n\t\n```\n\nLicense\n--------\n\n    Copyright 2014 CengaLabs.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n [1]: https://raw.github.com/eluleci/FlatUI/master/sample-images/showcase.png\n [2]: https://raw.github.com/eluleci/FlatUI/master/sample-images/themes.png\n [3]: https://github.com/eluleci/FlatUI/blob/master/library/src/main/res/values/attrs.xml","funding_links":[],"categories":["Java","Libs","etc"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feluleci%2FFlatUI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feluleci%2FFlatUI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feluleci%2FFlatUI/lists"}