View Code? Open in Web Editor
NEW
A simple Material library which follows Google's guidelines. Lollipop specific effects (such as ripples) won't be ported-back to older versions of Android.
License: MIT License
simple-material-library's People
Contributors
Stargazers
simple-material-library's Issues
In onTouch()
inside addClickEffects()
, the following code is not allowing the click to happen.
touchValid = false;
if(!textViewBounds.contains((int) motionEvent.getX(), (int) motionEvent.getY())) {
touchValid = false;
}
The outer touchValid = false;
should be removed.
Current solution works but is not optimised for API 21+. On Lollipop and above, we can set elevation for any view, hence using CardView
is unnecessary.
I think Google has does it with CardView
.
This might be done by attaching an onTouchListener
to the button.
This will be cool feature to have.
There should be a way to create a small version of RaisedButton
.
Sometimes we need a small "More" button and normal raised button looks too big.
Might need to have a text size customization as well.
Need to allow text style and text colour to be changed.
Also need to darken the pressed colour for light buttons (on Lollipop+), while also test it on pre-Lollipop.
Raised Light/Light theme and Raised Dark/Dark theme as defined in the Google's Material Design are not being followed for disabled buttons.
Picking the colours' hex values and using them would be the way to go.
Allow changing text with both the resource string and String
.
On Lollipop and above, overlapping occurs if a view is placed below the RaisedButton
(with android:layout_below
in Relative Layout
).
A padding of 8dp
seems to be enough. It might have to do with max elevation of CardView
.
Add a way to set icon/drawable inside the RaisedButton
.
Following is a sample button which needs to be made possible using this RaisedButton
.