Instantiates a layout XML file into its corresponding View objects
Questions tagged [android-inflate]
651 questions
0
votes
2 answers
android sub-fragment create before inflate
I am creating a Fragment FragParent displaying several input-fields, one of which is a sub-Fragment frag, with specialized audio controls.
The layouts of both fragments are loaded from XML in their onCreateView() methods.
Code I am using is below,…

donfede
- 734
- 1
- 9
- 25
0
votes
2 answers
android.view.inflateException Android
I have created one java class and one layout with image button. When I set content view it throws runtime exception.
Error:
02-02 17:46:39.558: E/AndroidRuntime(954): FATAL EXCEPTION: main
02-02 17:46:39.558: E/AndroidRuntime(954):…

Zankhna
- 4,570
- 9
- 62
- 103
0
votes
2 answers
View disappearing when inflated
I have a custom ListActivity in which i have a custom ListAdapter that inflates a layout for each item in the list. In eclipse, in the visual editor the layout looks like this
This is made by the following code:

Paul Thompson
- 3,290
- 2
- 31
- 39
0
votes
2 answers
Wrong layout hierarchy created from inflating
I have a custom component that actually wraps another component. Its layout is:

user940016
- 2,878
- 7
- 35
- 56
0
votes
2 answers
Error trying to add a map: android.view.InflateException: Binary XML file line #9: Error inflating class com.google.android.maps.MapView
I create the following class who extends MapActivity. The error is in this class here in the line
View view = infalInflater.inflate(R.layout.car_map_view, null);
public class ShowCarMapChild extends MapActivity {
private MapView mapView;
private…

Iban Arriola
- 2,526
- 9
- 41
- 88
0
votes
1 answer
ImageView and textView getting overlapped when trying to inflate xml
I have an xml which contain imageview and textview.Textview is placed toRightOf ImageView , but when i try to inflate the xml imageView and textview is getting overlapped.Any help is appreciated
data.xml

Badrinath
- 325
- 1
- 7
- 25
0
votes
1 answer
getView Inflater
This may be an elementary question, but I just want to know: When initializing the Inflater inside the getView() method, what's the different between these lines:
convertView = inflater.inflate(resource, root);
convertView = View.inflate(context,…

Aplit
- 61
- 1
- 6
0
votes
1 answer
Custom layout needs to inflate xml widgets
I have a custom LinearLayout. Inside that layout I want to place a couple widgets. I could create the widgets at runtime, but would rather load them from XML.
What I have below works, but I believe it is creating two LinearLayouts, one inside…

Peri Hartman
- 19,314
- 18
- 55
- 101
0
votes
1 answer
how to access spinner inside different layout android
I've been trying to solve a problem which i been having for past week , i am trying to a access spinner inside different xml layout, all i want is to access the spinner and add array to the spinner.
This is the code i am using and it doesn't work…

ben
- 29
- 1
- 7
0
votes
2 answers
Inflater not working for me when using base adapter in android
I'm trying to inflate a layout but it is not working for me.
I'm using a Basedapater in a listview.
int can1 = Integer.parseInt(c.getString(c.getColumnIndex("InCan")));
if (can1 < 1) {
// ...
} else {
View view;
LayoutInflater inflater =…

User
- 453
- 1
- 8
- 15
0
votes
1 answer
Options Menu not Inflating from xml
I am having trouble inflating an options menu from xml. Here is my code:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
super.onCreateOptionsMenu(menu);
MenuInflater inflater =…

Denizen
- 335
- 5
- 17
0
votes
1 answer
Android with Eclipse - InflateException on FrameLayout error
I just put together a new Android project in Eclipse, and so far I only have one package with one activity (the auto-generated code from Eclipse), and all I did was add two buttons to the main.xml layout file.
When I try to debug the app, the…

JMax2012
- 373
- 2
- 6
- 24
0
votes
1 answer
Getting user input from dynamically created views
I've this problem of not being able to get the user input from the second inflated view.
I've upload an picture to this site http://postimage.org/image/b4syhdzrr/
as I'm still not allowed to post images directly on SO.
As you can see, the TextView…

David Lamborghini Tan
- 55
- 1
- 1
- 5
0
votes
3 answers
What is the correct term when calling a widget from xml in Android?
I'm still very new to Android, but I am trying to keep up by using tutorials on YouTube. A bunch of people throw around the phrase "inflate the xml". I started to use this phrase as well, and I feel as though I'm not doing it right.
The only time I…

EGHDK
- 17,818
- 45
- 129
- 204
0
votes
1 answer
service show view getLayoutInflater
I would like to show two views in a service context. One is a TextView, and the other is a class that I have developed extending the basic View class.
prompt.xml:

Aharon Manne
- 712
- 3
- 11
- 34