android-holo-colors icon indicating copy to clipboard operation
android-holo-colors copied to clipboard

Add Borderless Button

Open blundell opened this issue 11 years ago • 1 comments

Would like borderless buttons to be added.

At the moment I use

<Button
style="?android:attr/buttonBarButtonStyle"
... />

Which gives the default holo blue highlight

https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/styles.xml

<style name="Widget.Holo.Light.Button.Borderless">
        <item name="android:background">?android:attr/selectableItemBackground</item>
        <item name="android:paddingStart">4dip</item>
        <item name="android:paddingEnd">4dip</item>
</style>

blundell avatar Dec 18 '13 15:12 blundell

What we need is new item in generated theme:

<item name="android:selectableItemBackground">@drawable/yellowtheme_selectable_background</item>

with content re-using already generated graphics:

<selector xmlns:android="http://schemas.android.com/apk/res/android"
       android:exitFadeDuration="@android:integer/config_shortAnimTime" >
    <item android:state_pressed="false" android:state_focused="true" android:drawable="@drawable/yellowtheme_list_focused_holo" />
    <item android:state_pressed="true" android:drawable="@drawable/yellowtheme_list_pressed_holo_light" />
    <item android:drawable="@android:color/transparent" />
</selector>

(example for API11+ and theme called "yellowtheme")

tomekziel avatar Feb 17 '14 08:02 tomekziel