Questions tagged [android-inflate]

Instantiates a layout XML file into its corresponding View objects

651 questions
0
votes
2 answers

Set onItemClickListener on custom inflated layout

I'm inflating linearlayouts in a linear layout, by doing this: LinearLayout parent = ((LinearLayout) findViewById(R.id.main_parent)); for (int i = 0; i < 3; i++) { View r = LayoutInflater.from(getBaseContext()).inflate( …
0
votes
0 answers

"System services not available to Activities before onCreate()" with popup window

I'm having a FragmentActivity that consists of a lot of elements that causes a pop-up window shown on every item click regarding to that item, I'm creating the popup the regular way: LayoutInflater inflater; View layout; inflater = (LayoutInflater)…
0
votes
1 answer

Inflated layout from viewpager is null after created view

When I add the viewpager fragment everything goes nice, but when I move to another apps and returns to my app, I have a weird problem that getView or inflated is null. It is showing the view, but I can't have access to it. Here comes the Fragment…
0
votes
1 answer

Error Inflating Class/View

I know there are many other questions asked about errors inflating the view, but none of the answers have seemed to help me. I have a custom view called DrawableView in my class Notepad. public class Notepad extends Activity { ... public…
jhnewkirk
  • 87
  • 9
0
votes
0 answers

Android: adding and removing View programmatically

I am adding and removing view dynammically, as follows: Codes: view_share_dialog = findViewById(R.id.view_share_coloring); case R.id.btn_share_coloring: if(btn.isChecked()) { CloseOpenedView(btn); …
pearmak
  • 4,979
  • 15
  • 64
  • 122
0
votes
0 answers

Android Inflate adds View only once

I'm new to Android Development and I'm having a problem cloning a View multiple times. That's my code: RelativeLayout billboard = (RelativeLayout)findViewById(R.id.billboard); int x; x = 1; while (x <= 100) { LinearLayout…
0
votes
3 answers

android.view.InflateException not sure why its force closing

I have an error I am having trouble reproducing. I think it comes about when the app is being used then the user switches aps and of goes to the homescreen for awhile then comes back to my app. The full error is: android.view.InflateException:…
Mike
  • 6,751
  • 23
  • 75
  • 132
0
votes
1 answer

LinearLayout returns null when creating it dynamically

I have two xml files in the layout folder main.xml and hidden.xml. in my activity, the content view is set to main.xml using setcontentview. what I want to do is, to inflate the main.xml with hidden.xml when a certain button is pressed. To…
user1125258
0
votes
1 answer

Another Google Maps Fragment Issue

I have been having this issue for over a week now where any attempt to call the 'onCreateView' method of SupportMapFragment class causes a runtime error. I have extended the SupportMapFragment class for debugging reasons. The application will…
0
votes
1 answer

Error inflating class in 2 activities that used to work

hi im having a problem in 2 activities in my app that is throwing this error, Error inflating class it seems to be similar to this question ; Unknown inflate error with android one of the activities is doing nothing but loading an animation and…
martinseal1987
  • 1,862
  • 8
  • 44
  • 77
0
votes
1 answer

Fragment is inflated but method has no affect

I am new to android/java development and i am having issues with implementing my method "updateBinaryInput()" correctly. In my code I inflate a fragment and for the sake of simplicity lets say all i wanted to do is set a text view in the layout…
0
votes
1 answer

Android: find the id of the inflated buttons

I have inflated buttons using the following codes, and would like to swap the location of the 2 buttons selected using simple TranslateAnimation. Codes: for (int k = 1; k <= quotient; k++) { LinearLayout.LayoutParams params3 = new…
pearmak
  • 4,979
  • 15
  • 64
  • 122
0
votes
1 answer

How to add views to tabs in Android

I need to create an application with tabs and each tab will have a WebView. When I created the activity I chose the navigation type to be Action Bar Tabs. Eclipse generated some code but I couldn't understand how to create views for each tab. Can…
user3132352
  • 403
  • 1
  • 9
  • 24
0
votes
1 answer

Binary XML file line #1: Error inflating class Mvx.MvxListView

I got a Error inflating class Mvx.MvxListView error when i try to inflate a layout that have only the mvxlistview. I have a parent view that contains two child view he master and detail. The master view must have only the listview as object. When I…
1lb3r
  • 498
  • 5
  • 15
0
votes
1 answer

Inflating Custom View into Layout

I am trying to inflate a custom view object into my Layout XML, but I am getting an inflate exception, can someone help me? Here is my Layout XML:
TiagoM
  • 3,458
  • 4
  • 42
  • 83