Design - James Montemagno https://staging.montemagno.com/tag/design/ https://staging.montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png Design - James Montemagno https://staging.montemagno.com/tag/design/ Hugo -- gohugo.io Tue, 13 Oct 2026 22:20:07 GMT 60 Opt-out of Dark Mode on iOS, Android, UWP, and macOS https://staging.montemagno.com/opt-out-of-dark-mode-on-ios-android-uwp-and-macos/ 5da372290980fc00385d9b78 Mon, 14 Oct 2019 19:17:00 GMT Everyone can't stop talking about dark mode now that iOS 13 and Android 10 are officially released. To my surprise I have actually really been enjoying dark mode on my desktop and mobile devices. I really want to go through all my apps and add proper dark mode support, however I just haven't had the time. When running apps on iOS 13 or macOS and flipping on dark mode can make your app look.... not so great:

image_from_ios

This can depend on the framework you are using, hard coded values, or a bunch of other things. You may be in this situation or perhaps you have a completely custom theme and you don't want the operating system to touch it. Well, you are in luck because you can opt-out!

iOS

You have two options here. The easiest is to update your Info.plist and add a new entry named UIUserInterfaceStyle. You can manually set this to Light or Dark to apply a theme to your entire app.

<key>UIUserInterfaceStyle</key>
<string>Light</string>

If your app is basically ready to go and just a few screens require a specific mode you can set the OverrideUserInterfaceStyle propety. This can be done on any UIView, UIViewController, or UIWindow.

public override void ViewDidLoad()
{
    base.ViewDidLoad();
    if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
        OverrideUserInterfaceStyle = UIUserInterfaceStyle.Light;
}

macOS

Similar to iOS you can add a very special key to your Info.plist called NSRequiresAquaSystemAppearance and set it to true:

<key>NSRequiresAquaSystemAppearance</key>
<true/>

Android

Android is actually really easy as you have to opt-in for the dark mode to apply to your application. Traditionally, you have always set a light or dark mode for your app in your app's styles. Every Xamarin app defaults to a light theme:

<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">

You have to opt in by setting the theme to DayNight:

<style name="MainTheme.Base" parent="Theme.AppCompat.DayNight.DarkActionBar">

This also works if you are using MaterialComponents theming:

<style name="MainTheme.Base" parent="Theme.MaterialComponents.DayNight">

UWP

UWP is also similar to Android as you have to opt-in for the system wide defaults. Traditionally in your App.xaml file you would set a requested theme:

<Application
    RequestedTheme="Light">

</Application>

This means your app will always use light theme no matter what. To opt-in you will need to remove this property completely.

Checking Requested Theme

It is actually pretty simple to check theme of the app. It has been blogged abotu a lot, and I have even submitted a pull request to Xamarin.Essentials that hightlights it, so take a look. There are also great docs for iOS, Android, and UWP to help guide you.

]]>
The Beautiful & Complex FlexLayout Comes to Hanselman.Forms https://staging.montemagno.com/flexlayout-image/ 5c821c36b2f3d500bff4c965 Fri, 08 Mar 2019 18:22:00 GMT

Last week I wrote about my new quest to fully optimize and enhance Hanselman.Forms. This involves using the latest and greatest in Xamarin.Forms and Xamarin.Essentials, but it also means spicing up the app with some lovely visuals and design. My first quest was to re-design the podcast section of the mobile app to create a list in grid form of different podcast that Hanselman produces.

So, first things first we should design a card to hold each podcast in. This can be accomplished with a simple Frame with a drop shadow on it:

<Frame
    Padding="0"
    VerticalOptions="Start"
    HasShadow="True">
    <Grid Padding="0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Image Source="{Binding Art}" Aspect="AspectFill"/>
        <Label Grid.Row="1" Margin="10,0" Text="{Binding Title}"/>
    </Grid>
</Frame>

This simple code results in a pretty nice look for album artwork:

Pod

I will absolutely want to try out the new Visual Frame/CardView enhancements now that Xamarin.Forms 3.6 is out to make sure it also looks great on iOS.

Wrapping Podcasts

