Search code examples
androidscrollviewexpandable

Android ExpandableListView with button


i want to use expandablelist with scroolview

how can i do this (one screen 2 action )

top --> horizontal scrollview (some image left to right) down --> expandableListView (top to down)

|

screen


horizontal scrollview (some image)


expandableListView (some group, child)


thank you.


Solution

  • Instead of expandablelist with scrollview use spinner.

           Spinner sp1=(Spinner)findViewById(R.id.spinner1);
              Dbhelper db=new Dbhelper(this);
               Cursor c1=db.rawQuery("select accNo from Account4 where bankName='"+str+"'",null);
               acc=new String[c1.getCount()];
               while(c1.moveToNext()){
               acc[i]=c1.getString(c1.getColumnIndex("accNo"));
               i++;
              }
    
       ArrayAdapter<String> adp=new  ArrayAdapter<String>(this,android.R.layout.simple_spinner_dropdown_item,acc);
    
           sp1.setAdapter(adp);
    
           c1.close();