Fix spaces

This commit is contained in:
Gabriel Calero 2018-05-16 15:12:42 -03:00
parent 5afc9c6df3
commit fe5da24483
4 changed files with 6 additions and 6 deletions

View file

@ -251,7 +251,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
*/ */
private void updateProfilePicture(String username) { private void updateProfilePicture(String username) {
mProfilePicture.setImageResource(PROFILE_PICTURE_PLACEHOLDER); mProfilePicture.setImageResource(PROFILE_PICTURE_PLACEHOLDER);
new DownloadProfileImageTask(url -> { if (url!=null && !url.isEmpty()) { new DownloadProfileImageTask(url -> { if (url != null && !url.isEmpty()) {
Picasso.get().load(url).into(mProfilePicture, new RoundProfilePictureCallback()); Picasso.get().load(url).into(mProfilePicture, new RoundProfilePictureCallback());
} } ).execute(username); } } ).execute(username);
} }

View file

@ -72,11 +72,11 @@ public class LoginFragment extends Fragment {
public void afterTextChanged(Editable editable) { public void afterTextChanged(Editable editable) {
if (!ignoreNextChange) { if (!ignoreNextChange) {
ignoreNextChange = true; ignoreNextChange = true;
boolean spaceFound=false; boolean spaceFound = false;
for (int i=0; i< editable.length(); i++) { for (int i = 0; i < editable.length(); i++) {
if (editable.charAt(i) == ' ') { if (editable.charAt(i) == ' ') {
spaceFound=true; spaceFound=true;
editable.delete(i, i+1); editable.delete(i, i + 1);
i--; i--;
} }
} }