片
private String picUrl;
//装修种类
private String type;
public Decoration() {
}
public Decoration(String picUrl, String type) {
this.picUrl = picUrl;
this.type = type;
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
师
Stainless steel engineers are responsible for designing, constructing, and maintaining structures and components made of stainless steel. They must have a strong understanding of the properties and characteristics of stainless steel and know how to use it in a variety of applications. Their duties may include designing components and structures, assembling them, and testing and inspecting them to ensure they meet all safety and quality standards. They may also be responsible for troubleshooting any issues that arise with the stainless steel components.
GridLayout gridLayout = new GridLayout(this);
gridLayout.setColumnCount(3);
gridLayout.setRowCount(3);
//中间按钮
Button btn = new Button(this);
btn.setText("Hello GridLayout");
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(GridLayoutActivity.this,"Hello GridLayout",Toast.LENGTH_SHORT).show();
}
});
gridLayout.addView(btn,new GridLayout.LayoutParams(GridLayout.spec(1,2), GridLayout.spec(1,2)));
//其他按钮
for(int i = 0;i < 9;i++)
{
Button btnOther = new Button(this);
btnOther.setText("Button" + i);
btnOther.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(GridLayoutActivity.this,"Button",Toast.LENGTH_SHORT).show();
}
});
GridLayout.Spec rowSpec = GridLayout.spec(i / 3);
GridLayout.Spec columnSpec = GridLayout.spec(i % 3);
GridLayout.LayoutParams params = new GridLayout.LayoutParams(rowSpec,columnSpec);
params.setMargins(1);
gridLayout.addView(btnOther,params);
}
setContentView(gridLayout);
}
}