Top "Layout-inflater" questions

The layout-inflater tag refers to the Android LayoutInflater class which is used to build a view hierarchy from an xml layout file.

How to inflate one view with a layout

I have a layout defined in XML. It contains also: <RelativeLayout android:id="@+id/item" android:layout_width="fill_…

android android-layout layout-inflater android-inflate
How to change the Text color of Menu item in Android?

Can I change the background color of a Menu item in Android? Please let me know if anyone have any …

android menuitem textcolor layout-inflater
How to change the background color of the options menu?

I'm trying to change the default color for the options menu which is white: I want a black background for …

android user-interface layout-inflater
Call to getLayoutInflater() in places not in activity

What does need to be imported or how can I call the Layout inflater in places other than activity? public …

android service android-context toast layout-inflater
How does the getView() method work when creating your own custom adapter?

My questions are: What is exactly the function of the LayoutInflater? Why do all the articles that I've read check …

android android-arrayadapter android-view layout-inflater
onCreateOptionsMenu inside Fragments

I have placed setHasOptionsMenu(true) inside onCreateView, but I still can't call onCreateOptionsMenu inside fragments. @Override public View onCreateView(LayoutInflater …

android android-fragments layout-inflater oncreateoptionsmenu
Change background color of android menu

I'm trying to change the standard light grey to a light green. Seems that there is not a simple way …

android menu background layout-inflater
Avoid passing null as the view root (need to resolve layout parameters on the inflated layout's root element)

Passing null for root studio gives me this warning: Avoid passing null as the view root (need to resolve layout …

android android-layout warnings layout-inflater
Android: Last line of textview cut off

I have a horizontal LinearLayout containing a TextView followed by a Spinner next to it. This LinearLayout is dynamically inflated …

android layout textview layout-inflater