I am updating the spinner at run time. When spinner items comes the first item selects automatically. I do not want, its required only to select the item of item Selected.
I have implement the one solution below:
if (checkSelect > 1) {
if (camera_device_list_array_data != null) {
String url = camera_device_list_array_data.get(position).get(AppHelper.CAMERA_RTSP_URL);
String selected_name = camera_device_list_array_data.get(position).get(AppHelper.CAMERA_DEVICE_NAME);
GlobalConstants.selected_camera_device_id = Integer.parseInt(camera_device_list_array_data.get(position).get(AppHelper.CAMERA_DEVICE_ID));
connected_camera_name_spinner_tv.setText(selected_name);
if (mediaPlayer != null) {
relaMediaPlay();
}
// path = url;
selected_camera_tv.setText(camera_device_list_array_data.get(position).get(AppHelper.CAMERA_DEVICE_IP_ADDRESS));
playVideo();
// }
}
The problem with this is:
This is working as required but first item is not get selected, Its selected first item after selection of the second item.
Any help is appreciated.Thanks