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.)

348 questions
114
votes
3 answers

How can I decompress a gzip stream with zlib?

Gzip format files (created with the gzip program, for example) use the "deflate" compression algorithm, which is the same compression algorithm as what zlib uses. However, when using zlib to inflate a gzip compressed file, the library returns a…
Greg Hewgill
  • 828,234
  • 170
  • 1,097
  • 1,237
39
votes
3 answers

Inflate a view in a background thread

I have a very simple question: Is or is it not possible to inflate a view (not add it to layout) in a background thread (ex: in the doInBackground of an AsyncTask)? I know that it is possible, because I have implemented most Activities in my…
pandre
  • 6,335
  • 7
  • 38
  • 48
34
votes
4 answers

How to add same view to parent multiple times by inflating it only once

I have a LinearLayout with vertical orientation as parent, I want to add some view programmatically multiple times to this parent. Right now I am inflating the child every time getting new references to every UI element before adding to parent. This…
mkso
  • 3,078
  • 2
  • 25
  • 34
32
votes
7 answers

JavaScript: Decompress / inflate /unzip /ungzip strings

I'm looking for JavaScript implementation of string inflating algorithms. I want to compress on the server side (Java), and decompress on the client side (JavaScript). I've found: unzip strings in javascript That one is marked as answered with an…
Ondra Žižka
  • 36,997
  • 35
  • 184
  • 250
26
votes
2 answers

How to "deflate" a ViewStub?

So I can inflate a ViewStub at runtime. Let's say I want to make it disappear and then maybe inflate again depending on some event occurring (for example, a toolbar that inflates and deflates according to what the user selects on screen). I can use…
Sid
  • 9,498
  • 5
  • 36
  • 59
17
votes
3 answers

It inflate the view without the margin

I have this code View item = View.inflate(context, R.layout.item_layout, null); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); …
Lukap
  • 29,596
  • 60
  • 146
  • 239
17
votes
9 answers

Error Inflating class com.google.android.maps.MapView

i am just following a simple map tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html but getting this error . I am new to android i tried to follow all the solution provided over the internet but no success yet. Please…
zeshu
  • 171
  • 1
  • 1
  • 3
17
votes
2 answers

Android ClassNotFoundException with ViewPager

I am getting the following error, which I don't understand... 06-15 22:06:49.196: W/dalvikvm(17622): threadid=1: thread exiting with uncaught exception (group=0x40bcc1f8) 06-15 22:07:05.031: W/dalvikvm(17877): threadid=1: thread exiting with…
16
votes
3 answers

What's the quickest way to add several views to a LinearLayout?

I have a LinearLayout view that already contains several elements. I want to add a lot more Views to it, programmatically. And because this is inside a ScrollView, everything will be scrolled. So what I do is go through my list, and add new…
zeh
  • 8,471
  • 3
  • 32
  • 50
15
votes
1 answer

Error inflating inner class view

I'm trying to inflate an inner class view and getting the "error inflating class" problem. I've referenced this post which was helpful, but I'm still lost as to why I can't get this to work. Here is a code excerpt, my XML, and logcat. Edit: Also I…
user432209
  • 18,887
  • 10
  • 52
  • 73
13
votes
1 answer

android linearlayout background selector

I am adding some Linearlayout views in a scrollview by inflating them dynamically. I have set the background of the added LinearLayout to a selector list. But after adding to scrollview, when I press the selected view, it does not show any affect of…
Khawar Raza
  • 14,992
  • 23
  • 63
  • 117
13
votes
2 answers

Zlib compression Using Deflate and Inflate classes in Java

I want trying to use the Deflate and Inflate classes in java.util.zip for zlib compression. I am able to compress the code using Deflate, but while decompressing, I am having this error - Exception in thread "main"…
Ashish Agarwal
  • 13,427
  • 30
  • 79
  • 122
13
votes
1 answer

Change text value in inflate layout

I have custom adapter in which i inflate layout. In adapter i try to change some text value in TextView (@id/datetextcal) LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); cellView =…
Hawkins
  • 397
  • 1
  • 4
  • 15
13
votes
1 answer

Git fatal: pack has bad object at offset X: inflate returned -5

Git has given me a lovely christmas gift... I'm trying to git push a bunch of commits, like 6 GB. And I'm getting the following error message: -Counting objects: 525, done. Delta compression using up to 24 threads. Compressing objects: 100%…
Andrew Latham
  • 5,382
  • 12
  • 39
  • 83
13
votes
2 answers

InvocationTargetException on inflating an xml - android

I have a code that works 99% of the time since is deploy in lots of clients, but sometimes I get the following: java.lang.reflect.InvocationTargetException android.widget.LinearLayout.(LinearLayout.java:92) …
Daniel Benedykt
  • 6,263
  • 12
  • 47
  • 70
1
2 3
23 24