Alexander Anikin's blog

My personal blog

Archive for April 2013

Monodroid: WebView input/textarea never get virtual keyboard focus

leave a comment »

Today I found a very strange issue.

This looks like here.

But we can reproduce this on 1-2 of our devices like Nexus, Xoom… (May depends on Android 4.1.x version)

So – WebView creating, opening html, but no one input/textarea get virtual keyboard focus.

I tried every solution for that link, and just only #35 helps me (big thanks to author):

For those who encountered this issue on Jelly Beans:
When you use one of the WebView constructors with more then 2 arguments applying the defStyle parameter, the default style com.android.internal.R.attr.webViewStyle will not be applied! For me the fix was to set the defStyle parameter to android.R.attr.webViewStyle.

e.g. to init a WebView with private browsing use

new WebView(this, null, android.R.attr.webViewStyle, true)

where this is a Context.

Hope to have saved somebody days of investigation (as in my case)..

 

But my project is on Monodroid. I couldn’t find  android.R.attr.webViewStyle value in Monodroid and just find it in SDK 

My constructor now  looks like:

const int WEVVIEWSTYLE = 16842885;

public MyWebView (Context context) : base(context, null, WEVVIEWSTYLE)

Awesome, but why?!

 

Advertisements

Written by Alex Anikin

April 11, 2013 at 10:00 am

Posted in C#, Monodroid

Preventing backup files on iCloud in your iPhone applications in Monotouch

leave a comment »

This is pretty simple. You just need to: 

NSFileManager.SetSkipBackupAttribute(filePath, true);

Written by Alex Anikin

April 1, 2013 at 8:30 pm

Posted in Uncategorized