GithubHelp home page GithubHelp logo

hitgif / textfieldboxes Goto Github PK

View Code? Open in Web Editor NEW
773.0 27.0 114.0 2.01 MB

Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.

License: Apache License 2.0

Java 100.00%
android library java edittext material material-design component-library icon-signifier label-text dark-theme

textfieldboxes's Issues

Icon's color

  • How to set the icon's color?
  • Is there a way to set the icon's color as the primaryColor?

FATAL EXCEPTION api level 15 UnsupportedOperationException

FATAL EXCEPTION: main
java.lang.UnsupportedOperationException
at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:424)
at studio.carbonylgroup.textfieldboxes.ClipToBoundsView.onDraw(ClipToBoundsView.java:55)
at android.view.View.draw(View.java:11038)

Unable to import library

How can anyone help me?
@HITGIF

compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.+'

compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "***"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35
is also present at [com.android.support:appcompat-v7:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override.

Error:(252, 5) error: duplicate value for resource 'attr/helperTextColor' with config ''.

C:\Users\qwe.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\7cf6837638c36c9f6ecfbeb693286dca\res\values\values.xml
Error:(252, 5) error: duplicate value for resource 'attr/helperTextColor' with config ''.
Error:(252, 5) error: resource previously defined here.

AGPBI: {"kind":"error","text":"error: duplicate value for resource \u0027attr/helperTextColor\u0027 with config \u0027\u0027.","sources":[{"file":"C:\Users\qwe\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\7cf6837638c36c9f6ecfbeb693286dca\res\values\values.xml","position":{"startLine":251,"startColumn":4,"startOffset":27028,"endColumn":68,"endOffset":27092}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource previously defined here.","sources":[{"file":"C:\Users\qwe\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\7cf6837638c36c9f6ecfbeb693286dca\res\values\values.xml","position":{"startLine":251,"startColumn":4,"startOffset":27028,"endColumn":68,"endOffset":27092}}],"original":"","tool":"AAPT"}

Will not compile after including the library

After including the library in Android Studio 2.3, targeting SDK 25 by:

allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.HITGIF:TextFieldBoxes:1.3.8'
}

I got the following error:

Error:(754) Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

which references a string resource:

%s%s%s%s

I THINK the correct way to do this, is either to set formated=false for this string, or specify in the way: %1$s%2$s%3$s%4$s.

java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout

I got this errors from Android 4.x to Android 5.0.2.
I can't represent, but I would like to report this crash issue.

Fatal Exception: java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout
at android.widget.RelativeLayout$DependencyGraph.getSortedViews(RelativeLayout.java:1531)
at android.widget.RelativeLayout.sortChildren(RelativeLayout.java:343)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:363)
at android.view.View.measure(View.java:16482)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:437)
at android.view.View.measure(View.java:16482)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:437)
at android.view.View.measure(View.java:16482)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:437)
at android.view.View.measure(View.java:16482)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:681)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure(View.java:16482)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at studio.carbonylgroup.textfieldboxes.TextFieldBoxes.onMeasure(TextFieldBoxes.java:230)
at android.view.View.measure(View.java:16482)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:720)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:592)
at android.view.View.measure(View.java:16482)
at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1815)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.widget.ScrollView.onMeasure(ScrollView.java:460)
at android.view.View.measure(View.java:16482)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:16482)
at com.afollestad.materialdialogs.internal.MDRootLayout.onMeasure(MDRootLayout.java:295)
at android.view.View.measure(View.java:16482)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:16482)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1435)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:720)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:592)
at android.view.View.measure(View.java:16482)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5055)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2560)
at android.view.View.measure(View.java:16482)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2195)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1340)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1551)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1237)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5162)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:561)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(NativeStart.java)

Thank you,

Reducing height

Hi, while i'm at it.

Been looking at reducing the height of the box, it is quite large on smaller screens, but i have been unsuccessful.

Is there any way to reduce padding, height etc?

Cursor is not visible

Hi, this is the setup I have and the cursor is not visible.

<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
                            android:id="@+id/tfb_user_id"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            app:labelText="@string/hint_user_id">

                            <studio.carbonylgroup.textfieldboxes.ExtendedEditText
                                android:id="@+id/et_user_id"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:inputType="text"/>

                        </studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

Compact?

Any thoughts on supporting the compact Text Fields? How difficult would it be? I think support for these is coming in the design library but it seems to be moving very slowly.

Thanks

Remove <application> from AndroidManifest.xml

Since TextFieldBoxes is a library, it should not have an element in the AndroidManifest.xml file. This actually causes it to interfere with attributes in a real application's AndroidManifest.xml file.

Thanks!

Move label up after calling setText()

After calling ExtendedEditText#setText(String s) TextFieldBoxes displays only its label, the text is not visible. I expect the following behavior: after setting a text the label moves to the top of TextFieldBoxes view and the text is shown in EditText.

Incompatibility with AAPT2 ( Failed to execute aapt )

I just followed the installation guide and I got it ...

This is my output:

