use of com.amaze.filemanager.utils.MapEntry in project AmazeFileManager by TeamAmaze.
the class SearchTextTask method onPostExecute.
@Override
protected void onPostExecute(final ArrayList<MapEntry> mapEntries) {
super.onPostExecute(mapEntries);
for (Map.Entry mapEntry : mapEntries) {
Map.Entry keyMapEntry = (Map.Entry) mapEntry.getKey();
if (textEditorActivity.getAppTheme().equals(AppTheme.LIGHT)) {
mInput.getText().setSpan(new BackgroundColorSpan(Color.YELLOW), (Integer) keyMapEntry.getKey(), (Integer) keyMapEntry.getValue(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
} else {
mInput.getText().setSpan(new BackgroundColorSpan(Color.LTGRAY), (Integer) keyMapEntry.getKey(), (Integer) keyMapEntry.getValue(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
}
}
if (mapEntries.size() != 0) {
upButton.setEnabled(true);
downButton.setEnabled(true);
// downButton
textEditorActivity.onClick(downButton);
} else {
upButton.setEnabled(false);
downButton.setEnabled(false);
}
}
Aggregations