2016-07-29 17 views
0

このアダプタは呼び出されますが、内側のアダプタには、呼び出し/ない設定ビューではありません:別のアダプタからアダプタを呼び出していますか?

@Override 
     public View getView(int position, View convertView, ViewGroup parent) { 
      UserContact user = getItem(position); 


      if(convertView==null) 
       { 
       convertView = inflter.inflate(R.layout.viewtemplate,null); 
       calpha = (TextView) convertView.findViewById(R.id.alpha); 
       gridCustomView = (GridCustomView) convertView.findViewById(R.id.myGrid); 
       gridCustomView.setExpanded(true); 

       } 

//////////////////////// //////////

 calpha.setText("section head"+position); 
     gridadapter = new GridAdapter(context,user,position); 
    //This gridadapter is not calling ,not setting it's view. 
     gridCustomView.setAdapter(gridadapter); 



     return convertView; 
     } 
+0

GridAdapterのgetView /コンストラクタメソッドを表示できますか –

答えて

0

てみgetView

に使用setAdapter(gridadapter)notifyDataSetChanged()を呼び出すためにそして、あなたが使用する必要がありますViewHolderパターンをgridadapterし、すべてのビューを保持します。

関連する問題