I want to replicate these layout , listview with a slide view injected after 50 item in the listview

One idea I can think of is to maintain 2 arrays (lets call one of them Main and other Extra). Our Main array is single dimensional with the data to be shown in the list view. The Extra array is a 2D array with the first row containing data for the 50th item in the list view, the second row containing data for the 100th item in the list view, so on and so forth.
We can then inject dummy objects at 50th, 100th, 150th ... positions in Main array. In your adapter's getView() you can then check if the position is a multiple of 50 and get the corresponding data from Extra array and supply to the slide view.
thanks for your help ,especially with the 2d array idea -- but the view is a slider container cardview(or just image view as seen on the twitter app ) so the user can scroll it ?? any idea how to go about doing that i currently load them on start so on on getitemtype view
array of viewTypes[int] == ....
getItemType(){
if post == 50
return viewType [3]
ViewHolder sliderView( view w ){
imageView1 , imageView2 ,imageView12
public sliderView ( ) {
// set id here
}
}
on createView Holder( ....,int p ){
inflate R.layout .HorizontalSlider
.......
return v
}
onBindView(){
ads = getAdsArray() // get array of image urls
// insert url into image view maybe with glide
imageview1.setImage(uri) // generic
imageview2.setImage(uri) // generic
imageview2.setImage(uri) // generic
probably with layout like these
linearLayout horizonat>
imageview+id imageview1
imageview+id imageview2
imageview+id imageview3
but clearly tons of issue with the logic , but cant find better a working implementation ,any help would be appreciated
Madiba Razak
Solving problems since 2015
thank @sidhantpanda found out what i was looking basically it a horizontall recyclerview inside a vertical recycler view