Skip to content

Conversation

@cdhiraj40
Copy link
Contributor

@cdhiraj40 cdhiraj40 commented Dec 15, 2021

fixes #875

files to be changed:

  • activity_signin.xml
  • activity_signup.xml
  • fragment_car_selection_attributes.xml
  • fragment_car_selection_hsn_tsn.xml
new changes
sign_in sign_up
hsn-tsn attributes

style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_height="wrap_content"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the layout_height is changed to wrap_content because the layout needs to be big enough, to show the error.
more information: https://stackoverflow.com/a/44831214
see the below comments on this answer :)

// check for valid password
if (password == null || password.isEmpty() || password.equals("")) {
this.passwordEditText.setError(getString(R.string.error_field_required), errorPassword);
if (password == null || password.isEmpty()) {
Copy link
Contributor Author

@cdhiraj40 cdhiraj40 Dec 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

password.equals("") was removed cause password.isEmpty() was already checking the same here.
the same reason for below removal of username.equals("")

app:layout_constraintTop_toBottomOf="@+id/textView6"
app:layout_constraintWidth_max="500dp">
app:layout_constraintWidth_max="500dp"
app:endIconMode="custom">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to them which doesn't have any end icon so after making their height wrap_content, they all still have a similar height. As the height changes to wrap_content after an error is shown, via this they all have same height even before error shows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant