Android: Make view on top of listview scroll together with the listview

前端 未结 2 771
名媛妹妹
名媛妹妹 2021-02-06 06:13

I have a listview which is obviously scrollable. The listview contains some form questions. Once the user submitts the form we put a stamp-like looking custom view on top of the

2条回答
  •  一整个雨季
    2021-02-06 06:58

    for View of top screen you can add headerview so bind coustom layout as headerlayout of listview..so you have scroll same as listview...

    View headerview = ((LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.track_footer_view, null, false);
        listview.addHeaderView(headerview);
    

提交回复
热议问题