LayoutInflater factorys = LayoutInflater.from(WelcomeActivity.this);
final View buttonEntryView = factorys.inflate(R.layout.welcome_item03, null);
Button button = (Button) buttonEntryView.findViewById(R.id.btn_welcome);
格式:
LayoutInflater factorys = LayoutInflater.from(此Activity.this);
final View view名 = factorys.inflate(R.layout.布局, null);
控件 控件名 = view名.findViewById(R.id.控件id);
网友评论