「Andorid」Fragment画面を作成する方法

Javaコード

public class ViewPagerFragmentDemo extends Fragment {
private String  text;
private TextView tvw = null;

public ViewPagerFragmentDemo(String text){
super();
this.text = text;
}

/**
*inflater inflate()でviewを返却
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View ww = inflater.inflate(R.layout.view_pager_fragment_demo1, container, false);
tvw = (TextView)v.findViewById(R.id.viewPagerText);
tvw.setText(text);
return ww;
}
}

Android

Posted by arkgame