Here is the github link:
https://github.com/dunow0033/BudgetTracker
Here is the XML for a button for updating a budget entry:
<Button
android:id="@+id/updateBtn"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/green"
android:padding="10dp"
android:text="Update Transaction"
android:layout_margin="10dp"
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>
As you can see the updateBtn at the bottom above has visibility set to gone. I have an addTextChangedListener in a fragment with the following:
binding.labelInput.addTextChangedListener {
updateBtn.visibility = View.VISIBLE
if(it!!.isNotEmpty())
labelLayout.error = null
}
And it's not making the button visible when I click on the input box to change it. Any help is appreciated!!