我想按按钮然后textview加和减。该怎么弄
上代码
@Override
public View getChildView( final int arg0, final int arg1, final boolean arg2, final View arg3,
final ViewGroup arg4) {
RelativeLayout lRow = (RelativeLayout) LayoutInflater.from(context)
.inflate(R.layout.menu_list_item, null);
lRow.setLayoutParams(new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, MyUtil.dip2px(90)));
count=(TextView) lRow.findViewById(R.id.counts);
add=(Button) lRow.findViewById(R.id.button2);
reduction=(Button) lRow.findViewById(R.id.button1);
add.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}}
return lRow;
}
上代码
@Override
public View getChildView( final int arg0, final int arg1, final boolean arg2, final View arg3,
final ViewGroup arg4) {
RelativeLayout lRow = (RelativeLayout) LayoutInflater.from(context)
.inflate(R.layout.menu_list_item, null);
lRow.setLayoutParams(new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, MyUtil.dip2px(90)));
count=(TextView) lRow.findViewById(R.id.counts);
add=(Button) lRow.findViewById(R.id.button2);
reduction=(Button) lRow.findViewById(R.id.button1);
add.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}}
return lRow;
}