Whowehoo

Bakpacking makes it difficult to keep on developing, that’s why I needed a small project to keep updated with the developer world.
A quick look on share expenses app on the play store revealed that all of them have an old design or are too complex for this simple usage.

Now here it is!

As a developer point of view, here some very quick thinking of some Android features or library I haven’t used before

About ActionBar

The ToolBar is as good and flexible as expected compared to the ActionBar.
I can only advice to use it.

About Bindings

One should not expect too much from android bindings. I was very disapointed by the API, more about this:
http://blog.hithredin.eu/development/android-binding/

About RecyclerView

I got a lot of statisfaction to see in the RecyclerView some pattern we developed internally in my company before the introduction of this component.
Forget the ListView, if not already done.

About Cell/Fragment/Activity communication

Bus event system is a go to avoid crapy getActivity, dangerous casting, strong coupling and redudant setter.
The only problem comes from the message origin and answer system which is not supported by common bus android libraries.

About Snackbar

Snackbar is a beautiful UI pattern. But it has one technical problem: it needs access to the CoordinatorLayout. Which means it must be done in the activity while the instigator is usually a fragment or a list’s cell.

That’s why all my app Snackbar are coded in the generic abstract Activity, called via Bus:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public void onEvent(final ExpenseRemoved event) {
if (!isActive()) {
return;
}
final CoordinatorLayout coordinatorLayout = (CoordinatorLayout) findViewById(R.id.coordinator);

Snackbar.make(coordinatorLayout, R.string.expense_snack_deleted, Snackbar.LENGTH_LONG).setAction(R.string.cancel, new View.OnClickListener() {
@Override
public void onClick(View view) {
event.trip.addExpense(event.expense);
DataManager.get().saveExpense(event.trip, event.expense);

Snackbar.make(coordinatorLayout, R.string.expense_snack_restored, Snackbar.LENGTH_SHORT).show();
}
})
.show();
}

Ion

Ion is awesome. Easy to use and efficient, I can recommend it has a network library over Volley

FishBun

FishBun is a good to go library if you want an image picker.

Glide

Glide is a good choice as an image loader library. I find it better than Volley.

About recyclable-no-scrollable layout

Picture in your mind a ListView that is added on the bottom of the page.

The page is big and the List goes far into the bottom, so the top parent must be a ScrollView to be able to see everything. But the List contains a lot of data: recycling is mandatory for performance.

Still no solution to implements this use-case, which I often see in design. Here my stackoverflow question:
http://stackoverflow.com/questions/25763569/listview-in-fragment-in-viewpager-in-scrollview-for-android-2-3