private class Ori extends ArrayAdapter<webname> {
  private ArrayList<webname> items;
        public Ori(Context context, int textViewResourceId, ArrayList<webname> items) {
                super(context, textViewResourceId, items);
                this.items = items;
                deep++;
        } 
public View getView(int position, View convertView, ViewGroup parent) {
              
         View v= convertView;
               
               // LinearLayout linear = (LinearLayout)v.inflate(v.getContext(), R.layout.one_todo, parent);
                if (v == null) {
                 
                 
                    LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                    //linear = (LinearLayout)vi.inflate(R.layout.one_todo, null);
                   
                    v = vi.inflate(R.layout.one_todo, null);
                    v.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
                   
                   
                    ll = new LinearLayout(v.getContext());
                    //ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
                    ll.setOrientation(LinearLayout.VERTICAL);
                    
                   if(true)
                    { //
                    //여기서 view V의 길이가 넓어야지 하위 항목에서 list가 추가되더라도 길이가 짤리지 않음.
                    //textvIew의 방법은 길이를 인공적으로 늘리며  앞부분의 길이가 늘어남으로서 convertview를 파생받으면서 여유 공간이 확장됨.
                    //

                    TextView TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    }                   
                }

                webname p = items.get(position);
                if (p != null)
                {             
  ll = new LinearLayout(v.getContext());
                ll.setOrientation(LinearLayout.VERTICAL);

              TextView TX = new TextView(v.getContext());
              TX.setText(p.name);
              ll.addView(TX); 

             //v=ll;
              
              if(p.wlist.size()!=0)//!=null)
              {
               ListView list2;
               list2 = new ListView(v.getContext());
               Ori wlist_adapter= new Ori(v.getContext(), R.layout.one_todo, p.wlist);
               
               list2.setAdapter(wlist_adapter);
               ll.addView(list2);
              }
              v=ll;
              //v.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
              
                }
                return v;

        }

새해 복 많이받으세요~

행복한 하루되시구요.

 

 

리스트뷰안에 리스트뷰가 달어가는 커스텀리스트뷰를 만들어야 해서요.

 

row밑에 하위리스트뷰가 생기는 바람에

row의 영역을 크게 만들어줘야되는데(하위리스트뷰가 한줄만 나오고 짤리더라구요)

그걸 할줄몰라서

 

 

 

  TextView TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);
                    TX3 = new TextView(v.getContext());
                    TX3.setText("convertview is null");
                    ll.addView(TX3);

위와같은 무식한 방법으로 row의 영역을 크게 해봤더니 하위리스트뷰가 안짤리더라구요

 

고수님들의 도움이 필요합니다.

 

2달째 고생하는 저에게 한줄기 빛을 ..

 

v.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
이걸 써봤는데 잘못쓰는지 잘 안되더군요.