diff --git a/app/src/main/java/com/nauk/moodl/Activities/CurrencySelectionActivity.java b/app/src/main/java/com/nauk/moodl/Activities/CurrencySelectionActivity.java index da96324..a302e41 100644 --- a/app/src/main/java/com/nauk/moodl/Activities/CurrencySelectionActivity.java +++ b/app/src/main/java/com/nauk/moodl/Activities/CurrencySelectionActivity.java @@ -72,7 +72,7 @@ public class CurrencySelectionActivity extends AppCompatActivity implements Sear ArrayList currencyArrayList = new ArrayList<>(); - for(int i = 0; i < currencyNames.size(); i++) + for(int i = currencyNames.size() - 1; i > 0; i--) { currencyArrayList.add(new Currency(currencyNames.get(i), currencySymbols.get(i))); } diff --git a/app/src/main/java/com/nauk/moodl/LayoutManagers/CurrencyListAdapter.java b/app/src/main/java/com/nauk/moodl/LayoutManagers/CurrencyListAdapter.java index 1ba7287..c37a411 100644 --- a/app/src/main/java/com/nauk/moodl/LayoutManagers/CurrencyListAdapter.java +++ b/app/src/main/java/com/nauk/moodl/LayoutManagers/CurrencyListAdapter.java @@ -79,16 +79,14 @@ public class CurrencyListAdapter extends ArrayAdapter { suggestions.clear(); int i = 0; - int found = 0; String temp = constraint.toString().toLowerCase(); - while(i < tempCurrency.size() && found < 50) + while(i < tempCurrency.size()) { Currency currency = tempCurrency.get(i); if (currency.getName().toLowerCase().startsWith(temp) || currency.getSymbol().toLowerCase().startsWith(temp)) { suggestions.add(currency); - found++; } i++; }