C:\Users\fabio.filho.gradle\caches\transforms-1\files-1.1\design-27.0.1.aar\2609d08221b55d3c670f82da34939204\res\values-v26\values-v26.xml
Error:(3, 5) error: style attribute 'android:attr/keyboardNavigationCluster' not found.
C:\Users\fabio.filho.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.1.aar\0a0cdf826e5f18c37293193437afa365\res\values-v26\values-v26.xml
Error:(9, 5) error: resource android:attr/colorError not found.
Error:(13, 5) error: resource android:attr/colorError not found.
Error:(17, 5) error: style attribute 'android:attr/keyboardNavigationCluster' not found.
C:\Users\fabio.filho.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.1.aar\0a0cdf826e5f18c37293193437afa365\res\values\values.xml
Error:(252, 5) error: resource android:attr/keyboardNavigationCluster not found.
Error:(252, 5) error: resource android:attr/fontStyle not found.
Error:(252, 5) error: resource android:attr/font not found.
Error:(252, 5) error: resource android:attr/fontWeight not found.
C:\Users\fabio.filho\Documents\Docs\Repositories\MyProject\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-v26.xml
Error:(7) resource android:attr/colorError not found.
Error:(11) resource android:attr/colorError not found.
Error:(15) style attribute 'android:attr/keyboardNavigationCluster' not found.
Error:(18) style attribute 'android:attr/keyboardNavigationCluster' not found.
C:\Users\fabio.filho\Documents\Docs\Repositories\MyProject\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(359) resource android:attr/keyboardNavigationCluster not found.
Error:(602) resource android:attr/fontStyle not found.
Error:(602) resource android:attr/font not found.
Error:(602) resource android:attr/fontWeight not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:org.gradle.tooling.BuildException: Failed to execute aapt
Error:com.android.ide.common.process.ProcessException: Failed to execute aapt
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Suggestion: Dropdown icon and callback

If you're taking suggestions, I'd love it if there was an option to display a dropdown icon and the ability to set a callback for when it is clicked. I think the callback should include a reference to the TextFieldBox. I do not think it's necessary for the TextFieldBox to do more than this and the developer can handle what happens when it's clicked. For example, I would probably use a ListPopupWindow to display and select options.

Issues with layout

<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
    android:id="@+id/text_field_boxes"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/image_logo"
    android:layout_marginEnd="@dimen/activity_horizontal_margin"
    android:layout_marginStart="@dimen/activity_horizontal_margin"
    app:errorColor="@color/nc_white_color_complete"
    app:helperText=" "
    app:labelText="@string/nc_server_url"
    app:panelBackgroundColor="@color/colorPrimary"
    app:primaryColor="@color/nc_white_color_complete">

    <studio.carbonylgroup.textfieldboxes.ExtendedEditText
        android:id="@+id/extended_edit_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:imeOptions="actionDone"
        android:inputType="textUri"
        android:minWidth="5dp"
        android:singleLine="true"
        android:textColor="@color/nc_white_color_complete"/>

</studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

screen shot 2018-01-25 at 15 29 36
screen shot 2018-01-25 at 15 30 02

One is Android 6. One is Android 7. Notice how on 6 the TextFieldBoxes takes entire height despite being set to wrap_content :-/

Password Visibility Toggle

Hi, from what I understand, your TextFieldBoxes is replacing TextInputLayout. If that's the case, are you planning to add support for password visibility toggle? I know we can achieve the same thing using endIcon, I was just curious if you are planning to add a support so we can show and hide password easily.

Wrap_content height issue

Hello, thanks for your lib, looks really nice :)

But i found some problem
android:layout_height="wrap_content" make view's height matching to parent height.
Expected behavior: height corresponds to the height of the EditText's lines

Adding a TextWatcher on ExtendedEditText causes infinite Loop crash with setError

I attached a textWatcher onto the ExtendedEditText, and whenever the text is empty, it calls setError()

but calling setError causes the TextWatcher to be triggered and since the text is empty ic calls setError()

but that triggers the TextWatcher again and since its still empty it calls setError()

but the TextWatcher is triggered again. I cannot have a reactive layout like that, is this intentional?

Cursor in editext is missing

Cursor in editext is missing. Why?

<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:panelBackgroundColor="@color/colorWhite"
                app:labelText="Email">
                <studio.carbonylgroup.textfieldboxes.ExtendedEditText
                    android:id="@+id/email"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />
</studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

setOnClickListener is not working on TextFieldBoxes and ExtendedEditText

TextFieldBoxes.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.i("LOG","ive been clicked");
            }
        });

ExtendedEditText.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.i("LOG","ive been clicked");
            }
        });

can you help me?

android.graphics.drawable.BitmapDrawable cannot be cast to android.graphics.drawable.LayerDrawable

Hello,
I try to use this code in my xml code.

<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
    android:id="@+id/fg_save_as_file_container"

    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:labelText="@string/lbl_filename_without_ext"
    app:helperText="@string/lbl_filename_limit_desc"
    app:hasClearButton="true"
    app:minCharacters="2"
    app:maxCharacters="128"
    >

    <studio.carbonylgroup.textfieldboxes.ExtendedEditText
        android:id="@+id/fg_save_as_file_filename"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxLines="1"
        android:singleLine="true"
        android:text="" />

</studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

And I got this error.

FATAL EXCEPTION: main
Process: net.sjava.docs, PID: 8749
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.sjava.docs/net.sjava.docs.ui.activities.MainActivity}: android.view.InflateException: Binary XML file line #82: android.graphics.drawable.BitmapDrawable cannot be cast to android.graphics.drawable.LayerDrawable
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2947)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3008)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: android.view.InflateException: Binary XML file line #82: android.graphics.drawable.BitmapDrawable cannot be cast to android.graphics.drawable.LayerDrawable
Caused by: java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable cannot be cast to android.graphics.drawable.LayerDrawable
at studio.carbonylgroup.textfieldboxes.TextFieldBoxes.setPanelBackgroundColor(TextFieldBoxes.java:697)
at studio.carbonylgroup.textfieldboxes.TextFieldBoxes.onFinishInflate(TextFieldBoxes.java:285)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:879)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:873)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.inflate(LayoutInflater.java:525)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:378)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)

Change size of the Label text

Sometimes the size of the label text is too big and take two lines so when the edit text has the focus it animate to the top it still taking two lines but now there are enough space to fill it in one line

Use another text widget, for example AutoCompleteTextView

Thanks for your lib, it's really great to have it.

I would like to know how I could use it for autocomplete text views? I tried to wrap one inside a TextFieldBoxes but this fails:

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
    at studio.carbonylgroup.textfieldboxes.TextFieldBoxes.setLabelText(TextFieldBoxes.java:748)
    at studio.carbonylgroup.textfieldboxes.TextFieldBoxes.triggerSetters(TextFieldBoxes.java:718)
    at studio.carbonylgroup.textfieldboxes.TextFieldBoxes.onFinishInflate(TextFieldBoxes.java:224)

I'm guessing I can't put any widget I want there. Is there a way I could hack this in?
Thanks

Are you open for suggestions?

I'm using a very good lib for EditText with label - but it's not maintained anymore.
So I'm searching for a replacement.

Custom label margins

I want to have TextFieldBoxes with a height of 56dp but in this case inner label is cut (I guess because of big label margins). Can you give an opportunity to set custom label top and bottom margin?

Helper is misplaced when embedded in a ScrollView

The following layout has the following render:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <studio.carbonylgroup.textfieldboxes.TextFieldBoxes
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:helperText="helper"
        app:labelText="Label">

        <studio.carbonylgroup.textfieldboxes.ExtendedEditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

</LinearLayout>

screen shot 2018-02-26 at 23 46 13
which is expected, however the following layout (just replace LinearLayout with ScrollView) has the following render:

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <studio.carbonylgroup.textfieldboxes.TextFieldBoxes
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:helperText="helper"
        app:labelText="Label">

        <studio.carbonylgroup.textfieldboxes.ExtendedEditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

</ScrollView>

screen shot 2018-02-26 at 23 45 55

which is not what I expected.
Is this a bug?

nextFocusDown between editTexts not working

Why?

<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
            android:id="@+id/nick_input"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            app:iconSignifier="@drawable/ic_user_man_black"
            app:labelText="@string/login_nick_label"
            app:maxCharacters="16"
            app:primaryColor="@android:color/black">

            <studio.carbonylgroup.textfieldboxes.ExtendedEditText
                android:id="@+id/nick_edit_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:imeOptions="actionNext"
                android:inputType="text"
                android:maxLines="1"
                android:singleLine="true"
                android:nextFocusDown="@+id/password_edit_text" />

        </studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

        <studio.carbonylgroup.textfieldboxes.TextFieldBoxes
            android:id="@+id/password_input"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            app:iconSignifier="@drawable/ic_login_password"
            app:labelText="@string/login_password_label"
            app:maxCharacters="32"
            app:primaryColor="@android:color/black">

            <studio.carbonylgroup.textfieldboxes.ExtendedEditText
                android:id="@+id/password_edit_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:imeOptions="actionGo"
                android:inputType="textPassword"
                android:maxLines="1" />

        </studio.carbonylgroup.textfieldboxes.TextFieldBoxes>

Change color of Label when not in focus

Great library, thanks. One issue - the "app:labelText" has the right color when the field is tapped and the text moves up into the upper left corner. When out of focus, though, it is white and none of the settings you have seem to make any difference. Would be great if it were possible to change that color as well.

Don't create new objects in onDraw method

It's a best practice not to create new object in the critical path (onDraw is called a lot of time).

protected void onDraw(Canvas canvas) {
Path clipPath = new Path();
Float cornerRadius = context.getResources().getDimension(R.dimen.text_field_boxes_corner_radius);
clipPath.addRoundRect(new RectF(canvas.getClipBounds()), cornerRadius, cornerRadius, Path.Direction.CW);
canvas.clipPath(clipPath);
super.onDraw(canvas);
}

clipPath, cornerRadius, RectF could be initialized in onCreate method, and getClipBounds requested only when the view size changes.

How to make a label be always on top?

I have a hint in the EditText and a label in his Box view. And I want both of them (hint and label) be visible if no text inputed regardless the view focus state.
Is it possible?

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.