Warning: Use of undefined constant _FILE_ - assumed '_FILE_' (this will throw an Error in a future version of PHP) in /home/bolyarco/www-ikratko/ogrelab/wp-content/plugins/ad-blocker-stats-vip/ad-blocker-stats-vip.php on line 13

Archive for February, 2011

Пуснах версия 2.0 на "МОЕТО ТОТО 2" (Android app)

2011-02-22   

Вчера мисля, че успях да ликвидирам и последния бъг в новата версия на Моето Тото 2 и тя беше публикувана в андроид маркета. Новите неща включват:

  • възможност за записване на генерираните комбинации;
  • възможност за въвеждане и записване на собствени комбинации (чрез доста удобен интерфейс IMNSHO :-) )

Връзки за сваляне:

Moeto Toto 2

За версия 3.0 очаквайте функционалност за сваляне на числата от тиражите по интернет + автоматична проверка за печалби.

Custom color buttons for Android (9-patch images + example project)

2011-02-15   

On several occasions I had to create simple buttons that use different background color than the default gray. I've tried to google for already cooked solution but quite surprisingly -- I was unable to find one that suits me so I had to create solution by my self (not really, I just combined other solutions in one easy to use packaged solution).

There are three approaches:

1. First approach (bad) -- just set the background to some color like this

The problems:

a) button does not have rounded edges (and does not fit in the look & feel, i.e. looks alien)

b) does not support changes of the color to indicate focus or pressed state.

2. Second approach (not very good) -- create custom drawable definitions in xml file that use gradients (<gradient>). The problem is that buttons don't look quite the same as default buttons -- edges are not quite with the same roundness, margins and paddings are different. When I first tried to create colored buttons I've tried this approach but after 2-3 hours playing with paddings and roundess I finally gived up.

3. Third approach (the right(eous) one) -- Use different 9-patch images for the different colors.

It works very simple: (more…)