How do I put buttons next to each other in linear layout in android studio?
Hello I am trying to put two buttons next to eachother in android studio with linearlayout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center" tools:context=".MainActivity"> <ImageView android:id="@+id/imageView" android:layout_width="222dp" android:layout_height="237dp" app:srcCompat="@drawable/ic_launcher_background" tools:layout_editor_absoluteX="246dp" tools:layout_editor_absoluteY="322dp" /> <com.google.android.material.button.MaterialButton android:id="@+id/cameraBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="@string/camera" android:layout_marginTop="8dp" app:strokeColor="@color/teal_700" app:cornerRadius="100dp" style="@style/Widget.MaterialComponents.Button.OutlinedButton"/> <com.google.android.material.button.MaterialButton android:id="@+id/galleryBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Gallery" android:layout_marginTop="8dp" app:cornerRadius="100dp" style="@style/Widget.MaterialComponents.Button.OutlinedButton" /> the output currently… Read More How do I put buttons next to each other in linear layout in android studio?