hoang8f / android-flat-button Goto Github PK
View Code? Open in Web Editor NEWFButton - a flat button library for Android
License: Apache License 2.0
FButton - a flat button library for Android
License: Apache License 2.0
I want to set a background image, so I use:
fbutton:buttonColor="@android:color/transparent"
android:background="@drawable/note_selected"
It does not work
I am using FButton in Linear Layout but it does not show push animation on click. However onclick event is performed but push animation is not shown in a fragment.
Hi, there!
Thanks for the great button library.
When I use constraint Layout and connect each buttons with the layout.
The buttons is being clicked together ( it seems only animation, not functions such as setonClickListener)
Thank you!
this will reduce potential name conflict
Hello, I couldn't figure out how to do color change on click. I am adding the button programmatically. Can you provide the code to set the color to change color when holding button?
Can you please migrate this library from Maven Central to J Center?
I am unable to set any android:padding to fbuttons, with regular buttons i use padding normally to set text apart from the button borders. Are there other tags, parameters that I need to use with fbuttons?
I'm getting this warning while trying to build the apk, any fix on how to go about this
Not working setPressed(true) method for button:
final FButton likeButton = (FButton) v.findViewById(R.id.like_post_button);
likeButton.setOnClickListener(new FButton.OnClickListener() {
@OverRide
public void onClick(View v) {
likeButton.setPressed(true);
}
});
Hello!
Thanks for the project.
This project needs to be refresh and migrate to AndroidX
2020-02-02 12:00:21.504 16953-16953/com.example.fastfood1 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.fastfood1, PID: 16953
android.view.InflateException: Binary XML file line #12: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:768)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:867)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at com.example.fastfood1.Adapter.MyBeastDealsAdapter.inflateView(MyBeastDealsAdapter.java:38)
at com.asksira.loopingviewpager.LoopingPagerAdapter.instantiateItem(LoopingPagerAdapter.java:76)
at androidx.viewpager.widget.ViewPager.addNewItem(ViewPager.java:1010)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1158)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
at androidx.viewpager.widget.ViewPager.setAdapter(ViewPager.java:540)
at com.asksira.loopingviewpager.LoopingViewPager.setAdapter(LoopingViewPager.java:214)
at com.example.fastfood1.ui.home.HomeFragment.lambda$onCreateView$1$HomeFragment(HomeFragment.java:57)
at com.example.fastfood1.ui.home.-$$Lambda$HomeFragment$08hSC5SwHI-e3mXM6hOsJKuNgEI.onChanged(Unknown Source:4)
at androidx.lifecycle.LiveData.considerNotify(LiveData.java:131)
at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:149)
at androidx.lifecycle.LiveData.setValue(LiveData.java:307)
at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
at com.example.fastfood1.ui.home.HomeViewModel.onBestDealLoadSuccess(HomeViewModel.java:123)
at com.example.fastfood1.ui.home.HomeViewModel$1.onDataChange(HomeViewModel.java:60)
at com.google.firebase.database.Query$1.onDataChange(com.google.firebase:firebase-database@@19.2.0:179)
at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@19.2.0:75)
at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@19.2.0:63)
at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@19.2.0:55)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Error inflating class info.hoang8f.widget.FButton
I'm getting this error how to resolve this
JAVA version 1.8
Android Studio 1.5
build.gradle
defaultConfig {
applicationId "com.xxxx.handlerdemo"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'info.hoang8f:fbutton:1.0.5'
}
the error message
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: info/hoang8f/widget/FButton.class
I search on google, but can't work......
How to solve it???
When I press button and move finger out of it the text goes up but the rest of the button no.
(I'm having standard shadow 5 dp)
There are two warnings that eclipse shows:
So for (2) I added
@OverRide
public boolean performClick() {
// TODO Auto-generated method stub
return super.performClick();
}
////////////////////////////////////////
For (1) I modified the method onTouch in this way:
case MotionEvent.ACTION_MOVE:
Rect r = new Rect();
view.getLocalVisibleRect(r);
if (!r.contains((int) motionEvent.getX(), (int) motionEvent.getY())) {
updateBackground(unpressedDrawable);
this.setPadding(mPaddingLeft, mPaddingTop + mShadowHeight, mPaddingRight, mPaddingBottom + mShadowHeight);
}
break;
//Changed updateBackground(pressedDrawable); to updateBackground(unpressedDrawable);
//When the touch leaves the button, the button gets up
///////////////////////////////////////
case MotionEvent.ACTION_UP:
updateBackground(unpressedDrawable);
this.setPadding(mPaddingLeft, mPaddingTop + mShadowHeight, mPaddingRight, mPaddingBottom + mShadowHeight);
Rect r1 = new Rect();
view.getLocalVisibleRect(r1);
if (r1.contains((int) motionEvent.getX(), (int) motionEvent.getY())) {
view.performClick();
return true;
}
break;
//If I raise my finger when it is out of the button, the click is not executed otherwise (r1.contains == true) is performed
//I also changed the value that the method onTouch returns to false . I put a return true after view.performClick();
///////////////////////
I really do not have great knowledge but this way seems to resolve the fact that the button and the text are not synchronized (the text got up a little before the button). If, after pressing the button, you move your finger outside, the text moves up while the button no
Then check if everything I've done is consistent :)
this is the error that android studio 3.0 show when run the project
Error inflating class info.hoang8f.widget.FButton
Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 1 to color: type=0x5
at android.content.res.TypedArray.getColor(TypedArray.java:463)
at info.hoang8f.widget.FButton.parseAttrs(FButton.java:116)
Hi,
It would be great be able to set a button in state pressed, or orthers.
Could you implement it ?
Thanks.
In attached layout I tried to have 3 buttons in one line with the same width. So I used LinearLayout with layout_weight.
The problem is when I press one of these buttons all of them moves little down.
Layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<info.hoang8f.widget.FButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="1"/>
<info.hoang8f.widget.FButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="2"/>
<info.hoang8f.widget.FButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="3"/>
</LinearLayout>
Can't be less?
I'm trying to add an image to the button, so I've added a drawablePaddingTop, but when pressed it does not move accordingly with the button. Any help?
I've tried to add the border on the button, but it doesn't work. I've followed this article http://android--code.blogspot.co.id/2015/01/amdroid-button-strokeborder-color.html, on the normal button its work. But is it possible to add some border on this flat button?
Hey there,
I have used this wonderful library before in eclipse. Now i am moving to android studio.
I have added the gradle settings and the library is imported and I could even see it in the Android Studios design.
A screenshot where you can see the xml, the design and the logcat error message
But it throws inflating exception when i run the project. Here is my layout
<info.hoang8f.widget.FButton
android:id="@+id/btnEmail"
fbutton:buttonColor="@color/emerald"
fbutton:shadowEnabled="false"
fbutton:cornerRadius="0dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/version"
android:text="Sign in @ Email"
android:textColor="@color/white"
android:textSize="18sp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:layout_marginBottom="15dp"
android:onClick="showLogin"/>
<RelativeLayout
android:id="@+id/connect_facebook_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/btnEmail"
android:layout_marginTop="10dp"
android:layout_marginBottom="15dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:background="@color/midnight_blue"
android:clickable="true"
android:onClick="connectFacebookOnClickListener">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/button_icon_margin"
android:src="@drawable/icon_facebook"
/>
<TextView
android:id="@+id/connect_facebook_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Connect With Facebook"
android:textColor="@android:color/white"
android:textSize="@dimen/button_text_size"/>
</LinearLayout>
</RelativeLayout>
<info.hoang8f.widget.FButton android:id="@+id/btnFacebook"
fbutton:buttonColor="@color/midnight_blue"
fbutton:shadowEnabled="false"
fbutton:cornerRadius="0dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/btnEmail"
android:text="Sign in With Facebook"
android:textColor="@color/white"
android:textSize="18sp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:layout_marginBottom="15dp"
android:visibility="gone"/>
<RelativeLayout android:id="@+id/rlNameHolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="false"
android:layout_centerHorizontal="true"
android:layout_marginTop="176dp"
android:background="@drawable/rounded_corner"
android:padding="20dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imgAppName"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_launcher" />
</RelativeLayout>
Any suggestions?
When press a button with shadow enabled then release outside the button, the text will go back to the unpressed position first but the button won't. The button is still look like pressed at this time.
In lines 146 and 147 is used ta that was recycled in line 137.
expected to be ta1 declared in row 144
After updating android studio form 2.3.3 to 3.0 I faced this problem
my project was working properly with FButton. when I upgrade android studio then update my project
this problem appears.
Also After modifying build gradle to 2.3.3 the same problem still existed but when I delete google repository form build script repositories and all project repositories it works properly.
I would to know what cause this problem?
Hi
I am using your component in a new app we are prototyping right now, and i noticed that all the button animations are a bit sluggish - the text goes down before, then the top of the button and only then the shadow part. The behaviour is exactly the same you have in the animated GIF in the github page (https://raw.githubusercontent.com/hoang8f/android-flat-button/master/screenshot/screenshot.gif).
However, i have installer your demo app and all the buttons work perfectly there, smooth and intuitive.
Are you using a different version in your flat button demo app or am i doing somthing wrong?
Only happens if they both have shadow enabled and are close to each other
example code:
<info.hoang8f.widget.FButton
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Hello"
fbutton:buttonColor="#8074feb4"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="8dp"
android:textColor="#FF000000"
fbutton:cornerRadius="0dp"/>
<info.hoang8f.widget.FButton
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_width="wrap_content"
android:text="World"
fbutton:buttonColor="#8074feb4"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="8dp"
android:textColor="#FF000000"
fbutton:cornerRadius="0dp"/>
fbutton:buttonColor="@color/colorPrimary"
fbutton:shadowColor="@color/colorPrimaryDark"
Color not changing. Always shows the color the first color I have set.
Hello Sir,
I have implemented this library into my project. In project level gradle file I have used classpath 'com.android.tools.build:gradle:3.0.1' but it is crashing the app. but when I used the classpath 'com.android.tools.build:gradle:2.3.3' then it works.
So I request you please try to solve this problem as soon as possible.
Thank you.
Buttons look like they have no padding on Android 2.3.7 (Samsung galaxy SII). any ideas what I'm doing wrong?
Button:
<info.hoang8f.widget.FButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:padding="20dp"
android:text="@string/signIn"
android:textColor="@color/white"
app:buttonColor="@color/fbutton_color_nephritis"
app:cornerRadius="4dp"
app:shadowEnabled="false"/>
Guys can you help me please?
Im copying the yoga tutorial https://www.youtube.com/watch?v=dxeKPU0MBU8&t=1357s but theres the
FButton error :(
When pushing down the button, it slightly shifts upward from a perspective. Expected behaviour would be the button to be anchored at the height of the shadow and shift downward as if being pushed in.
here is my build.appapply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.fastfoodv2"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
testImplementation 'junit:junit:4.13'
implementation 'androidx.test.ext:junit:1.1.2-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
//Libraries
implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.github.jd-alexander:android-flat-button:v1.1'
}
apply plugin: 'com.google.gms.google-services'
and my build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
name 'Google'
}
maven { url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven { url 'https:/jitpac.io' }
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
name 'Google'
//task clean(type: Delete) {
//delete rootProject.buildDir
// }
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
apply plugin: 'android-reporting'
i try everything and again libray dosent work
If we place two FButtons in a linearlayout using weights as mentioned below, pressing one button gets creates a minor Button-press animation on the other button as well.
<info.hoang8f.widget.FButton
android:id="@+id/no_button"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_weight="1"
android:text="@string/no"
android:textColor="@color/white"
android:textSize="30sp"
app:buttonColor="@color/button2"
android:layout_margin="10dp"/>
<info.hoang8f.widget.FButton
android:id="@+id/yes_button"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_weight="1"
android:text="@string/yes"
android:textSize="30sp"
android:textColor="@color/white"
app:buttonColor="@color/button1"
android:layout_margin="10dp"/>
</LinearLayout>
I have found that the shadow doesn't disappear when its clicked.
<com.package.FButton
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="80dip"
android:drawableLeft="@drawable/twitter"
android:drawablePadding="0dp"
android:paddingTop="-5dp"
android:text="Twitter"
android:textColor="@android:color/white"
fbutton:cornerRadius="0dp"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="16dp" />
Hi,
I added the compile line in my build.graddle
compile 'info.hoang8f:fbutton:1.0.5'
xml dependency in my root element
xmlns:fbutton="http://schemas.android.com/apk/res-auto"
but when I add following button,
<info.hoang8f.widget.FButton
fbutton:buttonColor="@color/color_concrete"
fbutton:shadowColor="@color/color_asbestos"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="5dp"
fbutton:cornerRadius="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Paste"
android:layout_weight="0.07"
android:id="@+id/randomBtn" />
it is throwing some rendering issue:
java.lang.ArrayIndexOutOfBoundsException: 5
at com.android.tools.idea.rendering.AarResourceClassGenerator.generateStyleable(AarResourceClassGenerator.java:210)
at com.android.tools.idea.rendering.AarResourceClassGenerator.generate(AarResourceClassGenerator.java:112)
at com.android.tools.idea.rendering.AarResourceClassRegistry.findClassDefinition(AarResourceClassRegistry.java:98)
at org.jetbrains.android.uipreview.ModuleClassLoader.findClass(ModuleClassLoader.java:94)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at info.hoang8f.widget.FButton.parseAttrs(FButton.java:109)
at info.hoang8f.widget.FButton.<init>(FButton.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:458)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:170)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:103)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:168)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:247)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:171)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:223)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:510)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:498)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:498)
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:610)
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:362)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:607)
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:629)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:652)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:80)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:594)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:589)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I am not getting what I am doing wrong ?
When the button is disabled and then re-enable the shadow color is removed, returning to its default with a 80% brightness.
The solution is remove the variable mShadowColor
of allocation on line 174 in FButton.java
int disabledColor = mShadowColor = Color.HSVToColor(alpha, hsv);
like this:
int disabledColor = Color.HSVToColor(alpha, hsv);
According to me analysis i think that's the best solution, because as the shadow is not displayed when the button is disabled then i do not see it necessary remove the color designated by us.
android.view.InflateException: Binary XML file line #89: Error inflating class info.hoang8f.widget.FButton
it works fine in any other android version
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.