alopix.net


alopix' official web presence


  1. Avoid performing FragmentTransactions in Activity.onActivityResult

    With Android 3 Honeycomb we finally got Android tablets and the new APIs for using Fragments. Ever since that time there have been problems with the following exception – as also described by Alex Lockwood: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.support.v4.app.FragmentManagerImpl.…

    on exception, fragments, onActivityResult, FragmentTransaction, tips & tricks, android

  2. Use LocalBroadcastManager in your Android app

    Android has an interesting concept of Broadcasts. The name already says, what a Broadcast does: announce (or broacast 😉) information throughout the whole Android platform – even beyond app borders. Read more about Broadcasts and BrodcastReceivers on developer.android. What if I don't want other apps to know? Broadcasts can not only…

    on localbroadcastmanager, broadcast, android

  3. Make SpannableStringBuilder less painful

    Using SpannableStringBuilder on Android isn't very intuitive. It's quite awful actually. Fortunately Jake Wharton releases a Gist called Truss, which is a simple wrapper around the SpannableStringBuilder API. It's just a simple class but should make creating SpannableStrings less painful. Best thing about the Gist is probably the JavaDoc 😉. A…

    on example, gist, jake wharton, spannable, spannablestringbuilder, tips & tricks, android

  4. Use custom animations between Android Activities

    Here's a quick tutorial on how to customize animations between Activities on Android. You can either programmatically set a different animation for every startActivity or add the same animation via a style. Animation First of all, we need some animations. The most basic animation would be alpha transitions which are…

    on animation, howto, tutorial, development, android

  5. Cascades ListView.leadingVisual is wrapped in StackLayout

    If you ever tried adding a leadingVisual to your BlackBerry 10 Cascades ListView you will have noticed that it will not expand to the full width of the ListView. Even using horizontalAlignment: HorizontalAlignment.Fill will not help. After thinking it was a bug I finally found ou the reason yesterday:…

    on stacklayout, bb20, container, layout, leadingvisual, listview, tips & tricks, blackberry 10

  6. Correct Intent to send an SMS on Android

    Honestly, I do not use text messages/SMS very often – basically never. But still, sometimes you want to offer the user to send a text message. Of course, instead of implementing the messaging my self, I wanted to rely on the Android Intent service. Unfortunately there are a lot of…

    on sms, intent, text message, example, android