You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've done this programatically by creating a new android.widget.Button() and found no issues.
If this is possible without collision in other areas it would give the buttons their material design ripple effect, whereas setBackground removes the ripple effect. Will this open other issues. I didn't want to make a PR without knowing if there would be other issues or conflicts.
Hi @enchev i'm sorry, how do i implement that code you showed. I have this issue where the button background-color is used as a tint, or has transparency... i want to remove that.
i pasted that snippet in my app.js and it fails to compile saying "v" is not defined... i missed a require somewhere.
Should I be referencing a different "view" when calling getBackground()? I have tried a couple different things but none of them are working out.
It seems if I set the border-width of the button with ID "create-btn" then that fixes the issue in Android 4.4 but then I lose the material design in all other versions.
Activity
x4080 commentedon Dec 28, 2015
Good idea
vakrilov commentedon Jan 4, 2016
Nice one @bradmartin - it is good to be able to change the color of the button without loosing the material design.
enchev commentedon Jan 11, 2016
We can use simply:
if only backgroundColor is set. In this way we can preserve other styles.
talvasconcelos commentedon Jul 13, 2016
Hi @enchev i'm sorry, how do i implement that code you showed. I have this issue where the button background-color is used as a tint, or has transparency... i want to remove that.
i pasted that snippet in my app.js and it fails to compile saying "v" is not defined... i missed a require somewhere.
spstratis commentedon Sep 19, 2016
@enchev I have the same question as @talvasconcelos, what is the "v" object referencing here?
bradmartin commentedon Sep 19, 2016
Think it's the view instance so the button. Not at computer to check the NativeScript view api but i think that's it
spstratis commentedon Sep 19, 2016
@bradmartin Got it, that would make sense.
spstratis commentedon Oct 6, 2016
In one of my views where I'm experiencing this problem I've tried the following:
Yet when I load that view I get the following error:
Should I be referencing a different "view" when calling getBackground()? I have tried a couple different things but none of them are working out.
It seems if I set the border-width of the button with ID "create-btn" then that fixes the issue in Android 4.4 but then I lose the material design in all other versions.
calebeaires commentedon Nov 10, 2016
@enchev - Is this issue still on NativeScript team radar?
enchev commentedon Nov 10, 2016
Hey @calebeaires,
This was fixed long time ago. Right now if you only want to set the color we will not override the default drawable.
calebeaires commentedon Nov 10, 2016
@enchev - Thanks for your help.
May you just me give some more info? If I choose to use
border-width, I will loose ripple effect on Android 4.2 to Android 4.4?bradmartin commentedon Nov 10, 2016
Those android API versions don't have material/ripple :)
On Thu, Nov 10, 2016, 7:32 AM Calebe Aires notifications@github.com wrote:
enchev commentedon Nov 10, 2016
Yep, @bradmartin is correct. You can only set the color if you want to keep the original drawable.
lock commentedon Aug 29, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.