你要是继承了BaseAdapter这样的,必须要调用父类的构造函数。

解决方案 »

  1.   

     GalleryAdapter extends BaseAdapter

    public GalleryAdapter(Context ct, String[] texts,float rh){}
    public GalleryAdapter(Context ct, Bitmap[] bitmaps,float rh){}
    }继承它后,不能改变构造函数吗?
      

  2.   

    public GalleryAdapter(Context ct, String[] texts,float rh){}
    public GalleryAdapter(Context ct, Bitmap[] bitmaps,float rh){}这2个函数里面 要调用父类的构造函数才行。
      

  3.   

    里面是默认是super();  但是这个可以省略的,因为BaseAdapter是没有参数的构造函数
    http://blog.csdn.net/ningbowxj3/article/details/1418939
    应该不是这个问题
      

  4.   

    String[] catalogListNames=catalogList.getListNames(CFile.sProductFile);
    ad_parent= new GalleryAdapter(this,catalogListNames,0.5);
    gr_parent.setAdapter(ad_parent);
    Bitmap[] itemListBitmaps=citemList.getListBitmaps(CFile.sProductFile);
    ad_child= new GalleryAdapter(this,itemListBitmaps,1);上面代码,提示下面错误:
    错误: 对于GalleryAdapter(DesignActivity,String[],double), 找不到合适的构造器
    构造器 GalleryAdapter.GalleryAdapter(Context,Bitmap[],float)不适用
    (无法通过方法调用转换将实际参数String[]转换为Bitmap[])
    构造器 GalleryAdapter.GalleryAdapter(Context,String[],float)不适用
    (无法通过方法调用转换将实际参数double转换为float)