I am having problems with the design of the application menu with XML. What I want to do is to have both ToggleButton, and Buttonat the same height, but Buttonnot displayed. It looks like there was something invisible underneath that makes him look a little taller.
I searched for information but didn’t find anything
Here is the code I wrote on main.xml:
(...)
<TextView
android:text="Option1:"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ToggleButton
android:id="@+id/toggle_option1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:width="100sp"
android:height="50sp" />
<Button
android:id="@+id/button_option1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:height="50sp"
android:text="See"
/>
</LinearLayout>
Any idea?
source
share