Instantiates a layout XML file into its corresponding View objects
Questions tagged [android-inflate]
651 questions
0
votes
1 answer
InvocationTargetException in DialogFragment & NumberPicker
I'm trying to show a NumberPicker in a dialog in order to let the user select a value between 0 and 10. It's my second day spent trying to make it work.
This is what I have:
fragment_number_picker (layout):
…

EmilioSG
- 380
- 3
- 5
- 18
0
votes
1 answer
Inflating Custom Views - Layout File Inconsistencies
No, no one answered that question, and the problem still remains... This question here is about another symptom to the same problem (please see comments below):
In Monodroid atleast, when inflating a custom view from a layout, sometimes it needs to…

samus
- 6,102
- 6
- 31
- 69
0
votes
1 answer
trouble accessing inflated ratingBar in Android
I have an async task that check if a user has a certain item, by checking a database. If they have an item then I inflate a rating bar, if not I inflate a button so they can add the item.
I inflate the rating bar in an class which extends asyncTask…

Mike
- 6,751
- 23
- 75
- 132
0
votes
3 answers
Attempting to add xml dynamically in android with inflater
I have my main page xml which I want to load a button into if a user does not have something in their database.
My main page xml is:

Mike
- 6,751
- 23
- 75
- 132
0
votes
3 answers
NullPointerException when inflating custom InfoWindowAdapter
I am trying to extract a custom InfoWindowAdapter into a separate class file. I started with an inner class which works perfect:
public class FoobarMapActivity extends SherlockFragmentActivity {
protected GoogleMap mMap;
private final…

JJD
- 50,076
- 60
- 203
- 339
0
votes
1 answer
Change views after inflating from XML
I have made a layout in XML consisting of a LinearLayout having 2 TextViews as its children.
I want to draw a vertical line within the second text view. For that, I created a class and inflated the above XML in its constructor. Now, what methods do…

Cygnus
- 3,222
- 9
- 35
- 65
0
votes
3 answers
java.lang.NullPointerException:at android.widget.PopupWindow.setContentView when trying to inflate Layout
I am trying to show a pop up window after an Image button is clicked. I created an additional layout for the pop up window and used the LayoutInflater to create a view from the layout. I am setting the popup window with this view using…

quirkystack
- 1,387
- 2
- 17
- 42
0
votes
1 answer
Failed to Inflate error tring to run android app
I tried the google speech recognition sample code, however, the app crashed and logcat reported the Failed to inflate exception.
Here is my code:
MainActivity.java
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the…

user957121
- 2,946
- 4
- 24
- 36
0
votes
1 answer
Android Inflater crashes
I am trying to build an android app. My idea is to create a glossary-app, and It has been up and running, but when I tried to add a Spinner, it crashed. Now I have removed the Spinner, but the app still crashes.
05-21 10:51:29.970:…

Odecif
- 121
- 13
0
votes
1 answer
Possible to inflate android spinner layout extended by ActionBarSherlock?
Is it possible to inflate Textview from @android:id/text1 ?
I don't want to create own layout, I would like just get a little modified text.
Here is my code:
First, I created variable to store data
private List> dataCities =…

deadfish
- 11,996
- 12
- 87
- 136
0
votes
2 answers
.setText() not appending to table Android
Upon creating the table, the rows do not populate. All I have is the column title 'fName'. The fName.setText does not seem to work. I checked to make sure completedWord.get(0) has a value and it does. There could be a problem with the layout but…

ono
- 2,984
- 9
- 43
- 85
0
votes
6 answers
Why root View return from inflate() does not match with View returned from findViewById()?
As a new-bee I am again in trouble understanding some basics of inflate().
here is my xml file -

Vipul
- 35
- 2
- 7
0
votes
2 answers
Inflating custom View in ListView according to position
I have a ListView where I would like to inflate a custom View at a certain position. It's actually the 11th item (position 10).
The getCount() method returns 11.
Here is the top part of the getView() method:
public View getView(final int position,…

gosr
- 4,593
- 9
- 46
- 82
0
votes
1 answer
LazyList set item height
I am using listview with lazyadapter and now I need to change the item row height, but seems this is a little more tricky.
Here is my adapter:
public class AlbumDetailsAdapter extends BaseAdapter {
private Activity activity;
private…

Darko Petkovski
- 3,892
- 13
- 53
- 117
0
votes
0 answers
Custom adapter getting a NullPointerException with Inflator
I have an adapter that gets a list of items from an API and then puts it in a listview. This is the first time that Im working with adapters and list views and so far Im struggling quite a lot!
Why am I getting this error? Is my context wrong or…

Harry
- 13,091
- 29
- 107
- 167