Home sweet Home

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Home sweet Home

Postby pskink » Sat Mar 14, 2009 1:34 pm

hi,

i'm not sure whether this post should be in this part of forum, but, hey i couldn't find better place...

after couple of days of work created simple and basic template for own Home applications: it has couple of virtual pages (2 x 3 in my case), partially implemented Today page, and ability to switch between pages: by touch events, by dpad/focus traversal and by system menu panel.

everything made with (at least I hope) nice ui experience...

also created system menu panel for running applications.

system menu panels are Panels widgets I created some time ago.

the main virtual desktop is HomeView class and clearly demonstrates how to deal with children (individdual pages), Scrollers, Interpolators and Handlers.

there is also one sample page showing how to add additional pages.

have a fun and nice hacking/analysing ;)

p.s. for convenience reason it doesn't have any setting in manifest to be real Home app - anyone could easly find how to do it ;)
Attachments
Home.tar.gz
(87.75 KiB) Downloaded 79 times
home.png
Pages panel in action
home.png (37.05 KiB) Viewed 1154 times
Last edited by pskink on Thu Mar 26, 2009 12:48 am, edited 10 times in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top

Postby MrSnowflake » Sat Mar 14, 2009 9:21 pm

Thanks for sharing mate.

I was thinking, with Google, not supporting widgets en dxTop supporting widgets, but being non-free, we might need to put our heads together to make our own library for making widgets. A more generic library for widgets would make it easier to support them in custom home apps and probably make it so that there are a lot more widgets (especially compared to dxTop, which probably won't get that much widgets). And (to come back to topic) that would neatly fit in your home!
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Sun Mar 15, 2009 12:44 am

MrSnowflake wrote:Thanks for sharing mate.

I was thinking, with Google, not supporting widgets en dxTop supporting widgets, but being non-free, we might need to put our heads together to make our own library for making widgets. A more generic library for widgets would make it easier to support them in custom home apps and probably make it so that there are a lot more widgets (especially compared to dxTop, which probably won't get that much widgets). And (to come back to topic) that would neatly fit in your home!


hi,

i made my Home 2 x 3 pages where top 3 ones would be for pages like Today, gSearch, placing fav apps and bottom 3 for custom widgets ;)
but i don't really have no clear idea about interface how custom widgets would be implemented (maybe LocalActivityManager could help here?)

what do you think?

in the meantime i added some functionality to my Today page so only weather feature is void (though since i wanted to make it fast its a bit complicated), see screenshot
Attachments
today.png
today.png (34.56 KiB) Viewed 1117 times
Last edited by pskink on Sat Mar 21, 2009 12:31 pm, edited 4 times in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Sun Mar 15, 2009 12:49 am

There are a couple of ways to go about this.

dxTop does it with Activities, so each widget is an Activity, but that might be pretty hard on resources.
What might be better, but a lot more work, is making widgets run in a WebView and we define and design an interface between the widgets javascript and Android. But that would require a lot of work, though it should be easier on resources and a lot more secure, because we have controle about what the widgets are allowed to do.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Sun Mar 15, 2009 1:04 am

MrSnowflake wrote:There are a couple of ways to go about this.

dxTop does it with Activities, so each widget is an Activity, but that might be pretty hard on resources.
What might be better, but a lot more work, is making widgets run in a WebView and we define and design an interface between the widgets javascript and Android. But that would require a lot of work, though it should be easier on resources and a lot more secure, because we have controle about what the widgets are allowed to do.


to be honest you killed me ;)

widgets run in a WebView? can you shed some light since maybe its too late and i'm overtired but i dont
understand the idea...
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Sun Mar 15, 2009 11:43 am

Well, make up widgets from html and javascript. Then we provide some extra javascript-android bindings, so widget writers have more functionality at their disposal.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Postby pskink » Sun Mar 15, 2009 12:04 pm

MrSnowflake wrote:Well, make up widgets from html and javascript. Then we provide some extra javascript-android bindings, so widget writers have more functionality at their disposal.


ok,

now i got it, something Palm Pre is doing: there every app is web-based one.

but:
1. it would dramatically limit ui experience
2. wrapping every widget around WebView would also waste much resources - safari is not light after all...

maybe yet try to test LocalActivityManager and see how it works/waste resources/doesnt work at all?

what do you think?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Sun Mar 15, 2009 12:29 pm

That would also work, but that has 2 problems:
1) I think starting (and running) an Activity uses much more resources than a WebView
2) There is a lot less security restrictions possible.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Sun Mar 15, 2009 12:47 pm

MrSnowflake wrote:That would also work, but that has 2 problems:
1) I think starting (and running) an Activity uses much more resources than a WebView
2) There is a lot less security restrictions possible.


agree that some kind of sandbox would be much better when it comes to security issues, so what next? did you already try to play with WebWiew as an app container?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Sun Mar 15, 2009 12:59 pm

and when it comes to LocalActivityManager (i'm not expert in Activities though) i heard somewhere that:

1. many Activities can be served by one phisicall process

2. that process can be different that Home process so security issues also can be resolved by specifing appropriate permissions (something like sandbox)
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Sun Mar 15, 2009 1:05 pm

haven't played with any of those yet, I don't have much time, I have a lot to do for school. Though when I have time, I'll try to make some comparisons between WebView and ActivityGroup.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Sun Mar 15, 2009 1:33 pm

MrSnowflake wrote:haven't played with any of those yet, I don't have much time, I have a lot to do for school. Though when I have time, I'll try to make some comparisons between WebView and ActivityGroup.


great!

i found out a while ago that ActivityGroup can embedd only Activities with the same uid, and it requires the same key when signing: it can be problem here - but maybe i know too little about signing...

pls, let me know when you have some results
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Sun Mar 15, 2009 2:12 pm

pskink wrote:i found out a while ago that ActivityGroup can embedd only Activities with the same uid, and it requires the same key when signing: it can be problem here - but maybe i know too little about signing...

pls, let me know when you have some results
Thanks, you might have saved me a couple of hours being frustrated :). I'll let you know the results.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Mon Mar 16, 2009 7:17 pm

fyi: improved touch page scrolling.

now its acceptable to press on buttons in order to scroll to orher page
Last edited by pskink on Sat Mar 21, 2009 12:31 pm, edited 2 times in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Tue Mar 17, 2009 2:15 pm

hi,

i tried to support orientation change but faced strange exception when trying ctrl-F12

it seems that GridView's (or rather AbsListView's) onRestoreInstanceState is throwing ClassCastException and i have no idea why (i didn't override any onSaveInstanceState/onRestoreInstanceState yet).

maybe its my emulator that works that way, so can please anyone verify that?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top
Next

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 12 guests