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

Show background as key pressed #58

Open
amirj700 opened this issue Oct 31, 2018 · 2 comments
Open

Show background as key pressed #58

amirj700 opened this issue Oct 31, 2018 · 2 comments

Comments

@amirj700
Copy link

Hi, how can I show a circle background for only the pressed key (as shown in Readme second picture)? I used the keypadButtonBackgroundDrawable attribute but it shows constant background for all buttons.

@RkNaing
Copy link

RkNaing commented Jun 18, 2019

Hi, how can I show a circle background for only the pressed key (as shown in Readme second picture)? I used the keypadButtonBackgroundDrawable attribute but it shows constant background for all buttons.

Use Selector Drawable like this..... as keypadButtonBackgroundDrawable

<item android:state_pressed="true">
    <shape android:shape="oval">
        <solid android:color="#9925A9F7"/>
    </shape>
</item>

<item android:drawable="@android:color/transparent"/>

@amirj700
Copy link
Author

amirj700 commented Jul 3, 2019

Hi, how can I show a circle background for only the pressed key (as shown in Readme second picture)? I used the keypadButtonBackgroundDrawable attribute but it shows constant background for all buttons.

Use Selector Drawable like this..... as keypadButtonBackgroundDrawable

<item android:state_pressed="true">
    <shape android:shape="oval">
        <solid android:color="#9925A9F7"/>
    </shape>
</item>

<item android:drawable="@android:color/transparent"/>

thanks, it was helpful

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

No branches or pull requests

2 participants