Giter VIP home page Giter VIP logo

pixlui's Introduction

Logo PixlUI

Provide few methods for visual elements.

Bitdeli Badge Gittip Android Arsenal JitPackGradle JitPackMaven Travis Stack Share

CheckBox:

  • Custom font
  • Text All caps (works on all API version)

Button:

  • Custom font
  • Text All caps (works on all API version)

EditText:

  • Custom font
  • Copy/Cut/Paste (enable/disable) (works on all API version)
  • Cancel clipboard content (works on all API version)
  • Text All caps (works on all API version) - (in progress)
  • Focus listener
  • Batch listener (replace TextWatcher, wich that you can intercept DEL touch on all API)

AutoCompleteEditText:

  • Custom font
  • Copy/Cut/Paste (enable/disable) (works on all API version)
  • Cancel clipboard content (works on all API version)
  • Text All caps (works on all API version) - (in progress)
  • Focus listener
  • Batch listener (replace TextWatcher, wich that you can intercept DEL touch on all API)

Image View:

  • Alpha (works on all API version)

RelativeLayout:

  • Alpha (works on all API version)

TextView:

  • Contains a fix to do proper ellipsizing
  • Custom font
  • Text All caps (works on all API version)

Screenshot

Screen1

Gradle Setup

Compile with one line easy code!

repositories {
    maven {
        url "https://jitpack.io"
    }
}

Compile in the build.gradle file. for X.X.X please refer to the change log.

dependencies{
  compile 'com.github.neopixl:PixlUI:vX.X.X.'
}

Maven Setup

Add Repository

<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>

Add Dependency:

	<dependency>
	    <groupId>com.github.neopixl</groupId>
	    <artifactId>PixlUI</artifactId>
	    <version>v1.0.5</version>
	</dependency>

How use it ?

  1. Add your custom fonts in /assets/fonts/

  2. Define your fonts in styles.xml

    <style name="AppTheme.TextGearedSlab">
        <item name="typeface">GearedSlab.ttf</item>
    </style>


    <style name="AppTheme.TextGearedSlab.t1">
        <item name="android:textSize">12sp</item>
    </style>


    <style name="AppTheme.TextGearedSlab.t2">
        <item name="android:textSize">14sp</item>
    </style>
  1. Use it in XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:pixlui="http://schemas.android.com/apk/com.neopixl.pixlui"
    xmlns:tools="http://schemas.android.com/tools" >

    <np.TextView
        style="@style/AppTheme.TextGearedSlab.t1"
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world"
        pixlui:copyandpaste="false"
        pixlui:clearclipboardcontent="true"/>
</RelativeLayout>

Logo ChangeLog

1.1.2

  • closes #31 (Memory Leak: Activity Leak on PixlUIfaceManager.INSTANCE)
  • Update buildTools (25.0.3) and compileSdkVersion / targetSdkVersion = 25.

1.1

  • Android studio 1.5.1 Support
  • Android Layout Preview support (on API >=23 preview)
  • CheckedTextView added
  • Chronometer added
  • ExtractEditText added
  • Switch added
  • Refactor
  • Fixed some bugs
  • Find easy accessor to our components: - Before: <com.neopixl.pixlui.components.textview.TextView - Now: <np.TextView

1.0.6

  • Upgraded to last build tools
  • EllipsizingTextView is now removed from com.neopixl.pixlui.components.textview

1.0.5a (Prerelease)

  • Temp release to fix jitpack.io build
  • include a gradle'ized versin of PixlUI (now a library project)

1.0.5

  • Added custom RadioButton (Custom font, Text all caps)

1.0.4

  • Added RelativeLayoutAnimator (VISIBLE/GONE/INVISIBLE transition animation)
  • Added LinearLayoutAnimator (VISIBLE/GONE/INVISIBLE transition animation)
  • Added custom AutoCompleteEditText
  • Added custom AutoResizeTextView (in progress)

1.0.3

  • Added custom CheckBox (Custom font, Text all caps)

1.0.2

  • Added method in custom EditText (Autofocus Listener, Hide/Show Keyboard)

1.0.1

  • Added method in custom TextView (Text all caps) - for old api version
  • Added method in custom EditText (Text all caps) - for old api version
  • Added method in custom Button (Text all caps) - for old api version
  • Fix NPE in Batch Listener
  • Added custom RelativeLayout (Alpha) - for old api version

1.0.0

  • Added custom TextView (Custom font)
  • Added custom EditText (Custom font, Focus Listener, Batch Listener)
  • Added custom Button (Custom font)
  • Fix many crash

Logo Application using PixlUI

Flow W-Zup FLASHiZ MeeTincS Wort.lu hb store iBeezi RootCoinExplorer

[Flow] (https://play.google.com/store/apps/details?id=com.metalab.flow) - W-Zup - FLASHiZ - MeeTincS - Wort.lu -
Hypebeast - iBeezi- RootCoinExplorer

Donation

Donation

Copyright

Copyright 2014-2016 Neopixl - Olivier Demolliens

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.

pixlui's People

Contributors

jitpack-io avatar jjhesk avatar odemolliens avatar yvanneopixl 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

pixlui's Issues

Fonts don't get selected

I am trying out similar to sample project:

<com.neopixl.pixlui.components.textview.TextView
android:id="@+id/loadingtext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loadingtext"
android:textColor="@drawable/text_selector_listview"
android:paddingTop="3dp"
android:layout_gravity="center"
pixlui:clearclipboardcontent="true"
pixlui:copyandpaste="false"
style="@style/TextRoboto.t1"

<style name="TextRoboto.t1" parent="MyMaterialTheme.Base"> Roboto-Regular.ttf 11sp </style>

XML shows: Asset not found: fonts/Roboto-Regular.ttf

I can confirm the file is there in assets/fonts folder (Assets folder is in main Folder and not inside res folder)

What could be wrong?

Changelog in README needs updating

Added this library to my build.gradle file using the latest version number from the changelog as documented in README:

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'com.github.neopixl:PixlUI:1.0.5'
    compile 'com.android.support:appcompat-v7:22.2.1'
}

Build fails:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

:app:dexDebug FAILED

FAILURE: Build failed with an exception.

Updated to:

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'com.github.neopixl:PixlUI:1.0.6'
    compile 'com.android.support:appcompat-v7:22.2.1'
}

Build completes.

Could the README changelog please be updated to include versions as they are created to save people spending hours trying to debug a problem that's already been fixed?

adapt the new lib

is that possible to adapte this lib that will make the capability of font loading in style xml possible?

Styles

Is there any way for me to declare a global style like:

 <style name="DefaultEditText">
        <item name="android:textSize">16sp</item>
        <item name="android:textColor">@color/menu_dark_text</item>
        <item name="android:textColorHint">@color/menu_light_text</item>
        <item name="typeface">RobotoCondensed-Light.ttf</item>
 </style>

To attach to my views like this:

<com.neopixl.pixlui.components.edittext.EditText
                        android:id="@+id/et_list_name"
                        style="@style/DefaultEditText"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="16dp"
                        android:hint="@string/new_list_hint"
                        android:inputType="textCapWords|textAutoCorrect" />

That would be an awesome feature and would really make this library a lot cleaner to use!

Add to Maven

It would be helpful to just add the dependency from Maven.

np.EditText cannot be instantiated

I am getting below error

java.lang.ClassFormatError: Code attribute in native or abstract methods in class file com/neopixl/pixlui/intern/PixlUIfaceManager$DrawCallback

text spacing

Are there any text spacing supported from the textview? Is that possible to have space between each letter?

module library wrapping

This is a really good library and I would like to ask if it is possible to use pixlui as the secondary library that wrapped inside from another library. I have an ui module I would like to produce and it will be using xml attribute declaration as example:

<xxx.my.component 
android:layout_width="100dp"
android:layout_height="100dp">

</xxx.my.component>

is this possible to declare this in my custom module that takes my attribute element names into pixlui xml declaration elements directly?

<xxx.my.component 
        app:iconColor="#FFFFFF"
        app:materialTabsPrimaryColor="YOUR_PRIMARY_COLOR"
        app:accentColor="YOUR_ACCENT_COLOR"

app:typeface="@string/font1"     //given that typeface is declared from pixlui

android:layout_width="100dp"
android:layout_height="100dp">

</xxx.my.component>

my question is, what does it need to be done in order to achieve this.

RadioButton

Thought about supporting RadioButton aswell? :)

Text all caps

Could you please describe in documentation how to make all caps?

Overlapped smileys in EditText

Using Paint.LINEAR_TEXT_FLAG flag in EditText implementation causes smileys overlapping when inserted
schermata da 2014-05-17 22 10 31

Even in TextView obviously.

Ellipsizing

Hi, I'm using your TextViews mostly for the ease of applying custom fonts - they work great :)

However, I've got a small problem now: how can I properly ellipsize my text? I put a long string into a TextView, e.g. "Twig 0000000000000000000000000000" and whatever I've tried, I'd always get "Twig..." - regardless of the type of ellipsizing I specified in the XML code.
Is that the intended behaviour or am I missing something? Maybe I should be using the EllipsizingTextView class?

Just in case, here's my code for the TextView:

<com.neopixl.pixlui.components.textview.TextView
        android:id="@+id/listview_item_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginRight="10dp"
        android:layout_marginTop="20dp"
        android:layout_toRightOf="@+id/listview_item_thumbnail"
        android:maxLines="1"
        android:textAllCaps="true"
        android:textColor="@android:color/black"
        android:textSize="30sp"
        pixlui:typeface="DIN Condensed Bold.otf" />

Memory Leak: Activity Leak on PixlUIfaceManager.INSTANCE

PixlUIfaceManager.INSTANCE holds reference of the first activity using the widgets, and causing memory leak. (Activity is not released properly)

There are 2 options to address this issue:

  • Call PixlUIfaceManager.getInstance(applicationContext) in Application class, or
  • modify the class to reference to application context.

Which one would you prefer?

Version your releases?

Is it possible for you to version your releases? I use version #'s in commit messages for my code, as well as for when I update the app description on the Play store, and it would be easier to mark down "updated pixelUI to 1.3.1" instead of "updated pixelUI to git commit 1a20sa3"

:)

Thanks!

Using string resource as typeface

Is it possible to use a string resource as the typeface?

For example instead of this:

pixlui:typeface="GillSansStd BoldCondensed.otf"

I'd prefer to do this:

pixlui:typeface="@string/font1"

and somewhere else in my XML value resource files:

<string name="font1">GillSansStd BoldCondensed.otf</string>

Currently it seems that if I try to do this, the typeface doesn't get set at all - I get the following message: Could not get typeface: native typeface cannot be made with name: @string/font1.

Is there any chance of me achieving the effect I need?

line spacing

I have tested on the line spacing on the component with

android:lineSpacingMultiplier="0.5" 

but it doesnt work.

Justified Text Style

Hello guys, I'm using PixIUI because it allows me to use different fonts in my app. Do you guys have any plan to add text justification to your custom textview? I'm in need of justified texts but so for I found libraries that require me to use their custom textView but with that I lose the custom font option.

jitpack issue

jitpack is not working on 1.0.5. Can you fix that?

font size

how do we set the font to be 9px? does it render out as 9px in dp?

Project unavailable on jitpack.io

Hello,

It seems that your library is not working on jetpack.io so the only way to use it is to add the .jar to a project but this way it is impossible to define a style with custom font. Could you add it to jetpack please ?

Text become ...

Hi !

I'm a big fan of the typeface attribute. Make me win a lot of time.

On a specific TextView I've some kind of side effect.

Printed text is "..." while text attribute is set to a word (in this case, "Category")

See XML :

<com.neopixl.pixlui.components.textview.TextView
                        android:id="@+id/categorie"

                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"

                        android:paddingBottom="3dp"
                        android:paddingTop="3dp"
                        android:paddingLeft="25dp"

                        android:background="@color/grey_dark"

                        android:text="Category"
                        android:textStyle="bold"
                        android:textColor="@color/white"


                        pixlui:typeface="archivoblackregular.ttf"
                        android:textAllCaps="true"
                        />

When typeface is removed, the bug doesn't appear. It might be due to onMeasure not being properly implemented.

What do you think about that ?

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.