inflate

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 Z_DATA_ERROR. How can I use zlib to decompress a gzip file? ...

Do root views of an Activity in Android have any prior knowledge of the child views that will be loaded into them?

Is there any way to query a root view of an activity for all of its child views even before the root view or its children have been inflated? I guess what I'm looking for is whether a view knows ahead of time what children it will have before it gets inflated, and can I get that list in some way. Bizarre I realize, but I think it will ...

AS3 - bug in Rectangle.inflatePoint() - doesn't deal with negative coordinates well

this seems a bit nutty: var r:Rectangle = new Rectangle(); trace("initial rect: " + r); // (x=0, y=0, w=0, h=0) var p:Point = new Point(-5, -3); // (x=-5, y=-3) trace("point: " + p); r.inflatePoint(p); trace("inflated rect: " + r); // (x=5, y=3, w=-10, h=-6) i would expect the result to be (x=-5, y=-3, width=5, heigh...

InvocationTargetException on inflating an xml - android

Hi 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) java.lang.reflect.Constructor.constructNative(Native Method) java.lang.reflect.Constructor.newInstance(Const...

How do I programmatically add a button into the inflated layout from an adapter?

Im using an inflater inside an adapter for my listview. I need to add in a different button depending in the state of the data for each row, so Im thinking I need to do this programmatically, but how do I make sure its inserted into the correct place inside the layout? ...

Including Android Activities (and their layouts) in JAR files.

I'm trying to write a library that can be shared as a JAR file. This library will include an Activity and I'd like to include the layout in the JAR. Since it doesn't seem possible to include resource files in a JAR and I don't want the end-users to have to include these files themselves I was thinking it would be a nice hack to include t...

Android InflateException on refactor of class

I have a simple application with a view and a class that should return a ListView. The application works unless I refactor, and I am refactoring not just renaming, the name of the class. Everything seems to get changed properly but the application throws an exception of : android.view.InflateException: Binary XML file line #2: Error infl...

Android: What could cause an Options Menu inflation error?

I am receiving an inflation error when pressing the Menu button and adding a menu item in the onCreateOptionsMenu method. I've included some of the error below. The code is as follows, and works if I try it on its own and not as part of my activity as a whole. I don't think it's feasible to paste in the whole of my activity here (I have...

Inflating a view into Button?

Hi, I saw this questions unanswered on some forums and wonder if anyone have a clue on how to answer. Let's say for instance a button is needed with a picture and a text. It would seem natural to create an xml view and then inflate it into the Button. Is this possible? At the moment I don't need the button to look clickable or change ...

Content of a inflated EditText

I'm having a hard time figuring out how to getText() as a readable String from a inflated EditText. I have a boolean method that checks something, so, in the onCreate method i call it like this if(method) { if(booleanVariable) { LayoutInflater factory = LayoutInflater.from(MyActivity.this); View child = factory.in...

Analize programatically (python) Symbian v9 E32Image file

I'm trying to analyze programatically (python) a Symbian v9 Logical Device Driver (LDD zlib deflated). I'm able to read E32ImageHeader, but I can't decompress de code section. I always get "zlib.error: Error -3 while decompressing data: invalid block type" import zlib import struct full = "" f = open("c:\\file.ldd","rb") part...

LinearLayout in ExpandableListView

Hi guys, I want to inflate a childView of ExpandableChildView component. Code: public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { View v = convertView; LinearLayout linearOpt = themesOptions.get(childPosition); if(v == null) { ...

Android - how to inflate a complex layout and add to another layout?

I have an android question: I've successfully created a countdown kitchen timer activity, however my goal is to have an activity that has 3 timers on it that all work independently. I created a separate layout just for the timer itself and moved the timer code into a class and I've used layoutinflater to create the views and then added t...

why aren't menus pre-inflated for you?

Why aren't menus inflated automatically for you in Android, the way an Activity's layout is? ...

Android inflated view is empty

I am trying to add a divider between entries in a vertical LinearLayout, to emulate the appearance of a ListView. (I can't just use a ListView in this particular situation.) This is what I have in list_divider.xml: <?xml version="1.0" encoding="utf-8"?> <View xmlns:android="http://schemas.android.com/apk/res/android" android:backgr...

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 View.setVisibility(4) EDIT View.setVisibility(View.GONE) EDIT .... is there any o...

Android inflating xml layout generates RuntimeException

I'm new to Android and i'm trying to inflate a layout in xml but i get a RuntimeException. I have cut out almost everything except for my activity class and the class extending SurfaceView. Can anyone tell me what i'm doing wrong? main.xml: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/ap...

Android: draw on a view inside an inflated xml (another view)

I have a small xml file called 'xmlview.xml' which is something like: <tablelayout> <tablerow> <view id="view1" /> I created a class which extends view, and I inflated that xml file and now i have a view obtained due to inflation. xmlView = layoutInflater.inflate(R.layout.xmlview, this); I am wondering is there a way to dr...