如何以编程方式移动Listview?我一直在搜索,但是我只找到了如何修改行,但是我希望能够将整个listview移到x或y位置。
我尝试过,但是只在行/单元格内移动文本
listLayout.setPadding(0, 25, 0, 0);
RelativeLayout listLayout = new RelativeLayout(OFActivityA.this);
listLayout.setLayoutParams(new AbsListView.LayoutParams(
120, 200));
listLayout.setPadding(0, 25, 0, 0);
listLayout.setId(View.generateViewId());
TextView listText = new TextView(OFActivityA.this);
listText.setId(View.generateViewId());
listLayout.addView(listText);
listText.setText(super.getItem(position));
return listLayout;