Questions tagged [inflate]

inflate is the decompression counterpart to the lossless compression algorithm and format deflate. The deflate format was created by Phil Katz of PKWare for the PKZip (.zip) archive format. Public domain software provides deflate and inflate functionality in the gzip utility and the zlib library. (Note that this tag has nothing to do with Android view inflate.)

357 questions
2
votes
1 answer

How to inflate new copies of an ImageView object on a layout?

What I am trying to do is create N (in this case 9) copies of the ImageView object R.id.tile, place each of them at different coordinates on the layout, and give each its own unique identifier. board_layout.xml:
2
votes
2 answers

setContentView(R.layout.activity_main) vs getMenuInflater().inflate(R.menu.activity_main, menu)

Why do I have to tell my activity what its layout should be twice? protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // <-- } @Override public boolean…
frankelot
  • 13,666
  • 16
  • 54
  • 89
2
votes
2 answers

Android: How to combine an inflated layout and non inflated layout?

In my actvity I want to display some textviews at the top and then inflate a listview below it. I've attempted various methods without success, such as addview() but cannot get it to work. My inflated view becomes the main layout. Any help would be…
Calgar99
  • 1,670
  • 5
  • 26
  • 42
2
votes
1 answer

can I inflate android activity from non compiled android XML?

I am wondering if it is possible to inflate an Android activity from a NON compiled android XML layout file at runtime?
2
votes
0 answers

How to set inflaterInputStream.Position?

I'm trying to set inflater.Position by calling the code below: Stream data = Compress(buffer); // data: length=12, position=12 //inflater: length=0, position=12 InflaterInputStream inflater = new InflaterInputStream(data); …
user1486691
  • 267
  • 5
  • 18
2
votes
1 answer

How to inflate LinearLayout in a fragment?

I want to inflate a LinearLayout into a fragment in the "onCreateView" method. But I have always the same error: "android.view.InflateException: Binary XML file line #7: Error inflating class fragment" I am using the…
2
votes
3 answers

cannot add inflated view to custom viewgroup

I have been trying to inflate views from xml to their corresponding view objects, then add these view objects to a programmed viewgroup. However, whenever I call myviewgroup.addView(childview), the childview seems to lose all the buttons and things…
Isaac
  • 323
  • 4
  • 14
2
votes
2 answers

SurfaceView Inflate Button to be centred at the bottom of portrait orientation

I'm rolling my own camera app and for that I'm using a SurfaceView with Landscape orientation as standard. What I'm trying to do is, inflate the SurfaceView to have a button. But I want the button to appear centred at the bottom of portrait…
OriginalCliche
  • 381
  • 4
  • 15
2
votes
3 answers

addfooterview cause exception

i inflate by this linear = (LinearLayout) findViewById(R.id.layout_content); linear.setVisibility(View.VISIBLE); LayoutInflater liInflater = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); …
Alan Lai
  • 1,094
  • 7
  • 18
  • 41
1
vote
0 answers

Android - Layout inflating two elements in one xml

I know I'm close but i just need a little help in inflating my layout. I have a LinearLayout, containing a ScrollView and a HorizontalScrollView, the ScrollView contains a second LinearLayout which contains a TextView and an ImageView and the…
Alasdair
  • 566
  • 1
  • 4
  • 16
1
vote
1 answer

Customized Dialog Android

I am trying to show a customizable dialog. This dialog contains 3 edittext and one timepicker. I want to show this dialog when I press a button in the screen. I looked at google tutorial and try to write the code. However, when I used the root…
Tekin alp
  • 97
  • 1
  • 4
  • 9
1
vote
1 answer

Error inflating a GridView on a tablet

I'm using a GridView in my Android app. Everything works perfectly on my phone, but when I tried to run the app on a tablet emulator, it crashed at the start. The error is E/AndroidRuntime(466): java.lang.RuntimeException: Unable to start activity…
lomza
  • 9,412
  • 15
  • 70
  • 85
1
vote
1 answer

problems using setMeasuredDimension()

I need my own RadioButton with a complex custom design (which is not possible using nine-patch only). So I tought about extending RadioButton and using all features from RadioGroup. For the complex custom design I inflate a LinearLayout (at first…
DaRolla
  • 534
  • 1
  • 8
  • 8
1
vote
1 answer

Problems positioning with layout Inflate

I have a layout A composed by a set of 2 texts and one image followed by another set of 2 texts and one image (they are separated by a line). I want to inflate this layout (lets say A) and put it inside another one (lets say B). The problem is that…
Alesqui
  • 6,417
  • 5
  • 39
  • 43
1
vote
4 answers

Use a ListView, or inflate and add views manually?

Which method is better? 1) Using a listview 2) Inflating and adding views in somelayout manually
Khawar Raza
  • 15,870
  • 24
  • 70
  • 127