skip to Main Content

Android Studio – Create Linear Layout programmability on button click in android studio

I am working on android studio. I have created a linear layout inside a fragment like below : <LinearLayout android:id="@+id/ll_out" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/background_round" android:orientation="vertical" android:padding="5sp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="10sp" android:orientation="horizontal"> <AutoCompleteTextView android:id="@+id/tv_product" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:gravity="left" android:inputType="text" android:hint = "Enter…

VIEW QUESTION

Android Studio – 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"…

VIEW QUESTION
Back To Top
Search