Wrapping the multiple podcasts into columns and rows dymanically would be pretty ideal for something like a CollectionView, but it is still in preview. I thought instead that the the FlexLayout would be a great option because it can arrange its children horizontally and vertically in a stack in addition to wrapping items. Here is one of the samples from the documentation:

ExperimentAlignContent2-Large

Taking this concept I was able to combine the FlexLayout with a BindableLayout to make something pretty spectacular:

 <ScrollView>
    <FlexLayout BindableLayout.ItemsSource="{Binding Podcasts}"
           Wrap="Wrap"
           Direction="Row"
           JustifyContent="Start"
           AlignItems="Start"
           AlignContent="Start"
           Padding="8">
        <BindableLayout.ItemTemplate>
            <DataTemplate>
                <Grid Margin="4,4,4,4"
                      FlexLayout.Basis="{OnIdiom Phone='50%', Tablet='33%'}"
                      FlexLayout.AlignSelf="Start">

                   <local:PodcastCardView />

                </Grid>
            </DataTemplate>
        </BindableLayout.ItemTemplate>
    </FlexLayout>
</ScrollView>

It tooke me a long time how to figure out how to space each of the cards correctly and wrap to the next line while still starting on the left hand side. This was accomplished by setting all of the Align properties to Start as well as the JustifyContent. It resulted in a really great Android version:

53674791-420bf280-3c45-11e9-9438-eb608208ce7d

Better yet, when I ran it on UWP or changed the orientation the FlexLayout reacted very nicely:

ezgif.com-resize-1

Seeing this in action I was very content and wrapped up a great week 2 of live streaming updating the app on Twitch.

You can check out the full pull request on GitHub to see how I setup a full mock data source, handled tab transitions, and the final implementation for FlexLayout in the app. Don't forget that I am accepting pull requests and feature requests too on the official GitHub page.

My final take away thoughts are that while the FlexLayout is relatively complicated and has tons of little settings to tweak, it is still extremely powerful and worth dedicating some time to.

]]>
How To Get A Great App Icon: The Fiverr Experiment https://staging.montemagno.com/how-to-get-a-great-app-icon-the-fiverr-experiment/ 598df8f2c121b60019bf3030 Thu, 08 May 2014 22:19:18 GMT As a developer I wouldn’t say I am the greatest graphic designer in the world. I mean I can stumble around Photoshop and make some sweet gradients and feather a few things, but that is about the extent of it. Over the last few years I have been pretty lucky to have a graphics design team at my back to make any image assets I needed and of course lay down the final App Icons that ship to the stores. Here are a few great app Icons that I didn’t have to create:

Now that I create apps in my spare time, I have to create app icons and graphics for my apps myself. This tends to be a real issue for me. There are a few great resources out there for app creators that you should be taking advantage of. First, is the Android Asset Studio, which has a bunch of great icons, ways to generate in device screenshots, and customize your Action Bar. If you are on the iOS front then look no further then Glyphish, which costs up to $99 but has over 1200 icons for your consumption. If you are on the Windows Phone side of things then there is an amazing open source repo from Templarian that has matured over the years to supply simply beautiful icons for your app.

With these resources at my back creating a nice user interface with great icons in app isn’t an issue. The real issue is the very first thing my users sees on the app store, which is the main app icon itself. I fall on my face when it comes to this topic as shown in these two app icons:

These might not be the worst icons in the world, but they sure aren’t the best. Over the last week I created a new app for iOS called Post It, available open source on GitHub and on the App Store, which offers easy way to send social media updates from your iOS 7 device. It’s main goal is to replace the missing “swipe from the top of your device and tweet” functionality that was removed in iOS 7. I wanted the app to be beautiful, and I want the app icon to shine. After asking around on Twitter a recommendation that I had heard of before was mentioned, which was Fiverr.

If you have never heard of Fiverr, then you are in for a treat. Fiverr allows anyone to post their service that can range from physical goods, promotions, artwork, programming, or anything else with a cost of only $5. Now of course you can get things for $5, but there are plenty of “extras” that everyone offers that will raise that price up. So my experiment was this: Can I get a beautiful app icon for $5?

