Android look&feel & Android QML controls

BogDan bog_dan_ro at yahoo.com
Mon Apr 16 08:54:11 UTC 2012


+ necessitas-devel 



----- Original Message -----
> From: Aleix Pol <aleixpol at kde.org>
> To: BogDan <bog_dan_ro at yahoo.com>
> Cc: 
> Sent: Monday, April 16, 2012 4:16 AM
> Subject: Re: Android look&feel & Android QML controls
> 
> On Sat, Apr 14, 2012 at 7:20 PM, BogDan <bog_dan_ro at yahoo.com> wrote:
>>  Hello everyone,
>> 
>>    Android look&feel is one of the most important milestones for this
>>  project, for several months I struggle to create a style plugin for 
> Android,
>> 
>>  I manage to create the support for a few classic widgets.Then I start to
>>  investigate how to reuse the work also for QML controls.
>> 
>>  So we need QML controls which look&feel the same a native Android
>>  controls !  Android controls needs complex drawings and requires
>>  lots of informations e.g. fonts, colors, padding, sizes, states,etc.
>> 
>>  All these attributes are oem,device and android version specific,
>>  e.g. HTC devices are shipped with a different theme than Samsung
>>  devices, but a HTC devices with android 2.2 have different theme than
>>  devices with a android 4.0 (I also seen two different Samsung devices
>>  with the same Android version (2.3) and they have completely different
>>  themes), that's why I'm extracting the theme informations on every
>>  device, and that's why we can't have any predefined images, fonts,
>>  colors, etc. We must *READ* and *USE* these informations on every
>>  device !
>> 
>>  My first instinct was to mix MeeGo/Symbian QML controls [1] with
>>  Desktop QML controls [2], but I've face a strong resistance from some
>>  people, most probably because they misunderstood me ... it seems
>>  they understood that I want desktop QML controls on Android, which
>>  is not true !
>>  I don't want to have desktop widgets on Android :) !
>>  I want *Android* like widgets on Android ! Not desktop widgets, Not
>>  MeeGo widgets! Not symbian  widgets !
>>  I want an application made in Qt to have the *SAME* look&feel with any
>>  application made using Android SDK !
>> 
>> 
>> 
>>  I raised this problem on qt-project mailing list [3], which end up in
>>  a forum thread [4].
>> 
>>  I'm open to any suggestion and collaboration !
>> 
>> 
>>  Cheers,
>>  BogDan.
>> 
>>  P.S. We've had lots discussions on this matter on this mailing list.
>> 
>>  [1] https://qt.gitorious.org/qt-components/qt-components
>>  [2] https://qt.gitorious.org/qt-components/desktop
>>  [3] 
> http://lists.qt-project.org/pipermail/development/2012-April/003042.html
>>  [4] http://qt-project.org/forums/viewthread/16341/
>> 
> 
> Hi!
> Thanks for taking the time to answer to this :).
> 
> First of all, considering that you've already been working in such
> QStyle for Android (huge work, thanks :P) considering the desktop
> components for a start wouldn't be such a bad idea. In any case it's
> interesting because it doesn't force us to change anything (if the
> QWidget applications work, which I think they do, correct me if I'm
> mistaken). Also it would be interesting if we could have the correct
> information exposed. For example, there's an interesting qml element
> called SystemPalette used to retrieve system colors. I've tried it on
> my Android device and it's not giving me dark colors like most Android
> applications.
> 

SystemPalette could not work because that information was not available
until now, please it again with the style plugin I published in this list.

>
> Android is a weird platform though, I'm not very experienced in it,
> but seeing my applications (on android 2.3), none of them look the
> same.

:) Android has one of the most simple and powerful theme manager 
I ever seen. Is that good and easy that almost anybody can change
its application look extremely easy.

> Some applications even ask you what should they look like, so in
> this regard maybe it would be interesting to have a components set
> that adheres the ICS design guidelines [1] and expect it to just look
> newer on older devices. In any case, this work alone will be _a lot_
> of effort, since we cannot ask Android to paint the stuff, so we need
> to do it ourselves (no?). 

Android *has* a default style on every version, but because is that simple
and powerful most of the devs prefer to change it. Our duty is to
support the default look&feel  which is not that hard to support it, 
most of the hard work is done, the extraction of the theme attributes was
by far one of the hardest part, using that info to draw the controls is not
that hard.

> Anyhow, today I've seen this blog post on
> the Planet KDE [2] regarding QML styling, if we decided to do our
> thing, it would be worth looking into this, probably. In any case, it
> still shows that we probably want to keep working on the style, as
> long as it can be re-used on Qt5.
> 

Unbelievable ! I started the whole thing a few days ago and it seems 
somebody is already working on this problem. I'll contact these guys to 
see if they want too collaborate with us, I have some concerns on their
approach, I hope they are flexible and open enough to some suggestions :).

I'll keep you (all) post with the progress.

>
> I hope that helped!

Yes, it helped ! Thanks !

> Aleix
> 
> [1] http://developer.android.com/design/style/themes.html
> [2] 
> http://codecereal.blogspot.com.es/2012/04/qml-themingstyling.html#comment-form
>

Cheers,
BogDan.


More information about the Necessitas-devel mailing list