I was doing a quick experiment and I was wondering if I have to use MvxTabsFragmentActivity or is it possible to do this using the standard ActionBar logic? I tried to implement it but if I do something similar to this example I get issues with MvxFragment not being able to be converted to Android.App.Fragment.
I was researching this a little and it may be due to a namespace conflict with the v4 support library. Can anyone shed any light on this?
Is MvxTabsFragmentActivity Android's "old" way of doing tabs?
Is MvxTabsFragmentActivity Android's "old" way of doing tabs?
No - Android's old way of doing tabs is using Activities
MvxFragment not being able to be converted to Android.App.Fragment
MvxFragment is based on the support library's Fragment implementation, allowing use back to Android 2.x
You can read more about this support library at http://developer.android.com/tools/support-library/index.html and there's an intro to the mvx fragment implementation at http://slodge.blogspot.co.uk/2013/06/n26-fragments-n1-days-of-mvvmcross.html
Xamarin's support for the support lib is documented in http://docs.xamarin.com/guides/android/platform_features/fragments/part_4_-_providing_backwards_compatibility_with_the_android_support_package
However, there seems to be some problem with Xamarin supporting the latest version - see
http://forums.xamarin.com/discussion/7018/xamarin-support-for-the-new-july-2013-revision-18-v7-compatibility-library for discussion and possible alternatives - from my reading on that thread, Xamarin's suggestion seems to be to use ActionBarSherlock - although I'd also consider LegacyBar
Related
For Android I see there is a very good solution Json2View:
https://github.com/Avocarrot/json2view
for creating Android app UI on the fly. Is there any similar solution available for iOS? Is there any constraint is having JSON based UI concept for iOS, the way json2view does for Android? Or best would be some common open source library that has flavor for both Android and iOS.
Using React Native you can accomplish the same.
Strictly speaking, its not Json to View but its JavaScript to View.
Whatever views you create in ReactJS, will be created using native UIKit Framework.
For example, if you use scrollview component in JS, it will use a scrollview subclassed of UIScrollView.
Please check this link for in-depth overview
https://facebook.github.io/react-native/
https://github.com/facebook/react-native/issues/823
You cannot do anything like this, you will get apple rejected because of using any kind of code injection.
Up till this morning I was using the latest non beta Xamarin.Android (4.6.8). This had support for setting System.Net.WebRequest.CachePolicy which is used in a 3rd party library I reference in a project. I don't have the source code for this library and so cannot remove the line or replace it with HttpClient and the library is fundamental to the project.
Hopefully Xamarin will reinstate support for this property but if they don't, I'd like to know how to mock/dummy/extend/replace the property to make the code compile. No functionality is required behind this property.
Can this be done? Is this approach even correct?
Thanks in advance
I'd recommend you take this problem direct to support#xamarin.com
It sounds like a breaking change in a brand new commercial software update - so I suspect it's something that the commercial support can help with more easily than the community.
I cannot find any material for UISearchBar in MonoTouch. Can anyone help me ?
Both the ContentControls and the MonoCatalog (both versions) samples from Xamarin's github uses UISearchBar.
Several applications (with sources, e.g. TweetStation) also uses it - either directly or by using MonoTouch.Dialog.
i'm trying to create an app which uses the combination of native functionality and the phoneGap framework. The native app has a button, upon the click of which the phoneGap ui has to be added to the view. Is there any way to achieve this? Are there any tutorials for the same?
Yes, this is possible. Although you might be getting yourself into some headaches. My app kind of goes the other way around, it's mostly phonegap, but occasionally i'll pop open a view that is native. Here is the link to code that shows an excellent example of how to switch between the iOS and phonegap worlds.
new updated recommended article (see update below)
These files represent a standard plugin used in phonegap. In this particular plugin, a native view is opened on top of a phonegap view. Notice you have a custom xib and everything. This plugin can be modified to display any xib with any functionality you could think of.
If you implement this plugin you will easily see how to jump back and forth. I've successfully heavily modified these classes to add LOTS of native capabilities to my phonegap project. Also you should probably check out the official phonegap guide to phonegap plugins. Here
Important Edit
Was informed original linkwas broken (not terribly surprised as this answer is very old and i've long since moved away from Phonegap) so I replaced the original link with an article that shows how to do these plugins well. In the article it explains the link is broken and gives several links where these older files are maintained, but in fact those are broken as well. Here is a branch of one of them I found that still hosts the original files on an "archive" branch. But I haven't investigated whether these files are wildly different from my original work. Good luck!
That's not how Phonegap is meant to be used.
To achieve what you are asking for you just need to create a Phonegap app and add the extra native functionality by writing a Phonegap plugin in Objective-C. You may add as much native code as you want.
I'm actually wanting to do the same thing as the original poster. Theoretically it would be comparatively easy, but non-trival to do. I'd love it if there was a PhoneGapView that one could integrate into an existing project. Bonus points if said PhoneGapView could be integrated in Interface Builder as a re-sizeable and re-positional object, basically think of it as an Object that extends UIWebView.
This is wishful thinking on my part seeing as this is how the higher-ups want my project.
I'm trying to write an IDE for the iOS and I stumbled on a problem. I of course wanted to be able to do syntax highlighting, but I have no idea how I have to get this to work.
I have been googling over a month now, but I haven't found anything useful. Most libraries are C++. That I find no problem, I know enough of C++, but they all use the Boost libraries and I heavily doubt if it's easy to install them on a jailbroken iOS device, or even compile them for the iOS on the Mac.
So I come here for help. What should I do? Should I use a PHP syntax highlighter, which always colors the whole document? Should I write a syntax highlighter my self, that doesn't use the Boost library? Or does somebody here know another library, which can be used on the iOS?
Thank you in advance,
ief2
i have a simillar problem about syntax highlighting, but i prefer to solved it using UIWebview than using core text, because that is a different pixel in rendering text in core text and UITextview (in my problem i was using a core text view that cover by uitextview), and then i try to solved using uiwebview, even i'm still on developing but i can say that it is better using uiwebview than core text, maybe you can take a look at this link http://alexgorbatchev.com/SyntaxHighlighter/ it is an open source code, but it develop using javascript.
Most Boost libraries are header-only. There are only a few Boost libraries, like those for threading and asynchronous I/O, that use a compiled library. If you've found some solutions that would work fine aside from your worries about using Boost, then I would look at them again, as they'll likely work. Even if you must use a Boost library that is not header-only, you can always build it as a static library and link that into your application, so that in the end the only thing that needs to be installed is just your app bundle.
I know this is old, but in case anybody is looking for a complete syntax highlighter for iOS, there's two options:
Highlightr: A Swift library for syntax highlighting, supports hundreds of languages but uses JS as backend. It's fast enough for live editing, though. (Disclaimer: I am the creator of this library).
SyntaxKit: A native solution on early stages of development. Should support any TextMate syntax in the future.