<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">

  <title><![CDATA[Martin Adamek]]></title>
  
  <link href="http://martinadamek.com/" />
  <updated>2012-09-13T23:39:21+02:00</updated>
  <id>http://martinadamek.com/</id>
  <author>
    <name><![CDATA[Martin Adamek]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/MartinAdamekBlog" /><feedburner:info uri="martinadamekblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <title type="html"><![CDATA[Samo Colors]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/y0wiDtzftvg/" />
    <updated>2012-08-02T04:44:00+02:00</updated>
    <id>http://martinadamek.com/2012/08/02/samo-colors</id>
    <content type="html">&lt;p&gt;Catching up with the news - about one month ago I have release brand new Android application called &lt;a href="http://samocolors.com"&gt;Samo Colors&lt;/a&gt;. It is coloring app for kids. What I wanted to do was a simple and beautiful application without any distractions.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2012/08/samocolors.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;After many iterations I ended up with the interface where content itself is the UI. User navigates the UI by simple swipes, there are no buttons visible and it&amp;#8217;s all focused on the illustrations. They are SVG based by the way and it means they are small in size and always perfect looking. If you are interested in more features, head over to &lt;a href="http://samocolors.com/features"&gt;microsite for samocolors.com&lt;/a&gt; and have a look.&lt;/p&gt;

&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/JEctDJcOXx8" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;



&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/y0wiDtzftvg" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/08/02/samo-colors/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Apndroid 4]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/zckVnygc7s8/" />
    <updated>2012-08-01T21:00:00+02:00</updated>
    <id>http://martinadamek.com/2012/08/01/apndroid-4</id>
    <content type="html">&lt;p&gt;With some delay, I am happy to announce new major relase of Apndroid, labeled with version 4. Beside bugfixes and new translations this release contains two major features - Holo theme and monitoring of connected apps.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2012/08/apndroid4.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;As you can see, Apndroid now uses Android 4 default Holo theme. But not only on Android 4.x - the same look is used for all versions (Apndroid supports Android 2.1+).&lt;/p&gt;

&lt;p&gt;Another new feature is the list of connected apps. Now you can quickly see which apps have open connection. For non-system apps there is also kill button on the right, but please note, that the system can start the application again.&lt;/p&gt;

&lt;p&gt;With widget, notifications and plugins for popular profile apps, the Apndroid is now powerful extension for system mobile data switch. Why don&amp;#8217;t you &lt;a href="https://play.google.com/store/apps/details?id=com.codecarpet.apndroid.pro&amp;amp;referrer=utm_source%3Dmartinadamek.com%26utm_medium%3Dblog%26utm_campaign%3Dblog"&gt;grab it&lt;/a&gt;?&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/zckVnygc7s8" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/08/01/apndroid-4/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Taking Android snapshots from command line]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/i1XdEfrzYeY/" />
    <updated>2012-02-26T20:13:00+01:00</updated>
    <id>http://martinadamek.com/2012/02/26/taking-android-snapshots-from-command-line</id>
    <content type="html">&lt;p&gt;If you make snapshots of your Android device&amp;#8217;s screen sometimes, you might like following monkeyrunner script. It supports both the default ddms naming and also custom name that you can provide as parameter.&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/1918389.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;# how to run: monkerunner snapshot.py [filename]
import datetime, sys
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice

if len(sys.argv) &amp;gt; 1:
    filename = sys.argv[1]
    if not filename.endswith(&amp;quot;.png&amp;quot;):
        filename = &amp;quot;%s.png&amp;quot; % filename
else:
    now = datetime.datetime.now()
    filename = now.strftime(&amp;quot;device-%Y-%m-%d-%H%M%S.png&amp;quot;)

print &amp;quot;Taking snapshot: %s&amp;quot; % filename
  
device = MonkeyRunner.waitForConnection()
result = device.takeSnapshot()
result.writeToFile(filename,'png')
&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;Finally you can wrap the monkeyrunner execution into shell script:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/1918397.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;monkeyrunner snapshot.py $1&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;I am neither shell nor python guru, so if you can enhance it, let me know. For example, I am pretty sure one can manage to have everything in one single shell script but that would take too much time to me to find.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/i1XdEfrzYeY" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/02/26/taking-android-snapshots-from-command-line/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Ant With Colors in OS X Terminal]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/VkCIG855r8I/" />
    <updated>2012-02-24T23:35:00+01:00</updated>
    <id>http://martinadamek.com/2012/02/24/ant-with-colors-in-os-x-terminal</id>
    <content type="html">&lt;p&gt;I have decided to try TextMate + Terminal + Ant combo for Android development. I am trying this to keep my Macbook Pro (and my complaining lovely wife) quiet while coding in front of TV. So this is post mainly for the future reference. Add following lines to .profile:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/1904282.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
ant () { command ant  -logger org.apache.tools.ant.listener.AnsiColorLogger &amp;quot;$@&amp;quot; | sed 's/2;//g' ; }&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;Reference:
&lt;a href="http://stackoverflow.com/questions/1550288/mac-os-x-terminal-colors"&gt;Mac OS X Terminal Colors&lt;/a&gt;
&lt;a href="http://stackoverflow.com/questions/1790827/problem-with-ants-ansicolorlogger-in-snow-leopard"&gt;Ant Colors&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/VkCIG855r8I" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/02/24/ant-with-colors-in-os-x-terminal/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Game Dev Diary: Defining World]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/ewSU4or2u7g/" />
    <updated>2012-02-02T00:28:00+01:00</updated>
    <id>http://martinadamek.com/2012/02/02/game-dev-diary-defining-world</id>
    <content type="html">&lt;p&gt;Since the latest update I had very few moments to work on the game. I made some refactorings to move away from prototype stage, but I spent quite some time thinking about how the game should look. I was thinking about the design, whether it should contain different visual styles for diferent levels, or what exactly is the single game level. So far I am planning 3 styles of game:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Words_per_minute"&gt;Words per minute&lt;/a&gt; (or characters per minute) record breaking&lt;/li&gt;
&lt;li&gt;arcade mode with some bombs and few more surprises&lt;/li&gt;
&lt;li&gt;multiplayer where you will write words for your opponent and shooting his words at the same time&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It is not all well defined yet and I will have to keep it simple from beginning, because I really want to make the release one day, not just add features forever. I welcome all ideas and suggestions you may have.&lt;/p&gt;

&lt;p&gt;I started to do some experiments with the look of the world and I came to the world of planes. I was thinking about objects that would allow naturally to paint words on them and plane&amp;#8217;s wings seems like a good place. For shorter words I may use some balloons and smaller planes. I have already wowking nice &lt;a href="http://en.wikipedia.org/wiki/Parallax_scrolling"&gt;parallax scrolling&lt;/a&gt; with earth and planes. I will add clouds below and above the planes too.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2012/02/t2s_2nd_screenshot.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;Of course, this looks ugly. Both planes and background are just dummy placeholders, but scrolling feels really good. For the beginning I used static bitmap with some circles, but today I was researching procedural generation of the landscape and clouds for more realistic environment. I have something working already, but this will require quite a lot of time. My hope is to have really good looking world there.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/ewSU4or2u7g" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/02/02/game-dev-diary-defining-world/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Game Dev Diary: Competition and first screenshot]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/7iR49pSlvEk/" />
    <updated>2012-01-23T15:15:00+01:00</updated>
    <id>http://martinadamek.com/2012/01/23/game-dev-diary-competition-and-first-screenshot</id>
    <content type="html">&lt;p&gt;In last few days I focused on abstraction of the game world codebase. I wanted to provide alternative game mode where cannon will not move under the flying target, but will always stand in the center and shoot from there. The point is that I would like to provide few alternative worlds that have not just different skin for the background and all the objects, but also movement method, targeting etc. That is done in some simple way, but more work will be done on this as requirements will change over time.&lt;/p&gt;

&lt;p&gt;So there is nothing unexpected on the code level, but I experienced major WTF moment today on marketing side of the thing. Having a cup of coffee with my Android dev friend Jozef today, he asked me whether there is really no competition on the Market. I said there is not, because I did some searches in the past and I have never found anything. So he took his phone, searched for about 10 seconds and presented me with at least 3 direct competitors. I considered myself experienced searcher, but that is not the case anymore. I searched for &amp;#8216;type to shoot&amp;#8217;, &amp;#8216;word shooter&amp;#8217; etc and he simply used &amp;#8216;typing game&amp;#8217;. Shit, what can I say. I am not worried about the competition that much, because I believe in execution rather than in original idea, but this kept me thinking what&amp;#8217;s wrong with me, for a while.&lt;/p&gt;

&lt;p&gt;So here is the first screenshot of the game, now that it is not secret anymore (did I just say I didn&amp;#8217;t believe in original idea?):&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2012/01/1st_screenshot.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;As you can see, this is shooter where targets are words and shooting is performed by writing those words on the keyboard, one letter at a time. This is of course only graphics-free dev version (though I am considering also retro-look levels). Looking at the competitors, there is nothing close to what I want to achieve at the end, so let&amp;#8217;s keep coding!&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/7iR49pSlvEk" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/01/23/game-dev-diary-competition-and-first-screenshot/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Game dev diary: Projections, collisions and tools]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/0CmnzPgbHUw/" />
    <updated>2012-01-18T16:09:00+01:00</updated>
    <id>http://martinadamek.com/2012/01/18/game-dev-diary-projections-collisions-and-tools</id>
    <content type="html">&lt;p&gt;It is really hard to get back to the project that was paused just for a few weeks. I was busy with new major update of &lt;a href="http://codecarpet.com/apndroid"&gt;Apndroid&lt;/a&gt; so my game came out of my mind after I finished the prototype that I mentioned in my last &lt;a href="http://martinadamek.com/blog/2012/01/15/building-2d-shooter-idea-and-prototype"&gt;post&lt;/a&gt;. I did almost nothing yesterday, basically just refreshing the codebase in my head, thinking what&amp;#8217;s next.&lt;/p&gt;

&lt;h3&gt;Productivity&lt;/h3&gt;

&lt;p&gt;Today I have spent few hours coding and I am leaving off my computer exactly at the time when I was most excited to continue. This is one little advice from Woody Allen that I realized I was doing often. Together with the tip to work only for three to five hours, but every day, it sounds like a good idea. If you are interested in more tips, read the rest at &lt;a href="http://techcrunch.com/2012/01/14/woody-allen"&gt;TechCruch&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Projections&lt;/h3&gt;

&lt;p&gt;First problem I had to solve was the screen size and the projection. The game will run on many devices with different screen resolutions and aspect ratios. I never liked the idea of stretching content so I had decided that I will use all the screen size offered to me and world system units will be mapped 1:1 to screen pixels. That means that &lt;a href="http://code.google.com/p/libgdx/wiki/OrthographicCamera"&gt;OrthographicCamera&lt;/a&gt; will cover the whole world with its viewport. There is one more reason for that - every shootable target in the game will have attached text to it and I have found that resized or stretched texts don&amp;#8217;t look good. With pixel perfect projection it looks and moves nicely. To keep the same experience to players on all the different screens I will adjust the speed of targets, so they get to the shooter in the same amount of time.&lt;/p&gt;

&lt;h3&gt;Collisions&lt;/h3&gt;

&lt;p&gt;While I was adjusting the speed of shots, some of them simply didn&amp;#8217;t destroy the target when the speed was higher. The problem was obvious - I was using bounding rectangle based collision detection and from certain speed the shot simply overshoot the target. One frame ot was before the target and on the next frame it was after. I fixed that quickly by simply comparing the distances from cannon to target and cannon to shot. This is quick dirty fix and I have to read more about how this should be solved properly, whether I should use box2d or something similar or whether it is overkill for this kind of game. There are so many areas of the game development I know nothing about, that it is quite scary sometimes. Throw your ideas on me!&lt;/p&gt;

&lt;h3&gt;Tools&lt;/h3&gt;

&lt;p&gt;I want to go quickly through the tools I used so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.jetbrains.com/idea"&gt;IntelliJ IDEA&lt;/a&gt; free Java/Android IDE that is fast and smart. You will never look back at the Eclipse.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.adobe.com/products/fireworks.html"&gt;Adobe Fireworks&lt;/a&gt; &amp;euro;299(ex VAT) graphics editor for bitmap and vector work that I use for all my work, from icons to promo graphics and now also game objects&lt;/li&gt;
&lt;li&gt;&lt;a href="http://glyphdesigner.71squared.com"&gt;Glyph Designer&lt;/a&gt; $29.99 font designer for Mac that just works&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code.google.com/p/libgdx/wiki/TexturePacker"&gt;libGDX TexturePacker&lt;/a&gt; free texture packer that you can integrate to your project, set the source folder with bitmaps and it will produce the sprite sheet&lt;/li&gt;
&lt;/ul&gt;

&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/0CmnzPgbHUw" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/01/18/game-dev-diary-projections-collisions-and-tools/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Building 2D shooter: Idea and prototype]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/qVVWM1iPH64/" />
    <updated>2012-01-15T11:31:00+01:00</updated>
    <id>http://martinadamek.com/2012/01/15/building-2d-shooter-idea-and-prototype</id>
    <content type="html">&lt;p&gt;I have decided to build a 2D shooter game for the Android. I would like to track the progress here in my blog. Because the game development is something completely new to me, I definitely need to get the feedback on many parts of the process. I want to make money with this game and I am decided to post all the eventual sales/ads numbers. Let&amp;#8217;s think about it as development diary. Either leading to profit or fail, I hope it will be useful to everybody, including me.&lt;/p&gt;

&lt;p&gt;So I had an idea for the game. I have added it to my list of ideas on top position and couldn&amp;#8217;t stop thinking about it. It is 2D shooter, something in style of &lt;a href="http://en.wikipedia.org/wiki/Space_Invaders"&gt;Space Invaders&lt;/a&gt;. Of course there are too many games of this style, so why do I bother with new one?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it has different style of shooting and targets than the regular games&lt;/li&gt;
&lt;li&gt;I didn&amp;#8217;t find anything similar neither for the Android nor for the iOS&lt;/li&gt;
&lt;li&gt;it is addictive (to me)&lt;/li&gt;
&lt;li&gt;it has zero learning-curve&lt;/li&gt;
&lt;li&gt;it can be fun to play even just for few minutes to kill some time&lt;/li&gt;
&lt;li&gt;I am able to implement it myself&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I don&amp;#8217;t know what else has the game fulfill to be successful (execution, of course), but this was enough for me to try. For now, I am not going to reveal what is so different on shooting and targets, because I would like to keep it for me at least until beta version is ready.&lt;/p&gt;

&lt;p&gt;Being absolute beginner in game development, I have built the first prototype based on Android demo project &lt;a href="http://developer.android.com/resources/samples/LunarLander/index.html"&gt;Lunar Lander&lt;/a&gt;. Only thing that the game was doing were flying targets and the cannon that was shooting at them. That was my first touch with things like game loop, collision detection etc. It was drawing on &lt;a href="http://developer.android.com/reference/android/view/SurfaceView.html"&gt;SurfaceView&lt;/a&gt;, with almost no graphics, using just simple geometrical shapes for cannon and targets. The game was running on 60fps, sometimes dropping to 30fps. It wasn&amp;#8217;t that bad to look at, but wasn&amp;#8217;t smooth as well.&lt;/p&gt;

&lt;p&gt;At this point I started to look at available game engines. After small research on forums and mailing lists I have tried &lt;a href="http://libgdx.badlogicgames.com"&gt;libGDX&lt;/a&gt;. It is more framework than engine and I have decided for it because it seems to have healthy documentation, development and community and it offered what I was going to need. At least what I think I need so far. It is using OpenGL so my prototype rewritten to libGDX is running fluently at 60fps (though I have some problems with smoothness of moving texts). This time I started my prototype by modifying &lt;a href="http://code.google.com/p/libgdx/source/browse/#svn%2Ftrunk%2Fdemos%2Fsuperjumper"&gt;Superjumper&lt;/a&gt; libGDX demo.&lt;/p&gt;

&lt;p&gt;So here I am having some simple prototype and still many decisions to make, but I am going to work hard to move this thing further. Keep reading this blog and let&amp;#8217;s discuss on &lt;a href="http://twitter.com/martinadamek"&gt;Twitter&lt;/a&gt; or &lt;a href="https://plus.google.com/104821349486355053636"&gt;Google+&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/qVVWM1iPH64" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/01/15/building-2d-shooter-idea-and-prototype/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Switching to Octopress]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/2-HhQGdBRK4/" />
    <updated>2012-01-05T15:05:00+01:00</updated>
    <id>http://martinadamek.com/2012/01/05/switching-to-octopress</id>
    <content type="html">&lt;p&gt;I have switched this blog from Wordpress to &lt;a href="http://octopress.org"&gt;Octopress&lt;/a&gt;. Not that I am a frequent blogger with the need for better tool. I was just attracted by few of its ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;static site hosted on GitHub&lt;/li&gt;
&lt;li&gt;I can write posts in Markdown&lt;/li&gt;
&lt;li&gt;posts are stored in files without any database and magic metadata all around&lt;/li&gt;
&lt;li&gt;and I like the default theme very much, too ;-)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I wanted to keep existing permalinks from old blog working. That was easier than I thought, because I had Wordpress configured with same style as the default Octopress links. But I am pretty sure it is configurable in Octopress anyway.&lt;/p&gt;

&lt;p&gt;With some manual editing and some GitHub fighting I made it working quite quickly and I hope it will help me to write more frequently.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/2-HhQGdBRK4" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2012/01/05/switching-to-octopress/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Always take that extra step]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/OqvCSP8dFI4/" />
    <updated>2011-10-02T16:00:00+02:00</updated>
    <id>http://martinadamek.com/2011/10/02/always-take-that-extra-step</id>
    <content type="html">&lt;p&gt;I am going to publish quick update to &lt;a href="https://market.android.com/details?id=com.codecarpet.vibrate"&gt;Vibrate Keep Volume widget&lt;/a&gt; that will include updated icon and widget graphics. I wanted to have that app online so much (to keep it &amp;#8216;one afternoon project&amp;#8217;) that I handled the UI in a bad way. Today when I saw it, I almost wanted to cry. Fixed.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/10/extra_step1.png" alt="" /&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/OqvCSP8dFI4" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/10/02/always-take-that-extra-step/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Vibrate Keep Volume]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/frMh9RgTc1M/" />
    <updated>2011-10-02T12:00:00+02:00</updated>
    <id>http://martinadamek.com/2011/10/02/vibrate-keep-volume</id>
    <content type="html">&lt;p&gt;I&amp;#8217;ve just published new application to the Android Market. It is simple widget called
&lt;a href="https://market.android.com/details?id=com.codecarpet.vibrate"&gt;Vibrate Keep Volume&lt;/a&gt; that toggles vibration mode.
Of course, there are many vibrate toggles over there, but I was missing one that would keep ringer volume untouched.
All that I found and tried switched phone to the silent mode. That&amp;#8217;s not what I wanted and so I&amp;#8217;ve built it myself
this afternoon.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/10/ss-480-0-0-180x300.jpg" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s not big deal, but it&amp;#8217;s live, you know ;-) And I can get back to APNdroid refactoring feeling so productive once again.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/frMh9RgTc1M" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/10/02/vibrate-keep-volume/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[APNdroid was downloaded 2 million times already]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/GGIDZD7h53o/" />
    <updated>2011-07-24T00:00:00+02:00</updated>
    <id>http://martinadamek.com/2011/07/24/apndroid-was-downloaded-2-million-times-already</id>
    <content type="html">&lt;p&gt;Today &lt;a href="https://market.android.com/details?id=com.google.code.apndroid"&gt;APNdroid&lt;/a&gt; reached crazy milestone of 2 million downloads from the Android Market. It&amp;#8217;s amazing to see so many people install and use it all the time. There are more than 5,500 new installs every day. The crazy thing is that it keeps up with Android grow and APNdroid is installed on 1% of those &lt;a href="http://thenextweb.com/google/2011/07/14/there-are-now-550000-android-phones-activated-every-day/"&gt;550.000&lt;/a&gt; daily activated new Android phones!&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/07/apndroid2M.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;So what&amp;#8217;s next? New major release ia almost ready, you can install &lt;a href="https://market.android.com/details?id=com.codecarpet.apndroid.dev"&gt;Beta&lt;/a&gt; right now. Few strings need to be translated to all the additional languages and that&amp;#8217;s probably it. If somebody wants to help with the translation of those few words in his own language, &lt;a href="http://code.google.com/p/apndroid/source/browse/res/values/strings.xml"&gt;contributions&lt;/a&gt; are welcomed!&lt;/p&gt;

&lt;p&gt;APNdroid Pro version will follow soon, but this time there will be more than just removed ads as added value. Pro version will include native switch for disabling mobile data, integrated with the system settings. It works quickly and reliably and it finally should work also on CDMA phones. Because the troubleshooting is the most common support request, I will also add some diagnostics to the Pro version.&lt;/p&gt;

&lt;p&gt;I hope that by providing some additional functionality I will be able to increase the conversion from the free to paid app, which is right now less than 1%. I will write some follow-up post on this topic once I will have same data.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/GGIDZD7h53o" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/07/24/apndroid-was-downloaded-2-million-times-already/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[APNdroid is suspended on the Android Market]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/5Xx_oz75v_8/" />
    <updated>2011-04-28T00:00:00+02:00</updated>
    <id>http://martinadamek.com/2011/04/28/apndroid-is-suspended-on-the-android-market</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;[update3]&lt;/strong&gt; APNdroid is republished in Market with notification ads removed. I received email from Google that confirms that the app was suspended because many users reported it as malicious or malware-like. Apparently even without Market review process, Android users are able to deal with idiots of my kind. I can only hope they will continue to love this app, even though I deserve some ass-kicking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[update2]&lt;/strong&gt; I&amp;#8217;ve really learned my lesson on this. The feedback was enormous and 99% was negative. I guess there&amp;#8217;s something about that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[update1]&lt;/strong&gt; I received response from Google on my appeal and app is restored and ready to get published again. No word on what has happened, just saying this: &lt;em&gt;&amp;#8220;&amp;#8230;Upon further review, we&amp;#8217;ve accepted your appeal and have reinstated your application. You will need to log back into your Developer Console to re-publish the application so it is available again on Android Market&amp;#8230;&amp;#8221;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Few hours ago I received email from Google that notified me about the fact that my app APNdroid (1.6M downloads, 4.5 average rating) was suspended because it violated some policy. No exact reason given, I responded to the email and now I am waiting for the response.&lt;/p&gt;

&lt;p&gt;What has happened? In the last update of the app I introduced new ads provided by AirPush. These ads are not visible as part of the app, instead they appear in notification bar. They will appear max once a day and are easily cancelable (as any kind of notification). This update has started the wave of negative user comments and 1-star ratings.&lt;/p&gt;

&lt;p&gt;I do realize that I should have probably notify user about these new ads in app directly, not just in What&amp;#8217;s new section on Android Market, but I still think there is no reason to such a panic and definitely not to suspend the application. Users who don&amp;#8217;t like advertising are able to purchase the paid version without ads.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Also, I still think these ads are the best kind of ads for the user, because they don&amp;#8217;t stand in the way while the application is used, they can be cancelled easily and they do not appear very often. Personally I think that regular TV ad that fills the whole TV screen for several minutes in the middle of the movie is much worse, it&amp;#8217;s just OK because we are used to that.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[update]&lt;/strong&gt; Guys you are right, this can&amp;#8217;t be compared. TV ads are there only during the show, while push ads appear anytime, even while you do not use the app. I completely missed this point.&lt;/p&gt;

&lt;p&gt;I do apologize to all the users who were negatively impacted and I&amp;#8217;ll do whatever is needed to get the application back. In the meantime you can either downloads &lt;a href="https://market.android.com/details?id=com.codecarpet.apndroid.dev"&gt;Beta version&lt;/a&gt; of upcoming APNdroid release or purchase the &lt;a href="https://market.android.com/details?id=com.codecarpet.apndroid.pro"&gt;Pro version&lt;/a&gt; for minimum possible Market price of $0.99 (or adequate in other countries).&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/5Xx_oz75v_8" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/04/28/apndroid-is-suspended-on-the-android-market/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[JSON parsers performance on Android (with warmup and multiple iterations)]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/NZHbvcjjp2o/" />
    <updated>2011-02-04T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2011/02/04/json-parsers-performance-on-android-with-warmup-and-multiple-iterations</id>
    <content type="html">&lt;p&gt;My &lt;a href="http://www.martinadamek.com/2011/01/31/comparison-of-json-parsers-performance-on-android/"&gt;recent&lt;/a&gt; &lt;a href="http://www.martinadamek.com/2011/02/01/adding-gson-to-android-json-parser-comparison/"&gt;posts&lt;/a&gt; on JSON parsers performance on Android platform were followed by some nice feedback. But to be honest, the previous version of the code was not exactly optimal. As &lt;a href="http://twitter.com/cowtowncoder"&gt;@cowtowncoder&lt;/a&gt; pointed out in comments, there were several problems.&lt;/p&gt;

&lt;p&gt;First and most stupid was that I was using very poor implementation of input reading for Android built-in parser. Now after change in the code, this parser is no longer the slowest one. Next problem was that I did not do any warm-up before actual test were executed. Next Tatu suggested to try to run tests in multiple iterations, so I am running them now 1, 5 and 100 times. I&amp;#8217;m also using Jackson factory as static singleton, which is recommended.&lt;/p&gt;

&lt;p&gt;Now, let&amp;#8217;s see actual results as they appear now:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/02/device1.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/02/1run.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/02/5runs.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/02/100runs.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;So it&amp;#8217;s Jackson, what you should use if you need really fast reading of JSON data. All the code is up on &lt;a href="https://github.com/martinadamek/json-android-compare"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/NZHbvcjjp2o" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/02/04/json-parsers-performance-on-android-with-warmup-and-multiple-iterations/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Adding Gson to Android JSON parser comparison]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/z6j6pYtDc7c/" />
    <updated>2011-02-01T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2011/02/01/adding-gson-to-android-json-parser-comparison</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;[update2]&lt;/strong&gt; Tests have been &lt;a href="http://www.martinadamek.com/2011/02/04/json-parsers-performance-on-android-with-warmup-and-multiple-iterations/"&gt;improved&lt;/a&gt; with warmup and multiple iterations&lt;/p&gt;

&lt;p&gt;In the comment to my &lt;a href="http://www.martinadamek.com/2011/01/31/comparison-of-json-parsers-performance-on-android/"&gt;post from yesterday&lt;/a&gt; where I compared performance of three JSON parsers on Android, &lt;a href="http://android-argentina.blogspot.com/"&gt;Carlos&lt;/a&gt; suggested to try also &lt;a href="http://code.google.com/p/google-gson/"&gt;Gson&lt;/a&gt;. And that was a good idea. Its &lt;a href="http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/package-summary.html"&gt;streaming API&lt;/a&gt; seems to be the fastest one to parse Twitter public timeline. Again, test sources are in &lt;a href="https://github.com/martinadamek/json-android-compare"&gt;GitHub&lt;/a&gt; and feel free to suggest any enhancements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[update]&lt;/strong&gt; It seems that Gson and Jackson compete pretty well. In fact I have a feeling that Jackson is faster more often then Gson, so I&amp;#8217;ll try to come up with more tests, with multiple passes or something like that. Any advice on how to measure this correctly is appreciated.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/02/device.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/02/chart.png" alt="" /&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/z6j6pYtDc7c" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/02/01/adding-gson-to-android-json-parser-comparison/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Comparison of JSON parsers performance on Android]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/6GftUDBx_K0/" />
    <updated>2011-01-31T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2011/01/31/comparison-of-json-parsers-performance-on-android</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;[update2]&lt;/strong&gt; Tests have been &lt;a href="http://www.martinadamek.com/2011/02/04/json-parsers-performance-on-android-with-warmup-and-multiple-iterations/"&gt;improved&lt;/a&gt; with warmup and multiple iterations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[update]&lt;/strong&gt; I&amp;#8217;ve added also Gson and result are in &lt;a href="http://www.martinadamek.com/2011/02/01/adding-gson-to-android-json-parser-comparison/"&gt;next post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On my current project I&amp;#8217;ve already spent some time &lt;a href="http://www.martinadamek.com/2011/01/05/performance-of-android-listview-containing-textviews/"&gt;improving the performance&lt;/a&gt;. Further look in &lt;a href="http://developer.android.com/guide/developing/tools/traceview.html"&gt;Traceview&lt;/a&gt; suggested that JSON parsing was eating almost all the time spent during the activity.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve already switched from &lt;a href="http://developer.android.com/reference/org/json/package-summary.html"&gt;Android built-in&lt;/a&gt; JSON parser to &lt;a href="http://code.google.com/p/json-simple/"&gt;JSON.simple&lt;/a&gt;, because it seemed to be getting less OutOfMemory exceptions (although I can&amp;#8217;t really confirm this, I saw those also in JSON.simple, coming somewhere from StringBuilder, if I remember correctly) but was also slightly faster. Also JSON.simple usage is almost identical to the built-in one.&lt;/p&gt;

&lt;p&gt;Anyway, even with JSON.simple, Traceview was suggesting there could be a better solution. And there was. It is called &lt;a href="http://jackson.codehaus.org/"&gt;Jackson&lt;/a&gt; and it rocks. It has so-called &lt;a href="http://wiki.fasterxml.com/JacksonInFiveMinutes#Streaming_API_Example"&gt;Streaming API&lt;/a&gt; that is not just blazing fast but also promises to keep minimal memory footprint. It is little bit more complicated to use, but it&amp;#8217;s worth it.&lt;/p&gt;

&lt;p&gt;Here are the results of the test on my Nexus One (2.2.2) parsing Twitter&amp;#8217;s &lt;a href="http://api.twitter.com/1/statuses/public_timeline.json"&gt;public timeline&lt;/a&gt;. It contains 20 object, where each of them has 52 key-value pairs.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/01/device.png" alt="" /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Android built-in: 277ms&lt;/li&gt;
&lt;li&gt;JSON.simple: 176ms&lt;/li&gt;
&lt;li&gt;Jackson: 99ms&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Well, quite a difference. JSON.simple takes twice as longer as Jackson and Android built-in parser even three times longer! Sure, it&amp;#8217;s in this particular test but it roughly corresponds to what I see in my app.&lt;/p&gt;

&lt;p&gt;You can have a look at this simple project in my &lt;a href="https://github.com/martinadamek/json-android-compare"&gt;GitHub repository&lt;/a&gt;. It is a pretty stupid kind of a comparison (I am not even calling it benchmark :-) and code is not exactly one shining example of an Android app, but it could give you an idea. Also, if you use any other JSON parser in your apps, I would welcome your implementation to the project. Same applies to the comparison logic itself. I am pretty sure one can make it much more detailed and objective.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/6GftUDBx_K0" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/01/31/comparison-of-json-parsers-performance-on-android/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Performance of Android ListView containing TextViews]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/qJH_EL2tTVI/" />
    <updated>2011-01-05T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2011/01/05/performance-of-android-listview-containing-textviews</id>
    <content type="html">&lt;p&gt;Few minutes ago I radically improved performance of the ListView scrolling in my application. Problem was not so obvious, so I though it might be worth sharing this tip.&lt;/p&gt;

&lt;p&gt;Every item in my &lt;code&gt;ListView&lt;/code&gt; contains four &lt;code&gt;TextViews&lt;/code&gt;. Using &lt;a href="http://developer.android.com/guide/developing/tools/traceview.html"&gt;Traceview&lt;/a&gt; I have found that most of the time was spent in the &lt;code&gt;TextView.setText(CharSequence)&lt;/code&gt;. In the beginning I though there is nothing I can do here, because the bottleneck was in SDK class and I was already considering some crazy things to do on my side.&lt;/p&gt;

&lt;p&gt;Then I realized that in two of these &lt;code&gt;TextView&lt;/code&gt; I am most of the times passing strings that are too long to fit there so I tried to truncated them and Bam! The scrolling was silky smooth!&lt;/p&gt;

&lt;p&gt;The only thing I had to do was to find the right number of characters to truncate to. It can be done easily by &lt;a href="http://developer.android.com/reference/android/graphics/Paint.html#breakText(java.lang.String,%20boolean,%20float,%20float[]"&gt;breakText()&lt;/a&gt;) method:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/765774.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;int maxWidth = viewHolder.viewGroup.getWidth();
TextPaint textPaint = viewHolder.titleView.getPaint();

String title = cursor.getString(ArticlesQuery.TITLE);
int chars = textPaint.breakText(title, true, maxWidth, null);
if (chars &amp;lt; title.length()) {
    title = title.substring(0, chars);
}

viewHolder.titleView.setText(title);
&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;The result is really significant on both - the real device and the Traceview stats. It&amp;#8217;s amazing how such discovery can make my day, I mean night. So don&amp;#8217;t forget, Traceview is your friend.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/qJH_EL2tTVI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/01/05/performance-of-android-listview-containing-textviews/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Maintain Android themes with minimal effort]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/zU_HQ0ocR9M/" />
    <updated>2011-01-04T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2011/01/04/maintain-android-themes-with-minimal-effort</id>
    <content type="html">&lt;p&gt;On the project I am currently developing I wanted to keep two versions of the UI, black and white. I was looking for an easy way to define just the differences, but in the same time to keep the common definitions in one place.&lt;/p&gt;

&lt;p&gt;In following layouts the text size, shadow radius and position are common to both styles and I am customizing only text and shadow color.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/01/device2.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://martinadamek.com/uploads/2011/01/device1.png" alt="" /&gt;&lt;/p&gt;

&lt;p&gt;The key to the success is custom attribute in the &lt;code&gt;values/attrs.xml&lt;/code&gt;:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/765372.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;resources&amp;gt;
    &amp;lt;attr name=&amp;quot;bigLabel&amp;quot; format=&amp;quot;reference&amp;quot; /&amp;gt;
&amp;lt;/resources&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;Now I can provide alternative behavior for this attribute in my themes:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/765377.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;style name=&amp;quot;Theme.Themeswitch.Light&amp;quot; parent=&amp;quot;android:style/Theme.Light&amp;quot;&amp;gt;
    &amp;lt;item name=&amp;quot;bigLabel&amp;quot;&amp;gt;@style/ShadowedLabel.Light&amp;lt;/item&amp;gt;
&amp;lt;/style&amp;gt;

&amp;lt;style name=&amp;quot;Theme.Themeswitch.Black&amp;quot; parent=&amp;quot;android:style/Theme.Black&amp;quot;&amp;gt;
    &amp;lt;item name=&amp;quot;bigLabel&amp;quot;&amp;gt;@style/ShadowedLabel.Black&amp;lt;/item&amp;gt;
&amp;lt;/style&amp;gt;

&amp;lt;style name=&amp;quot;ShadowedLabel&amp;quot;&amp;gt;
    &amp;lt;!-- all the common properties --&amp;gt;
    &amp;lt;item name=&amp;quot;android:textSize&amp;quot;&amp;gt;@dimen/text_size_huge&amp;lt;/item&amp;gt;
    &amp;lt;item name=&amp;quot;android:textStyle&amp;quot;&amp;gt;bold&amp;lt;/item&amp;gt;
    &amp;lt;item name=&amp;quot;android:shadowDx&amp;quot;&amp;gt;1&amp;lt;/item&amp;gt;
    &amp;lt;item name=&amp;quot;android:shadowDy&amp;quot;&amp;gt;1&amp;lt;/item&amp;gt;
    &amp;lt;item name=&amp;quot;android:shadowRadius&amp;quot;&amp;gt;1&amp;lt;/item&amp;gt;
&amp;lt;/style&amp;gt;

&amp;lt;style name=&amp;quot;ShadowedLabel.Black&amp;quot;&amp;gt;
    &amp;lt;item name=&amp;quot;android:shadowColor&amp;quot;&amp;gt;@color/black&amp;lt;/item&amp;gt;
&amp;lt;/style&amp;gt;

&amp;lt;style name=&amp;quot;ShadowedLabel.Light&amp;quot;&amp;gt;
    &amp;lt;item name=&amp;quot;android:shadowColor&amp;quot;&amp;gt;@color/white&amp;lt;/item&amp;gt;
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;The last piece to te puzzle is the UI element definition itself and its reference to my custom attribute:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/765402.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;TextView android:text=&amp;quot;martinadamek.com&amp;quot;
        android:layout_width=&amp;quot;wrap_content&amp;quot;
        android:layout_height=&amp;quot;wrap_content&amp;quot;
        style=&amp;quot;?bigLabel&amp;quot;/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;


&lt;p&gt;I&amp;#8217;ve set up the project on &lt;a href="https://bitbucket.org/martinadamek/themeswitch"&gt;my Bitbucket repository&lt;/a&gt; so that you can have a look at all sources. Project even contains switching between themes in the runtime, but I did not find the nice way to do that yet, so it is always restarting the activity and it does not apply to the whole application. If you know how to do this in better, I would appreciate some tips.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/zU_HQ0ocR9M" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2011/01/04/maintain-android-themes-with-minimal-effort/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Twitter Favorites in Google Reader]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/ZLLfTR8ZT9o/" />
    <updated>2010-12-29T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2010/12/29/twitter-favorites-in-google-reader</id>
    <content type="html">&lt;p&gt;One thing that I was missing in my Twitter workflow was reading my favorited tweets. I use them often to bookmark some articles for later reading when I am going quickly through the Twitter stream and I have no time to read everything. But I often forgot to check favorites later, it&amp;#8217;s just not very handy. Wouldn&amp;#8217;t it be perfect if they just appeared in my Google Reader automatically?&lt;/p&gt;

&lt;p&gt;I have now found this nice feature of Twitter - it provides RSS feed for your favorites. You can access them at:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;http://twitter.com/favorites/twitter_username.rss/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then of course you can add this feed to the Google Reader, just make sure that you don&amp;#8217;t forget that trailing slash at the end of the url, otherwise Reader won&amp;#8217;t accept the feed (I have no idea why). Happy reading!&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/ZLLfTR8ZT9o" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2010/12/29/twitter-favorites-in-google-reader/</feedburner:origLink></entry>
  
  <entry>
    <title type="html"><![CDATA[Unit test for Android Library project]]></title>
    <link href="http://feedproxy.google.com/~r/MartinAdamekBlog/~3/CrFjj3O5-dI/" />
    <updated>2010-12-21T00:00:00+01:00</updated>
    <id>http://martinadamek.com/2010/12/21/unit-test-for-android-library-project</id>
    <content type="html">&lt;p&gt;In case you ran into problems with unit tests for your Android Library project that ended with this error message:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Test running failed: Unable to find instrumentation target package: my.library.project
Running testsEmpty test suite.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#8230; make sure that in your AndroidManifest.xml you are referring to the actual application that uses you library and runs on emulator instead of the package of your library project:&lt;/p&gt;

&lt;div&gt;&lt;script src='https://gist.github.com/749257.js?file='&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;instrumentation
    android:name=&amp;quot;android.test.InstrumentationTestRunner&amp;quot;
    android:targetPackage=&amp;quot;my.project.using.library&amp;quot;
    android:label=&amp;quot;Tests for my.library.project&amp;quot;/&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/noscript&gt;&lt;/div&gt;



&lt;img src="http://feeds.feedburner.com/~r/MartinAdamekBlog/~4/CrFjj3O5-dI" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://martinadamek.com/2010/12/21/unit-test-for-android-library-project/</feedburner:origLink></entry>
  
</feed>
