Instantiates a layout XML file into its corresponding View objects
Questions tagged [android-inflate]
651 questions
1
vote
0 answers
android.view.InflateException Binary XML file line #53
In my app I have a listview, that is a feed of posts, when I'm navigation through the app, sometimes the app stops and the logcat displays the following message:
07-29 16:58:06.855: E/AndroidRuntime(6290): FATAL EXCEPTION: main
07-29 16:58:06.855:…

jackcar
- 659
- 3
- 13
- 28
1
vote
3 answers
How to get Editexts' values from inflated multiple LinerLayouts in android?
I have made an simple android activity,In that i am having a plus button and a minus button,when i click plus button a view(row) with some EditTexts will be inflated into LinearLayout,as many as times add button clicked,So i am done it…

user3820044
- 177
- 1
- 3
- 20
1
vote
1 answer
How to inflate a view from a fragment?
I wanted to try out WizarDroid library in my app. But since I am fairly inexperienced with inflators I got stuck on this error for hours.
I get a NullPointerException while trying to findViewById and I can't figure out why.
public class WizardStep1…

Muhamed Krlić
- 1,462
- 2
- 16
- 25
1
vote
1 answer
ListView not displaying on inflate
I have a TableLayout that has it's rows populated dinamically via database. On each row, I'm trying to make a OnLongClickListener() to show a ListView from a different .xml than my activity_product.xml. Here is relevant part of code from my…

lucasdc
- 1,032
- 2
- 20
- 42
1
vote
1 answer
Inflate() ignores XML params and setLayoutParams() break setOnClickListener(this)
Here is a custom view:
public class SelectFrame extends FrameLayout implements FrameLayout.OnClickListener{
public SelectFrame(Context context) {
super(context);
init();
}
private void init() {
…

Diolor
- 13,181
- 30
- 111
- 179
1
vote
1 answer
Recycle an inflated layout in Android
I have to add multiple view programatically to a HorizontalScrollView but i can not add the same inflated view twice. So i have to re-inflate my XML layout N times. An adapter solution is not an option.
There is a way to recycle this layout without…

Ollie Strevel
- 861
- 1
- 14
- 27
1
vote
1 answer
Android layout inflate exception
I have an app which is working perfect in my smartphone (android 4.2) but when i try to see it on android emulator (android 3.0) it crashes and says:
03-26 19:14:01.731: E/AndroidRuntime(448): FATAL EXCEPTION: main
03-26 19:14:01.731:…

user3013767
- 137
- 2
- 12
1
vote
4 answers
Find a TextView from a View that has been Inflated
In Xamarin, if I Inflate a View, how can I set the text of a TextView in the View?
I am wanting to code an application where I can call methods in different fragments to pass values between fragments and display these values.
Here is my MainActivity…

Garry
- 1,251
- 9
- 25
- 45
1
vote
1 answer
Preserve previous data of a different layout on orientation change
I have a fragment in an activity containing two layouts to show each for different orientations.
For portrait orientation, firstLayout.
For landscape orientation, secondLayout.
Both the layouts are shown in a same container.
So I have something like…

sjain
- 23,126
- 28
- 107
- 185
1
vote
1 answer
InflateException with custom view
I use a custom view (very similar to the NetworkImageView from Volley) in my application.
When I inflate it on an adapter (ex: in a listview) it works perfectly.
But I receive a weird InflateException when I try to use it directly into a Fragment…

Arnaud
- 509
- 5
- 13
1
vote
2 answers
Buttons don't work in android fragments
I'm working on an app and I have the following code:
package com.S.A.Productions.android.first;
import com.S.A.Productions.android.first.R;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import…

Rorrim
- 15
- 2
- 6
1
vote
1 answer
android - getMenuInflater cause crash
I run the following code:
public class MainActivity extends ActionBarActivity
{
ExpandableListAdapter listAdapter;
ExpandableListView expListView;
List listDataHeader;
HashMap> listDataChild;
public static final…

RafaelJan
- 3,118
- 1
- 28
- 46
1
vote
2 answers
How can I set an ID for each EditText I inflate it?
I made these codes.
every time I click on the button, an EditText inflate in scroll layout.
How can I get the ID for each EditText I inflate it ?
to take the value of each of them ?
ScrollView scrollview;
LinearLayout …

Prince
- 49
- 1
- 4
1
vote
1 answer
Error on inflater.inflate
I have a listview that each item loads a fragment including another fragment inside. The first charge is fine, but when I return to lisview and I reload another fragment (or the same), I get this error on the line:
view =…

gzanitti
- 117
- 1
- 12
1
vote
1 answer
android.view.InflateException: Binary XML file line #94: Error inflating class
Running into a slight Inflation issue while trying to implement the micode open source compass into my app. So I am trying to figure out how to fix this. Another set of eyes looking at this would be good. So here we go:
Here is the class that this…

CodeMonkeyAlx
- 813
- 4
- 16
- 32