I am getting tons of Lint warning to change layout to better support RTL devices.
If I use drawableStart in XML, what will happen in the devices that came before this attribute was introduced? Will they silently convert it to drawableLeft or the app will break?
I have good experience with using unsupported themes which silently convert to supported theme if my theme is not supported (like usage of Holo theme explicitly). So I wonder if the same will happen with these attributes.
For example, a device with SDK 10 uses this app. Will it crash or not as drawableStart was not known at that time?
PS. I do not have a device with SDK 10 to test the real behaviour, just emulators. That is why I am reluctant to believe what emulator says.
According to this blogpost you should use both start and left.
I have tried to use only start/end on API 16 and the behaved exactly as you would expect -- start got mapped to left and end got mapped to right.
Related
I'm working on a very large android app which is broken into many different modules. When I'm given a task it can be hard to find which file I need to be working on.
My hope was to connect a device to Android Studio, navigate to the relevant screen on the app, and use Logcat to filter out ActivityManager to find out the activity name. This worked fine in the past but hasn't worked so well for this large codebase.
So I wanted to ask if anyone has any advice on how to solve this issue? Right now I end up wasting an inordinate amount of time simply trying to find which file match up to the current screen and it's stressing me out.
Edit: I should also say, is there a standard way to approach this? Should there be some sort of documentation available? In general what's the best approach to matching up files with screens? Thank you.
I just came across this capability. It seems that in Layout Inspector for APIs 29, 30 and, presumably, above that the declared attribute section can identify the layout source.
Just run the app in an API 29+ emulator or device.
I have an application for iOS and macOS. These apps are using Cloudit to share information between (Core data). I am storing NSAttributedString created on one platform (for example iOS) in core data attribute, which is defined as Transformable type of attribute so core data uses (I assume) default NSCoder to code/decode NSAttributedString data.
Now my macOS app can read data from iCloud including this NSAttributedString and view/edit them. But this NSAttributedString looks completely different on macOS (and vice versa)
Not only size (which I understand, because default size on iOS and macOS is different - so I need to adjust size) but I lost my formatting (bold, italic, etc.).
So it seems like font attributes for UIFont and NSFont are not compatible, am I right? I am using standard fonts - for example on iOS UIFont.preferredFont(forTextStyle: .body)
Maybe I have to store NSAttributedString as something else (for example convert it to RTF/HTML data and share them that way) in iCloud and during reading convert RTF/HTML again into NSAttributedString. I am not asking how to do that (I know it) but I am asking if I have to do that to have NSAttributedString compatible (at least from formatting point of view) on all used platforms.
I cannot find anything regarding this on web (maybe I searching with wrong keywords). Does anybody have experience with sharing NSAttributedString between platforms (iOS, macOS)?.
Are there are any recommendations for that?
Thanks for advice/help in advance.
Solution
Finally I found the solution. The problem is that UIFont.preferredFont(forTextStyle: .body) returns a font that is not recognized on macOS platform. Therefore macOS instead of using this unknown fonts used Times New Roman for plain, bold and italic variants and this is the reason why I lost some formatting information on the way from iOS to macOS application.
Solution is simple. Instead of using standard font returned by
UIFont.preferredFont(forTextStyle: .body)
it's better to use font that is available on both platforms (for example Arial). No need to convert NSAttributedString into RTF/HTML and back.
I'm working with Fabric js inside a Phonegap application and although the touch events work, the handles are very hard to catch and use. Specifically the rotate and resize handles. If you touch them 90% of the time they just disappear. I tired fingers and styles. Same result. Confirmed the same behavior on ipad pro and my Galaxy note 4. I'm copy/pasting the same demo from their site:
http://fabricjs.com/touch-events
Has anyone experienced this? How can I make those handles easier to touch?
Solved it. All I needed to do was increase the size of the handles. It's a property passed to each object type you make.
I use myeclipse (version :myeclipse-2015-stable-3.0 or myeclipse-2016-ci-7) in windows 7, and I want to zoom in/out the fonts while editing by accelerate keys ctrl+ =/-,but they don't work.
I don't want to use the way that windows--preference--color and fonts--...to change fonts size because it isn't convenient,there is no accelerate keys confilcts also,and after changing accelerate keys,they still don't work.
Any ways to solve this problem?
Those commands don't seem to be defined in the General->Keys preferences page, for text editing, but even though they are defined in eclipse Mars (on which MyEclipse 2016 is based), they don't work there either. I can't find an eclipse bug for that, though there probably should be one.
However, I did find a solution, if you're willing to update to MyEclipse 2017 (the CI stream or the Stable stream), since the zoom function works fine there.
I have a technical doubt on an ePub3 job and thought of checking with you all and get your understanding and advise on it.
For one of my German client, I have created a ePub 3.0 re-flow with interactivity, we have used all the interactivities to work on pop-ups (Non-linear content) and it works well on iPad iBooks 3.2, as the initial request from client is to work only for iPad.
I understand that a latest Apple spec (iBooksAssetGuide 5.1 Rev 2) now says that “Develop scripts that perform well on both Mac OS and iOS devices: Interactivity on desktop computers requires input from a mouse while interactivity on iOS devices require touch input”. I’m not sure whether there would be any problem while this job goes into the Apple iBooksstore, due to the latest spec.
It would be of great help, if you all please share your idea’s / view to this problem.
Regards,
John.A
Great question. With the latest version of OSX (Mavericks) running iBooks as well, there are a few things that need to be considered when using touch interactivity in ePub3 books. The most important (and relevant here) of these is making sure you are firing mouse events as well as touch events: because they behave differently.
The most robust solution that I have found to date is using JQuery or Quo's "tap" event: as it will fire with both touch and mouse events! However, if your code digs deeper (IE if you you use events like "touchstart", "touchmove", etc.) you will need to use the corresponding mouse events to insure functionality on the desktop.
Tap.js is a great little library for stuff like this: http://alxgbsn.co.uk/2012/03/12/tap-js-a-lightweight-tap-event-javascript-plugin/.
You should also be aware that iBooks for OSX behaves differently for many features (especially when it comes to external media content and dynamic loading of content), so you should never rely on OSX only when testing...
Good luck!