Hi

I have 2 applications: APP1 (with activity Act1), APP2(with activity
Act2) and some android library LIB used in both applications with
"uses-library" in AndroidManifest.xml.

I'm trying to embed Act2 into Act1 using ActivityGroup. After
inflating Act2's layout I'm trying to get some view form the resulting
view object but got ClassCastException
(findViewById(R.id.some_view_id).getClass().getName() is identical
with the class I want to cast to).
I'm aware Act1 and Act2 are running in the same process and they are
using different classloaders to load classes: App1CL and App2CL. But I
don't understand why the LayoutInflater is using App1CL to instantiate
the view classes.

The problem: I can't use the shared libraries in this scenario
My question: Does anyone know some workarround for this problem? Maybe
there is a way to instruct LayoutInflater to load view classes using
some other classloader, maybe Thread's contextClassloader?

I'm on Gingerbread so I don't have Fragments, I don't know if the
problem is reproductible there with fragments.
I found this discussion on this group:
http://groups.google.com/group/android-developers/browse_thread/thread/77f371c85e47142c?
It seems nobody wants to add relevant information about this.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to