There is a part of the markup:
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/upperLayout" android:layout_above="@id/button2"> <TextView android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="2" android:text="@string/default_text"/> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> <Button android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_vertical" android:text="@string/text_like_button" tools:ignore="NestedWeights" /> </LinearLayout> </LinearLayout> It has a problem: the button, for some reason it is not centered vertically, although android: gravity = "center_vertical". 
What is the problem?