所以,在這裏我有adapter.From的覆蓋功能,此功能可以更改或指定邊距,height.Here你需要採取佈局,你正在使用的對象,並從中你可以改變佈局屬性。
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater mInflater = (LayoutInflater) context
.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
convertView = mInflater.inflate(R.layout.drawer_list_item, null);
}
if (position == 0) {//for first row
ImageView imgIcon = (ImageView) convertView.findViewById(R.id.icon);
TextView txtTitle = (TextView) convertView.findViewById(R.id.title);
RelativeLayout.LayoutParams relate = new RelativeLayout.LayoutParams(200, 200);
relate.setMargins(150, 0, 0, 0);
imgIcon.setLayoutParams(relate);
RelativeLayout.LayoutParams text = new RelativeLayout.LayoutParams(300, 100);
text.setMargins(150, 180, 0, 0);
}
return convertView ;
//希望它HELP
我怎麼會去把使用RemoteViews是填充? – RealCasually