I started off by searching through the large list of graphic designers that were providing app icon creation services and I landed on 3 that sparked my interest: gmklawy from Egypt, creativepro from India, and atomicbliss from Sri Lankia. Each had overall positive ratings, and as you might have guessed all started with a $5 intro price.

Baseline

I started each order the same way, after placing my order I gave them details on what colors I was looking for, a description of an app, and the idea of taking the tweet button and remixing it in someway with a quill pen or whatever else hit their mind. After that all I had to do was wait and see what they might come up with.

gmklawy

As I studied gmklawy’s “extras” I knew immediately that I would want the PSD source files and of course I would want my app icon to be made and deliver in under 1 day… so that $5 jumped up to $25 really quick. But, within a few hours I had my first app icon design ready for review:<

Alright I wasn’t blown away, but I thought it did look good, the social bubbles were cool and the hand was an interesting design, but I wanted something simple and a bit more elegant. After a round of feedback the final icon turned into:

With not knowing how many revisions I could actually get out of gmklawy for free I accepted this as the final design and gave him a thumbs up review. I wasn’t sold that this was my final app icon, but it was a starter and hey I had more designers working on designer so who knew what they might come up with.

creativepro

This guy had a really impressive resume and from his extras list I had extremely high hopes. $5 to create an app icon… YES, $10 for 2 revisions…YES, $10 for textures and shadows…YES, $10 for 2 to 3 custom icons… YES, $20 for same day delivery… Obviously! Oh wow this just got to $55 really fast, but hey this seems like multiple hours of work so I can justify that in my mind. That was until I got back the first drafts in my mind, which were on his dropbox so I don’t have access, but were super generic icons with a T and F side by side in 2 colors. I was not too happy at this point. Luckily I had more revisions and could have him start over, which I did. I tried to give more constructive feedback and maybe he just didn’t understand what I was going for, which led to this:

Alright so we are looking a bit better and it is a twist on Twitter, but not great so I asked for 1 final revision to see what I would get. I tried to tell him about the essence of the app and reiterate its purpose. He mentioned this is the last revision at this price and I agreed, as it was the final revision that I technically paid for. Here is what we turned out with:

A bunch of Twitterish boxes with some clip art inside… I was not blown away by the $55 I had just spent, but I still gave him a nice review as perhaps we just didn’t communicate great. I mean we are very far apart and only chatted over the Fiverr’s order discussion board. I knew that I could use one of these icons from ether creativepro or gmklawy, but I wanted to see what atomicbliss could add to the equation.

atomicbliss

What sparked my interest with atomicbliss was that he had focused on simple letters with drop shadows, which are all the rave with the kids now a days. No one else on fiverr was really doing this and his extras were super cheap. $5 for the icon, $5 for the source documents, and another $5 for getting the icon within 2 days?? Yes to all of this please! At $15 this had me a bit worried to be honest. He was the cheapest fiverr I had run into yet. Without delay and under 12 hours he deliver 3 amazing mock ups:

Based on the first mock ups, I knew that this was my guy and hopefully I could get a few more revisions out of the deal. The thumbs up was pretty great, but didn’t fit the app perfect. However, the P with the quill was beautiful and we both agreed that dark blue was the best option of the bunch. We went back and forth a bit on the design and came up with 2 great designs. First was his favorite design without a drop shadow:

Next, was a final decision by both Stephanie and myself, which was to use his variant of the quill and add the drop shadow back. So here it is, the final app icon for Post It:

Conclusion

What did I learn from this experience? Overall, I will say that Fiverr is a great service, that “might” get you a great app icon or other things at the end of the day. It isn’t full proof and you will absolutely spend more then $5 to get an app icon, however when you think about how much impact your app icon can have on sales then it is actually priceless. I spent a total of $100 on this experiment and I think it was well worth it the investment. I will continue to go back to atomicbliss to create more app icons so future investments will be much less. It should also be noted that you can use fiverr for much more then graphics and icons, as I bought these adorable hand crafted beavers:

]]>