2012-01-19 7 views
-2

RelativeLayoutを拡張するカスタムビューが返されます。なぜ私のリストビューのスタックは、上下に縦にカスケードするのではなく、お互いの上に表示されますか?

どうすればこの問題を解決できますか?ありがとう。

これは、リストビューです:

<ListView 
     android:id="@+id/view_container" 
     android:layout_below="@+id/optionBarContainer" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="-8px" 
     android:paddingBottom="5dp" 
     > 
    </ListView> 

これはアダプタです:

public class OptionBarListViewArrayAdapter extends 
     ArrayAdapter<UserCheckpointBean> { 

    public OptionBarListViewArrayAdapter(Context context, 
      UserCheckpointBean[] beans) { 
     super(context, R.layout.checkpoint_tab, beans); 
    } 

    @Override 
    public View getView(int position, View convertView, ViewGroup parent) { 
     UserCheckpointBean userCheckpointBean = getItem(position); 
     CheckpointTabView view = new CheckpointTabView(getContext()); 

     view.setData(userCheckpointBean); 

     return view; 
    } 

} 
+0

画像をご覧ください。またはコード。 –

+0

これは現在の形式では答えられません。ソースコードと問題を示すスクリーンショットを含めてください。 –

+0

RelativeLayoutsの仕組みのためですあなたが他のビューを '上/下 'に置かない限り、 – tidbeck

答えて

0

私はScrollview以内リストビューをネストすることによってN00Bミスを犯した理由を、私は考え出したと思います。

関連する問題