Instantiates a layout XML file into its corresponding View objects
Questions tagged [android-inflate]
651 questions
5
votes
1 answer
Google Map APIv2 implementation , Binary XML file line #6: Error inflating class fragment
android.view.InflateException: Binary XML file line #6: Error inflating class fragment
I am trying to implement Google Map apiv2 in fragments following various tutorials , I ran into error inflating class fragment , then I came across various…

Harshit
- 1,207
- 1
- 20
- 40
5
votes
2 answers
Inflating RadioGroup in Android-multiple radioButtons check at a time
I made a RadioGroup with a variable number of radioButtons. The problem is that many radiobuttons can be checked, it is not a single RadioButton checked in a RadioGroup (as I know) Where is my mistake?
Here is my code :
View view =…

Gabrielle
- 4,933
- 13
- 62
- 122
5
votes
1 answer
Inflated View doesn't catch onClick event
I have an template view it looks like ;
template.xml :

Nande kore
- 784
- 1
- 8
- 16
5
votes
3 answers
error while inflating XML in Google maps fragment
trying to display Google map using a fragment. Used the following page as a tutorial.
I am getting the exception "Error Inflating class fragment ".
1) Imported the jar google-play-services.jar
2) downloaded and configured the google play services…

10101010
- 607
- 8
- 24
5
votes
3 answers
How to inflate a custom view class?
I have a class that extends view, that defines a custom drawing (a resistor). I want to click a button and add that view to the main layout.
so that I see the resistor, and if I click again it will add another resistor and so on.
but I don't know…

0gravity
- 2,682
- 4
- 24
- 33
4
votes
4 answers
Android: LayoutInflater and findViewById woes
I'm trying to use LayoutInflater in a loop, but each time one of these guys is instantiated, I need to modify at least 2 TextViews found within each instantiation. What i currently have at the moment instantates appropriately and adds the inflated…

RedactedProfile
- 2,748
- 6
- 32
- 51
4
votes
1 answer
Specified child already has a parent error on inflated view
Immediate help needed!! The code used to work fine, but after a while I noticed rating doesnt work anymore and gives "the specified child already has a parent, call removeView() first..." on thealertDialog.show();` line:
///// Rating bar…

user975869
- 275
- 1
- 5
- 12
4
votes
1 answer
Spinner - inflate exception when using AppCompat
I have implemented Android application for reading books. My application has two modes - day and night.
For day mode I am using theme, which has the parent set to @style/Theme.AppCompat.Light.NoActionBar. For the night mode the parent is…

PetrS
- 1,110
- 14
- 38
4
votes
2 answers
Replacing ListView row with another layout onClick
I have a ListView with only TextView. I want an implementation in which if I click on a ListView row, an edittext with a replace button should appear and whatever I type in that edittext and click replace, the listrow should update. My main problem…

Rishabh Srivastava
- 3,683
- 2
- 30
- 58
4
votes
1 answer
Android View inflateException
I'm trying to create a custom view - finger paint, and I'm having trouble with this error and I don't know how to fix it. Can anybody tell me what is wrong?
LogCat:
08-04 08:34:01.171: E/AndroidRuntime(15664): java.lang.RuntimeException: Unable to…

Darko Petkovski
- 3,892
- 13
- 53
- 117
4
votes
2 answers
Does LayoutInflater load xml every time?
Does LayoutInflater loads xml layout resource every time when we load view using it?
View view = LayoutInflater.from(context).inflate(R.layout.resource, null);
For example, if I want to create 100 views with the same layout id, will it parse 100…

pleerock
- 18,322
- 16
- 103
- 128
4
votes
2 answers
Getting stackoverflow error while trying to inflate custom view
I have custom_layout.xml:

bluebyte
- 560
- 2
- 7
- 23
3
votes
3 answers
ClassCastException when inflating a view for a custom dialog
I'm trying to add a custom dialog type to an Android application, but whenever I press the button that should bring up the dialog, I get a force close instead.
The log output from the force close is as follows:
06-05 22:53:28.413:…

autophage
- 196
- 1
- 9
3
votes
3 answers
Popup menu is not inflating
How can I create a custom popup menu class with OnMenuItemClickListeners? I can't seem to find any SO answers that use a seperate class to do so. They all do it in their activities, but I want a seperate popup menu class.
I've tried creating…

DIRTY DAVE
- 2,523
- 2
- 20
- 83
3
votes
1 answer
Height and margin not working with inflated and addview?
Here's my EditText

Manoj Perumarath
- 9,337
- 8
- 56
- 77