if(chat.getAuthor().getAvatarId() == 0){ Picasso.with(getContext()).load(android.R.color.transparent).into(chat_author_avatar); chat_author_avatar.setBackgroundColor(chat.getAuthor().getColor()); } else { Picasso.with(getContext()).load(chat.getAuthor().getAvatarId()).into( chat_author_avatar); chat_author_avatar.setBackgroundColor(Color.TRANSPARENT); }
public int compute Fibonacci(int positionInFibSequence)
{
if (positionInFibSequence <= 2){
return 1;
} else {
return computeFibonacci(positionInFibSequence -1)
+ computeFibonacci(positionInFibSequence -2)
}
}[/python]
[python]
private class SepiaFilterTask extends AsyncTask {
protected Bitmap doInBackground(Bitmap... bitmaps){
Bitmap loadedBitmap = bitmaps[0];
}
sepiaBitmap.setPixel(x, y, Color.argb(alpha, outRed, outGreen, outBlue));
}
}
return sepiaBitmap;
}[/python]