I follow this guide to implement custom settings. http://android-journey.blogspot.com/2010/01/for-almost-any-application-we-need-to.html . In method
@Override protected View onCreateView(ViewGroup parent){ ... }
The manual creates the elements programmatically and then returns the view. I would like to get a layout from an XML file. But the call is getLayoutInflater()not available there, how can I get the invoice layout to get the view stored in the file "progressbarpreference.xml"?
getLayoutInflater()
I have a static link to the application. The context is available if necessary.
thank
LayoutInflater inflater = LayoutInflater.from(this); inflater.inflate(R.layout.yourcustomviewxml, layout);
, : AttributeSet Ian!
LayoutInflater li = (LayoutInflater) ctx.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
(ctx - ).
ctx
Use a static link, suppose this is context.
rowLayout = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.progress_bar, parent, false);
where progress_bar is the identifier of the linear layout.