M
M
Maxim Siomin2021-02-06 13:01:49
Android
Maxim Siomin, 2021-02-06 13:01:49

What's wrong with the button?

<Button
        android:id="@+id/button"
        android:layout_width="120dp"
        android:layout_height="40dp"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="@dimen/marginSize"
        android:fontFamily="@font/roboto"
        android:text="@string/ready"
        android:textColor="@color/black"
        android:textFontWeight="@android:integer/config_longAnimTime"
        app:backgroundTint="@color/green" />

The button is 120dp wide, i.e. 1/3 of the screen, but is displayed in full screen width
Kotlin is not associated with this button

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Vodakov, 2021-02-06
@WaterSmith

Everything is ok with the button. Something is wrong somewhere else.

S
Stepan, 2021-02-08
@steff

The syntax is OK. Where is it displayed in full screen width? In preview when designing in the studio or in a running application?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question