I want to contact get'er in the nested model.
I will explain, in my fragment there is:
List<Control> controlList = new ArrayList<>();
And already in the Control model is:
private List<ImageUpload> imageUploads = new ArrayList<>(); And therefore in ImageUpload I have a parameter
private String url; public String getUrl() { return url; } I try to get the url in the fragment as follows:
controlList.get(position).getImageUploads().getUrl(); but getUrl is highlighted in red ... (although in theory it should not. Please tell me how to fix the error.
Model ImageUploads
@SerializedName("success") @Expose private Boolean success; @SerializedName("output_metadata") @Expose private OutputMetadata outputMetadata; @SerializedName("handler") @Expose private Integer handler; @SerializedName("id") @Expose private String id; private List<VideoUpload> videoUploads = new ArrayList<>(); @SerializedName("url") @Expose private String url;
imageUploads) in thecontrolListcollection, there are several elements (links) - which one do you need (or all)? - pavlofff