Or if you have an Activity or View, you can just access the
WindowManager property.
Jonathan
On 9/27/2011 10:27 AM, Jonathan Pryor wrote:
> On Sep 27, 2011, at 10:12 AM, tsukrov wrote:
>> mWindowManager =
>> (IWindowManager)context.GetSystemService(Context.WindowService);
>
> Sadly, this is a "
A lot of thanks.
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/IWindowManager-tp4845524p4845795.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.co
On Sep 27, 2011, at 10:12 AM, tsukrov wrote:
> mWindowManager =
> (IWindowManager)context.GetSystemService(Context.WindowService);
Sadly, this is a "leaky abstraction" -- Context.GetSystemService() returns a
Java.Lang.Object(), so our generator has no idea what type it could be.
Furthermore, th
Sure, you are right, but the question was:
the resulting object HAS to be IWindowManager, hasn't it?
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/IWindowManager-tp4845524p4845645.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
I think you want:
mWindowManager = context.GetSystemService(Context.WindowService) as
IWindowManager;
if (mWindowManager != null)
do something...
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/IWindowManager-tp4845524p4845585.html
Sent from the Mono for Andro
Hi!
This line crashes:
mWindowManager =
(IWindowManager)context.GetSystemService(Context.WindowService);
Cannot cast from source type to destination type.
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/IWindowManager-tp4845524p4845524.html
Sent from th