Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ripple effect to all buttons #484

Merged
merged 2 commits into from Mar 15, 2016
Merged

Add ripple effect to all buttons #484

merged 2 commits into from Mar 15, 2016

Conversation

sarahsnow1
Copy link
Member

Closes #459 #327

@@ -1,12 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use <ripple> instead of <layer-list> this appears to produce the desired effect for all the buttons and as an added bonus the tests no longer crash. For example:

<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:colorControlHighlight">
    <item>
        <shape xmlns:android="http://schemas.android.com/apk/res/android"
            android:shape="rectangle">

            <solid
                android:color="@color/color_primary" />

            <stroke
                android:width="1dp"
                android:color="@color/gray" />
        </shape>
    </item>
</ripple>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right- looks like it does fix the tests! I had erroneously stayed away from ripple because i saw it introduced a requirement of minSdkVersion 21 however placing these in the qualified drawable folder doesn't require we bump the minSdkVersion.

ecgreb added a commit that referenced this pull request Mar 15, 2016
Add ripple effect to all buttons
@ecgreb ecgreb merged commit 2d86316 into master Mar 15, 2016
@ecgreb ecgreb deleted the 459-press-states branch March 15, 2016 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants