Questions tagged [android-inflate]

Instantiates a layout XML file into its corresponding View objects

651 questions
0
votes
2 answers

Is it possible to dynamically add AndroidAnnotation @EViewGroups instead of using the traditional inflate directly?

I'm trying to use Android Annotations and dynamically add layout components when my createNewRow button is clicked. The app runs and displays the default rows defined in activity_main.xml and, after clicking createNewButton I see children attached…
RichieHH
  • 2,116
  • 4
  • 28
  • 30
0
votes
1 answer

Inflating Multiple layouts with different views in listview using BaseAdapter in android

I have been trying to implement a listview implementation where either textview is displayed or an imageview is displayed according to the data being entered to an ArrayList in activity using BaseAdapter. My implementation for custom base…
0
votes
0 answers

How to use progressbar stored in different XML

I have layout.xml associated with activity1 which have various components including linearlayout, I have also stored one progressbar in progress.xml and on run time using LayoutInflater I am retrieving the progressbar and adding it to linearlayout…
DCoder
  • 3,486
  • 7
  • 36
  • 68
0
votes
1 answer

Android-How to replace R.layout.id by custom relativelayout in CustomAdapter?

ViewHolder holder = null; if (convertView == null) { LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = vi.inflate(R.layout.row_ten_words,null); …
0
votes
2 answers

layout_marginBottom attribute on ImageButton ignored when programmatically inflated into a view

I have an standalone ImageButton defined in xml with the following:
0
votes
0 answers

Inflating same view multiple times -- faster way?

first question on SO, forgive me if I forget to include something. In my activity, I have a function that loads a new activity that has a tabbed ViewPager with two fragments. From what I understand (or rather, from what I can tell) the activity does…
0
votes
1 answer

Error inflating view on tab number 4

There is a strange error in my code. I have a TabHost where I am adding a tab dynamically when a link of the WebView. I have tested this code on 4.4.2, it works fine. But on 2.3.3 and 2.3.6 and 2.1, it does not work. I have customized the theme of…
linosorice
  • 166
  • 1
  • 12
0
votes
4 answers

IllegalStateException when dynamically adding View to Layout

hi i am writing a program to add dynamic testview.i want to add a textview when clicking a button.But when i add textview i am getting error This is my log file 02-25 22:13:08.835: W/dalvikvm(3609): threadid=1: thread exiting with uncaught exception…
0
votes
1 answer

How to inflate a costum-view on a view

I got an custom class. Which works great. public class FocusGameView extends SurfaceView implements Runnable At the activity itself I want to put the 'FocusGameView' on a view that I already created on the xml file. so I tried to use the 'inflate'…
YanivGK
  • 893
  • 12
  • 18
0
votes
0 answers

Inflating views multiple times under certain circumstances

I'm having some issues inflating some views. I have an arraylist with objects of Events. The events has got their individual layouts. If two events has got the same date I want to combine them in a layout and then I want to add all events to a new…
jahed
  • 171
  • 12
0
votes
2 answers

How to add the OnClickListener Object in Android?

I am going through an error. Not able to add the OnClickListener object. This is following code. @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { …
Anshuman Pattnaik
  • 883
  • 3
  • 16
  • 37
0
votes
0 answers

Error when inflate menu with button on Android

I'm using a menu to use two button on AppCompat ActionBar, like in the SearchView sample, that I have used on another class in this exact way, but it is giving me this error: 02-18 11:52:06.644: E/AndroidRuntime(15988): FATAL EXCEPTION: main 02-18…
0
votes
5 answers

Androidplot error inflating class

I'm trying to follow this tutorial for androidplot here http://androidplot.com/docs/quickstart/ I cannot figure out how to fix this error where it cannot inflate a class from my xml file. I am new to programming android apps, so it might be an…
0
votes
2 answers

Android application crashes on Inflater.inflate

Ok, so here is the thing, I watched tons of videos and read tons of articles but I could'nt find a solution... Basically, my application is crashing because I'm inflating, and I can't figure out a solution. JAVA: package com.iweto; import…
user3312767
  • 328
  • 1
  • 5
  • 11
0
votes
3 answers

Inflating multiple TextViews on a horizontal LinearLayout

for(int i=0;i<45;i++){ textView[i]=new TextView(context); iInflateGoesHere.addView(stringArray[i]);//iInflateGoesHere is a horizontal LinearLayout textView[i].setText(" "+i); …
Vlad Alexeev
  • 2,072
  • 6
  • 29
  • 59