Saturday, April 20, 2013

[android help] Before onCreateView starts

android - Before onCreateView starts - Stack Overflow








Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















In PageFragment; I inflate a layout in onCreateView. But I want to inflate this layout before onCreateView loads. It could be inflated one time / or for every fragment; not important.


How can I achieve it ?



public class PageFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

View view = inflater.inflate(R.layout.page_quiz, container, false);
tv = (TextView) view.findViewById(R.id.Text);

LinearLayout ll = (LinearLayout) view.findViewById(R.id.questionList);

return view;
}
}















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...