0

Yesterday I attain one interview where he asked one question :

if in a layout one banner is there and bottom of this banner ListView is there. without using scroll view how you will scroll the screen.

Edited:

Suppose In the xml file Linear layoutis there. Then add banner into the linear layout(in ImageView), then ListView is there. Now scroll the screen. How it will scroll?

Vinit ...
  • 1,409
  • 10
  • 37
  • 66

1 Answers1

0

I think you can do the same with the help of the getView() method of Custom adapter. like the below:

 public View getView(int position, View convertView, ViewGroup parent){
    View view= convertView;
     if(view==null){
       if(position==0){ 
           view=inflater.inflate(R.layout.imageViewLayout, null);
       }else{
           view=inflater.inflate(R.layout.otherLayoutForListItem, null);
       }
     }else{

     }
}

I think this can help you but if you don't want to include in this way than u have to handle some other scroll option of the list View