我有一个自定义的ListView。
我想在屏幕底部添加一个固定按钮。如何将固定按钮和edittext添加到屏幕底部
我该如何更改布局?
我的屏幕XML代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ListAdapter" >
<ImageView
... />
<TextView
... />
</RelativeLayout>
我的自定义arrayAdapter源代码:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.msg_detail_layout, parent, false);
msgBodyCustomer = (TextView) rowView.findViewById(R.id.MsgBodyCustomer);
contactImageCustomer = (ImageView) rowView.findViewById(R.id.PhotoImageCustomer);
if(!smslist.get(position).getType().equals(INBOX)){
msgBodyOwner.setText(smslist.get(position).getBody());
contactImageCustomer .setImageURI((smslist.get(position).getPicture()));
return rowView;
}
}
尝试亲本底部真实 – KOTIOS
你的'ListView'在哪里?你想添加在ListView的底部或底部的botton,我的意思是在'Relativelayout'的底部。 –
对不起,你给了我们错误的布局,你给我们的项目布局不布局containig listView –