D
D
Danil Ochagov2018-09-23 09:36:55
Java
Danil Ochagov, 2018-09-23 09:36:55

Shadow appears between Button and ImageButton?

(activity_main.xml):

<Button
                style="@style/ButtonsNumber_light"
                android:onClick="onDelAll"
                android:textSize="30sp"
                android:text="@string/b_del_all" />
            <ImageButton
                android:src="@drawable/b_remove_one"
                android:scaleType="fitCenter"
                android:padding="20dp"
                style="@style/ButtonsNumber_light"
                android:onClick="onDel" />
            <Button
                style="@style/ButtonsNumber_light"
                android:onClick="onAddOperator"
                android:text="@string/b_divide" />

file(styles.xml):
<style name="ButtonsNumber_light">
    <item name="android:background">@drawable/button_light</item>
    <item name="android:textColor">@color/colorWhite</item>
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">match_parent</item>
    <item name="android:layout_weight">1</item>
    <item name="android:textSize">32sp</item>
    <item name="android:fontFamily" 
    tools:ignore="NewApi">@font/lato_regular</item>
</style>

file(button_light.xml):
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:state_pressed="true" >
    <color android:color="@color/colorGrayLight_pressed" />
</item>
<item android:state_pressed="false" >
    <color android:color="@color/colorGrayLight_not_pressed" />
</item>

</selector>

After that, I get such a layout
5ba7346832a6f916694180.png
. What kind of shadow, stroke because of the ImageButton appears there?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question