androidx settings library and tablet landscape's mode 2-pane layout - settings

The new androidx settings library (https://developer.android.com/guide/topics/ui/settings) is a nice new development - but it does not care about the "large tablet in landscape" mode the previous Preference Activity (AppCompatPreferenceActivity) did, which displays the headers on the left and the corresponding active fragment on the right half.
Has anybody an idea to implement this?

Related

"Auto Layout before OS X 10.7"

I have an app in the app store, FractalWorks, which is based on a very old code-base. It's a big app, with quite a few screens. It was created in Objective-C before auto-synthesized properties were a thing, to give you an idea of how long ago it was created.
I wrote the app when I had a full-time gig as an independent software developer. I've since taken a day job, and support my apps in my spare time.
It still sells fairly well, and I recently used to add a section to the Wikipedia article on the Mandelbrot set on 3D images: https://en.wikipedia.org/wiki/Mandelbrot_set#3D_images_of_Mandelbrot_and_Julia_sets
I'm fluent in Auto-Layout now, but haven't taken the time to update the app's XIB files from "struts and springs" style to Auto-Layout - nor do I want to invest the time to do so if I can possibly help it.
I want to add a minor enhancement to the app that involves adding some UI elements and making one of the windows slightly taller. The minute I try to use Interface Builder to edit my XIB, it apparently silently changes it to Auto-Layout, and then complains about "Auto Layout before OS X 10.7". (It was released to the app store for OS X version 10.4, if memory serves, and I've moved the OS version up to the lowest version I could get away with in order to support legacy customers. It currently supports ≥10.6. The original, pre app-store version used even older OS versions.)
Googling this error suggests I use the file inspector on my XIB file to un-check a "Use AutoLayout" checkbox, but I don't see any such checkbox.
What am I missing?
If I use Xcode's code review button to compare the XIB file before and after editing it, various "tool version" values are changed, as well as it gaining a setting useAutolayout="YES". Editing that to read useAutolayout="NO" does not solve the problem.
All the credit goes to matt and his comment.
1. In the Navigator (left panel) go to issue navigator and click on the error.
2. In the Inspectors panel (right panel) the Size inspector will be automatically selected. Switch Layout from Automatic to Translates Mask Into Constraints.
Update: It's called Autoresizing Mask now.
3. Repeat for every occurrence of this error.
You may end up with an error not in the Illegal Configuration group like the following which opens the All Messages view in the middle and doesn't open the Size inspector.
This is a compile time error, just build/run your app again.
And also from the previously mentioned comment:
Be careful not to make any constraints, as that will cause an incoherent situation.
If you have multiple auto layout errors, which in all likelihood you will have, select all the controls in a window and perform the operation once rather than for each individual control. Repeat for each window.

Implementing a 'toast' feature that's cross platform

I was thinking of a small layout that slides up from the bottom of the
page and disappears after sometime.
There is this plugin I've worked on for the Material Design Snackbar: https://github.com/bradmartin/nativescript-snackbar
There is also the Toast plugin: https://github.com/TobiasHennig/nativescript-toast at one time the plugin dropped iOS support but it looks like a recent contribution was made to fix the iOS version. Since there is not a native toast for iOS from apple, this plugin uses a cocoapod for that platform it looks like.
If you wanted to use your own visuals you could always create a layout that's positioned off the screen using the translate (x) or (y) and then animate it into the view when you want and out after a set time. The possibilites are limitless really.

Resizing visual area of ccscren object in OSX

I have created a fairly simple graphics program by starting with the PeevedPenguin project using iPad as target and then trying to retarget it to the Mac. I am using current versions of Spritebuilder, Cocos, and Xcode.
When I move over to the Mac target, the game moves over with a number of smaller issues but I am having one big issue with how to expand the visual area of the scene. It always loads in a small visual window that cuts off display of any activity outside that box. My scene is basicially a derivation of the background screen from PeevedPenguins.
For this application I want the scene to fill, but not expand past, a window the size of my screen.
I have googled about every possible idea on finding a tutorial concerning how to build these windows, but unfortunately, some other use of the term windows fills up my search results.
Would really appreciated help in solving this issue. Even a link to some sort of "Graphic design for windows on the Mac" would help.
Thanks
Apple provides a convenient "Implementing the Full-Screen Experience" section in their Mac App Programming Guide.

How can I lock orientation in OpenPlug (/flex)?

I'm writing program with Flex using OpenPlug. I'm having difficulties locking the devices orientation. From Project Properties I can find OpenPlug Studio Targeted Devices and their options. For iOS there is options to support (or not) different orientations and for Android / Symbian there is none.
Even if I select to support only "portrait" orientation with iOS, in emulator screen is not locked. I can't try it in real device, because I'm not able to generate XCode. There's another problem. I have selected to generate XCode, I've selected Apple - iPhone as device and I have selected target folder. When I click build-button, nothing happens..?
Any info regarding either one problem will be appreciated! :)
Not shure if this is still relevant - in OpenPlug Studio, you right-click on the project and choose "Properties". You then choose "OpenPlug Studio targeted Devices" on the left side in order to get the list of devices. You now click the button "Edit by Platform" on the upper right corner. This will render you a list of settings you can make. Among others, there are items "iPhone Support Landscape Left Orientation", "iPhone Support Landscape Portrait Orientation" and so on. Setting these should do the job of locking the orientation.
I have no idea what OpenPlug is, but it looks like an IDE, but I'm not sure. Frankly, it shouldn't matter. If you have a Flex project, you should have an application descriptor file (an xml under the source directory). Under that, there should be an 2 tags that you should be interested in:
<aspectRatio><!-- set portrait or landscape here --></aspectRatio>
<autoOrients>false</autoOrients>

GUI framework for automatic resizing

I want to build a desktop app where the size of both the window and the content is resized automaticly according to the resolution of the monitor. I know it can be done easily with the docking features of .NET Forms, but my customer insists on going with Linux so I can't use it.
I tried Flex & Air, but the content is not resized automaticaly when I put the app in fullscreen or in another resolution (the app goes full screen but I still have tiny buttons). Now, I am looking at Qt and Gtk...
Is there a GUI framework that can do that? I don't care about the programming language.
Also, since the app will go in a bar it would be nice to be able to customize easily the skin. (like in Flex, WPF, etc.)
Regards,
Pascal
An excellent place to start is understanding how the Screen class works: MSDN Even though that is .Net, it will give you an idea of how the screen size, dpi, etc. can be obtained. In addition that information should translate to the Mono platform. Since your client is insisting on Linux, you should look at MonoDevelop and then possibly the GTK# framework. My understanding is that GTK# is not a very friendly (that is pretty) development system (yet).
See:
MonoDevelop
GTK#

Resources