super.onPreExecute()
たとえば、どこに配置すればよいのでしょうか
。または言い換えれば、これは正しいコードです:
@Override
protected void onPreExecute() {
super.onPreExecute();
RelativeLayout parent = (RelativeLayout) findViewById(R.id.layoutHomeInfo);
RelativeLayout.LayoutParams params = (LayoutParams) parent.getLayoutParams();
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
progress = new ProgressBar(mContext);
parent.addView(progress, params);
}
また
@Override
protected void onPreExecute() {
RelativeLayout parent = (RelativeLayout) findViewById(R.id.layoutHomeInfo);
RelativeLayout.LayoutParams params = (LayoutParams) parent.getLayoutParams();
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
progress = new ProgressBar(mContext);
parent.addView(progress, params);
super.onPreExecute();
}