Merge branch '660-implement-ux-for-the-list-of-private-groups' into 'master'

Private Group List UI

This MR implements the UI for the list of private groups.

It reacts to three types of events to refresh the displayed data:
* new group message received
* private group added
* private group removed

Missing from final implementation:
* entering groups
* adding new groups
* reacting to a future group dissolved event
* actually removing a dissolved group

![device-2016-09-29-180741](/uploads/666f04e8c9e2c81bdfe7f5648c14e71d/device-2016-09-29-180741.png)
![device-2016-10-03-141200](/uploads/5d0a54ea5a31d64404591c03ccf1e3b6/device-2016-10-03-141200.png)
![groups](/uploads/3eba757e21837739a129aab15100c06a/groups.gif)

Closes #660

See merge request !335
This commit is contained in:
akwizgran
2016-10-11 10:22:26 +00:00
39 changed files with 945 additions and 61 deletions

View File

@@ -2,6 +2,7 @@ package org.briarproject.android.view;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
@@ -78,7 +79,7 @@ public class TextAvatarView extends FrameLayout {
int b = getByte(bytes, 2) * 3 / 4 + 96;
int color = Color.rgb(r, g, b);
background.setFillColor(color);
background.setImageDrawable(new ColorDrawable(color));
}
private byte getByte(byte[] bytes, int index) {