Dirty Phrasebook – Part 4

On 1st April 2015 I published a joke app to Google Play named Dirty Phrasebook which is based upon Monty Python’s Dirty Hungarian Phrasebook sketch. In this series of articles we’ll take a look in to the code (which will be open-sourced along with the final article). In this article we’ll look at the custom View that we use to handle user input.
Continue reading

Dirty Phrasebook – Part 3

On 1st April 2015 I published a joke app to Google Play named Dirty Phrasebook which is based upon Monty Python’s Dirty Hungarian Phrasebook sketch. I this series of articles we’ll take a look in to the code (which will be open-sourced along with the final article). In this article we’ll turn our attention to the UI.
Continue reading

Dirty Phrasebook – Part 2

On 1st April 2015 I published a joke app to Google Play named Dirty Phrasebook which is based upon Monty Python’s Dirty Hungarian Phrasebook sketch. I this series of articles we’ll take a look in to the code (which will be open-sourced along with the final article). In this article we’ll look at the remainder of translation mechanism used to (hopefully) reliably and repeatable translate the user’s input in to one of the phrases from the sketch.
Continue reading

Dirty Phrasebook – Part 1

On 1st April 2015 I published a joke app to Google Play named Dirty Phrasebook which is based upon Monty Python’s Dirty Hungarian Phrasebook sketch. I this series of articles we’ll take a look in to the code (which will be open-sourced along with the final article). In the first article we’ll begin to look at the translation mechanism used to (hopefully) reliably and repeatable translate the user’s input in to one of the phrases from the sketch.
Continue reading

Custom Colour Spans

Regular readers of Styling Android should know that I’m a huge fan of Spans and believe that a good understanding of Spans is essential in order to get the best out of TextView. That said sometimes just doing simple things, such as simply changing the text colour, can seem a little awkward. In this article we’ll look at how to roll your own Span implementations, and see how easy it can be to utilise custom Spans.
Continue reading

RecyclerView FastScroll – Part 1

In the previous series we looked at how we could get smoothScrollToPosition() working in a timely manner when using LinearLayoutManager with a large data set. An alternative UX approach to using smoothScrollToPosition() which may be applicable in some use-cases is to avoid smooth scrolling altogether and use the fast scroll behaviour which has long been a staple of ListView. However, RecyclerView does not have fast scroll built in so, in this short series, we’ll look at how to implement fast scroll in RecyclerView.
Continue reading

Scrolling RecyclerView – Part 3

In the previous article we did an exploration in to how smooth scrolling in LinearLayoutManager is performed in order to understand why calling smoothScrollToPosition() on RecyclerView does not permit us to specify a duration for the scroll. In this article we’ll look at how we can customise this behaviour given we understand how the list items will be used within the RecyclerView.
Continue reading

Scrolling RecyclerView – Part 2

In the previous article we got a basic RecyclerView with a large data set working and found that the smoothScrollToPosition() behaviour worked well when moving relatively small amounts, but was far too slow to be usable when moving much larger distances. In this article we’ll explore why this is by taking a deep dive in to the LinearLayoutManager and SmoothScroller components of RecyclerView.
Continue reading