воскресенье, 30 ноября 2008 г.

ON HOLD

This project is on hold.

If you want to help with it's development, write me.

среда, 29 октября 2008 г.

Yes!

Here you can see decor view containing simple layout with two buttons. I moved focus to last button with d-pad.

вторник, 28 октября 2008 г.

Views & Windows

Finally, I sorted out relations between View, IWindow (and other IWindow* interfaces) and Window.
Assorted facts:
  • Window (and its descendant, PhoneWindow) is just fancy way to control decor view of main 'window'. Decor view consists of title, progress, frame, etc.
  • IWindow, despite its apparent relation to Window, has nothing to do with it. It is (IPC) callback from WindowManagerService (accessible via IWindowManager/IWindowSession).
  • IWindow is used in ViewRoot (which is a hidden class implementing ViewParent). It is ViewRoot, not Window, that receives key events and draws views.
  • When activity starts it creates Window, loads appropriate decor view, and adds decor view to WindowManagerService (via WindowManager).
  • WindowManager. Uh oh. Not related to IWindowManager. Despite being ViewManager descendant, expects WindowManager.LayoutAttributes as parameters to its methods. WindowManager creates ViewRoot for each added view. ViewRoot communicates with WindowManagerService and adds new 'window' to it.
  • You can add your own top-level view (see Toast widget code).
I think windowing part of Android is a total mess. They should have named classes more carefully.

And it gets even worse for me, as I need to name a class which is neither Window, nor IWindow, nor View. This class will be *real* window, much like WindowManagerService.WindowState. It named ViewRoot2 for now :)

вторник, 21 октября 2008 г.

Source release!

Citizens celebrate - Google released Android's source!
The only problem is that you can get it all only on Linux and Mac OS. Well, thanks to Web interface, I can write some simple downloader and finally start putting it all together.

No more decompiled sources - what a joy!

четверг, 16 октября 2008 г.

Slowdown...

Well, for the past week I was busy on my work and other activities.
I finished Resources.Theme, and now I'm working on inflating layouts.
Expect screenshots soon!

четверг, 9 октября 2008 г.

AXMLPrinter2

I've updated AXMLPrinter to version 2.
Now it uses current AXmlResourceParser, correctly handles namespaces (previous version had 1 hardcoded namespace) and formats attributes. So no more <0xxxxx>, now it is @7F060003, or 26.0sp, or #FF000000, etc.

понедельник, 6 октября 2008 г.

Region.Op explained

Here is what different Region.Op modes mean when used like this:
canvas.clipRect(r1,Region.Op.REPLACE); canvas.clipRect(r2,Region.Op.XXX);
canvas.drawColor(0xFF000080);
And when rectangles do not intersect:

Android4ME will support only REPLACE and INTERSECT.