FRUSTRO typeface

Posted by Unknown Senin, 26 Maret 2012 0 komentar
Today I've met one very interesting typeface. Its name FRUSTRO and it was created by designer Martzi Hegedűs with an idea of impossible objects in mind.
Impossible objects from Wikipedia:
An impossible object (also known as an impossible figure or an undecidable figure) is a type of optical illusion consisting of a two-dimensional figure which is instantly and subconsciously interpreted by the visual system as representing a projectionof a three-dimensional object although it is not geometrically possible for such an object to exist (at least not in the form interpreted by the visual system).
In most cases the impossibility becomes apparent after viewing the figure for a few seconds. However, the initial impression of a 3D object remains even after it has been contradicted. There are also more subtle examples of impossible objects where the impossibility does not become apparent spontaneously and it is necessary to consciously examine the geometry of the implied object to determine that it is impossible.


Do not hurry, find a moment to scan every FRUSTRO letter!


Baca Selengkapnya ....

Android: possible issues & solutions with configuration changes, part 2

Posted by Unknown Senin, 05 Maret 2012 0 komentar
Hello! Last time I was quite busy by creation of very cool and dynamic Android application for one of the world's largest mobile telecommunications company.
That is why the second part of the article about possible issues & solutions with configuration changes is coming only now. To be familiar with the topic I recommend you to read the first part of this article.

And now I want to share with you my solution for the mentioned topic. It's easy to use and it solves the task! This solution was evoked by Adobe Flex event model. As you may know I have extensive experience with Adobe Flex (it's Adobe's framework for creating Rich Internet Application). And one of the coolest Adobe Flex feature is its powerful event model. In general all Adobe Flex is event-driven, which gives us the perfect environment for creating loosely coupled components and system.

The same approach I wanted to apply in Android development.
The core idea of my solution is to have some kind of event bus:


















Ah no, not like this! I am joking! :D
The event bus we will have can be used to post results and subscribe to results of some specified event type. Thereby we will have loosely coupled system: components can notify and be notified by other components even without knowledge about each other.

So, let's take a look at this approach by example.
Imagine the common situation: you should make some work in the background thread. When a background task is completed you want to notify the caller about it.
How do we handle it with the suggested solution? Fairly simple!
1) define some event name, e.g. STOCKS_UPDATED
2) add a listener (which is a realization of EventCallback interface) to that event:
EventBus.subscribe(STOCKS_UPDATED, stocksCallback);
3)just post the result from the background task, when you want to notify listeners about some events (e.g. in onPostExecute method of some AsyncTask):
EventBus.postResult(STOCKS_UPDATED, result);
That's all! As you can see you can wire up your application components with minimum lines of code in an easy and reliable way!

Few notes:
a) you can add as many event listeners as you want
b) if you don't need listener anymore, just remove it:
EventBus.unsubscribe(STOCKS_UPDATED, mStocksCallback);
c) BaseEventResult is a base class for events results. It already has status and data fields.
If needed you can extend it to carry any kind of data you like. Or just subclass BaseEventResult to more specifiс event results (e.g. StockResult, BondResult, etc.)
d) if you keep event listeners as an Activity fields, then, as you already know, they will be destroyed with Activity itself when configuration changes occurs. To handle it: just add a listener at onResume and remove it at onPause.
@Override
protected void onResume() {
super.onResume();
EventBus.subscribe(STOCKS_UPDATED, mStocksCallback);
}

@Override
protected void onPause() {
EventBus.unsubscribe(STOCKS_UPDATED, mStocksCallback);
super.onPause();
}


I've prepared a sample project that demonstrates usage of my EventBus solution. You can download it here.

While this approach may be not perfect, I think it is quite good, because of it covers most of the common issues with configuration changes. Also it's very easy to use and highly extensible! Feel free to use it or share your thoughts about it with me! ;-)


Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android illegal.