Matthias

United Kingdom

Age: 31

Post-doctoral researcher at University College London.

Jul
20
awarded Notable Question
Jul
15
asked What unit (px, dip, ?) is expected for the ints in AlertDialog.html#setView(View, int, int, int, int)
Jul
7
comment Check If MenuItem is In ActionBar Overflow
Changed this to work with android.support.v7.internal.view.menu.MenuItemImpl but then I get a NoSuchMethodException on API 10 (even though I'm building with appcompat version 22 which has that method). And when running on API 22, it works but gives the wrong result (all Action/Toolbar icons are said to be in overflow, even though only some of them are...).
Jul
7
comment How does this strange condition happens when show menu item icon in toolbar overflow menu?
Ignore my comment. Doing it your way makes it works for both Android's native MenuBuilder and AppCompat's. Nice job!
Jul
7
comment How does this strange condition happens when show menu item icon in toolbar overflow menu?
It may be a matter of taste but I think if (menu.getClass().equals(MenuBuilder.class)) is more elegant than if (menu.getClass().getSimpleName().equals("MenuBuilder")). The less hardcoded strings the better IMHO ;-)
Jul
6
comment MenuItem tinting on AppCompat Toolbar
Great job! Thanks!
Jun
17
awarded Famous Question
Jun
8
comment multiple dex files define landroid/support/annotation/AnimRes
Define "odd"...
May
27
comment Android: get SMS delivery time
@BerÅ¥ák you are right, sms.getTimestampMillis() carries the time the original message was received by the SMS service centre, which is more or less the same as the time it was sent. My solution (stackoverflow.com/a/30484675/1084488) gives you the value you want, i.e. the time of reception by the recipient (or something very close to that).
May
27
answered Android: get SMS delivery time
Apr
22
comment Android: How to retrieve file name and extension of a resource by resource ID
Turns out it is possible, Aleksandar's solution works!
Apr
19
accepted How to simulate pressing the Android menu button in ARC
Apr
17
comment How to simulate pressing the Android menu button in ARC
@Theyouthis I guess that would work but I was hoping not having to mondify the app.
Apr
17
comment How to simulate pressing the Android menu button in ARC
@CommonsWare Sadly PgUp doesn't do the trick in ARC.
Apr
15
asked How to simulate pressing the Android menu button in ARC
Mar
16
comment java.lang.IllegalArgumentException: View not attached to window manager
@Nick: There is no need to nest multiple if's in cases like this, Java's && operator has lazy evaluation (also called short-circuiting), which means the 2nd operand is not evaluated if the first one evaluates to false (which means the result of the && will always be false anyway, hence "lazy" evaluation). Similarly || will not evaluate its 2nd operand if the first one evaluates to true. Note: the & and | operators do not have this behaviour and thus always evaluate both operands.
Mar
7
awarded Notable Question
Mar
1
awarded Announcer
Feb
24
awarded Yearling
Feb
24
awarded Yearling
1 2 3 4 5