Profile cover photo
Profile photo
Simon Vig Therkildsen
598 followers
598 followers
About
Simon's posts

Post has attachment
Is it possible to remove a calendar without querying the calendar provider or removing the entire account?

Post has attachment
My app is not automatically granted the ACCOUNT permissions on the M preview. Does anyone know why that is the case?

I'm having a really hard time wrapping my head around android:windowDrawsSystemBarBackgrounds, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and onApplyWindowInsets?

I'm trying to put a View in a wrap_content FrameLayout that has android:fitsSystemWindows=true. The issue is that onApplyWindowInsets is called between onMeasure and onLayout.

Say View has a height of 100px, and the status bar is 50 px.

onMeasure is called, giving the FrameLayout a measured size of 100px.
onApplyWindowInsets is called, setting a top padding of 50px on the FrameLayout.
onLayout is called, setting the top of the View to 50px, and bottom to 150px.

Since the FrameLayout is only 100px tall, half the child View is clipped.

What am I missing here?

Post has attachment
Sometimes I question why I spend time contributing to an ecosystem that obviously don't care about the developers that create content for it.

What other explanation could there be for the recent wave of reddit posts/articles about developers having apps suspended, without receiving a real explanation or any chance to rectify.

Most recently it hit phandroid, who have written a quite good article on the issue. You can read it here: http://phandroid.com/2015/01/04/play-store-developer-policies/

To sum up the general issue, app gets suspended and all the developer gets is some vague email that one or more things may or may not violate one or more clauses of the developer distribution agreement. No information on exactly what the issue is.
The developer attempts to guess what the issue is and wants to release a new version that hopefully complies. Except, that's not possible since the app is suspended.
Requests to reinstate the app are denied with canned responses.

The only possibility left is to release it as a completely new app, and lose all your downloads and reviews.

Could Google be shitting any more on these developers?

I'm sure phandroid is going to get their issue resolved. After all, they have thousands of readers - too much bad publicity.

The rest of us are fucked tho.

I'm glad play store isn't my source of income.

Can SQLite triggers trigger other triggers on Android?

When a row in TableA is deleted, a trigger executes and deletes a row in TableB.
When a row in TableB is deleted, a trigger executes that deletes a row in TableC.

If I delete a row in TableA, is the second trigger executed?

Annoying that SearchView requires a CursorAdapter for suggestions..

*MenuDrawer is no more*

When MenuDrawer was released over 2 years ago, there weren't really any good drawer implementations. Some performed badly and some had a horrible API. MenuDrawer was an attempt to solve these issues.

Last year Google released DrawerLayout. It offered about the same features as MenuDrawer, so, like most of their libraries (e.g. ABS/ABC), there wasn't much reason to switch.
But, as the framework evolves, so must the libraries. DrawerLayout now offers some convenient integration with new OS features, such as an ActionBarDrawerToggle for the Toolbar and setting status bar background colors. Since MenuDrawer doesn't offer anything over DrawerLayout, it seems like a waste of time to duplicate that behavior.

This is why I'm deprecating MenuDrawer.

Thanks to everyone who has been using or contributing to the library, and good luck with DrawerLayout :)

Post has attachment
This is amazing. To think there are actually people who defend this approach.

It seems kind of broken that CardView (probably because of the new elevation attribute) is drawn on top of the edge glow in e.g. ListViews in L.

Post has attachment
*Announcing Schematic*

ContentProviders can be a hassle to maintain. For every Uri you create you have to add it to 5 different methods, as well as add it to your UriMatcher. For large databases the ContentProvider becomes overly complex for what it actually does (proxy calls to an SQLite database).

To alleviate this, Schematic generates the ContentProvider for you. All you have to do is define the Uri's and annotate them.
Schematic requires that the ContentProvider is backed by an SQLiteDatabase so to close the loop this is also generated from annotations.

There a sample in the repository that shows how this all works. Once built you can find the generated classes in schematic-samples/build/source/apt/.

This initial release is version 0.5, so there's likely to be several changes to the API before a 1.0.

It will be available in maven central shortly.
Wait while more posts are being loaded