I have a fragment, and inside that I inflate another layout file. This means there are multiple buttons on the page with the same ID:
<Button android:layout_height="30dp"
android:layout_width="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="8dp"
android:text="Delete"
android:id="@+id/delete_seed" tools:layout_editor_absoluteX="0dp"
android:textSize="10sp" android:paddingTop="5dp"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:paddingBottom="5dp"
android:padding="5dp"/>
So when I call:
Button deletebutton = rootView.findViewById(R.id.delete_seed);
deletebutton.setVisibility(View.GONE);
It only removes the first one. How can I target all the buttons?