Hi. I am seeing different behavior when applying t...
# anko
n
Hi. I am seeing different behavior when applying the same style in XML and when applying it through anko. Any idea?
Copy code
<style name="ButtonFlat" parent="Base.Widget.AppCompat.Button.Borderless">
        <!-- Borderless contains just this:   <item name="android:background">@drawable/abc_btn_borderless_material</item>-->

        <item name="android:textSize">20sp</item>
        <item name="android:textColor">@color/colorPrimary</item>
    </style>
Copy code
<Button
                    android:id="@+id/btnPercentage"
                    style="@style/ButtonFlat"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="0dp"
                    android:drawableLeft="@drawable/ui_icon_triangle"
                    android:text="Percentage"/>
Copy code
themedButton("Take photo", R.style.ButtonFlat) {
                        onClick {

                        }
                    }.lparams(wrapContent, wrapContent) {
                        gravity = Gravity.CENTER
                    }