Skip to content

Commit

Permalink
Fix: Delete deprecated receiveCommand (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
arushikesarwani94 authored May 23, 2024
1 parent e87f3d2 commit 4ae337c
Showing 1 changed file with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,23 +217,6 @@ protected void addEventEmitters(
picker.setOnFocusListener(eventEmitter);
}

@Override
public void receiveCommand(@NonNull ReactPicker root, int commandId, @androidx.annotation.Nullable ReadableArray args) {
switch (commandId) {
case FOCUS_PICKER:
root.performClick();
break;
case BLUR_PICKER:
root.clearFocus();
break;
case SET_NATIVE_SELECTED:
Assertions.assertNotNull(args);
assert args != null;
setNativeSelected(root, args.getInt(0));
break;
}
}

@Override
public void receiveCommand(@NonNull ReactPicker root, String commandId, @androidx.annotation.Nullable ReadableArray args) {
Assertions.assertNotNull(root);
Expand Down Expand Up @@ -355,7 +338,7 @@ private View getView(int position, View convertView, ViewGroup parent, boolean i
convertView.setEnabled(enabled);
// Seems counter intuitive, but this makes the specific item not clickable when enable={false}
convertView.setClickable(!enabled);

final TextView textView = (TextView) convertView;
textView.setText(item.getString("label"));
textView.setMaxLines(mNumberOfLines);
Expand All @@ -366,7 +349,7 @@ private View getView(int position, View convertView, ViewGroup parent, boolean i
} else {
convertView.setBackgroundColor(Color.TRANSPARENT);
}

if (style.hasKey("color") && !style.isNull("color")) {
textView.setTextColor(style.getInt("color"));
}
Expand Down

0 comments on commit 4ae337c

Please sign in to comment.