Home sweet Home

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

Postby MrSnowflake » Tue Mar 17, 2009 5:05 pm

Sorry, crashes here too! Never seen that exception before, normally I find some app from the package com.DeepFrozen.android :D.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Postby pskink » Tue Mar 17, 2009 6:01 pm

MrSnowflake wrote:Sorry, crashes here too! Never seen that exception before, normally I find some app from the package com.DeepFrozen.android :D.


heck!

i verifid that it comes from GridView that is a child of left Panel (Applications).

after removing that Panel it works fine... it makes me nuts...

you have sdk 1.0? mine is 1.1.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Tue Mar 17, 2009 7:03 pm

1.0
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Tue Mar 17, 2009 7:45 pm

MrSnowflake wrote:Sorry, crashes here too! Never seen that exception before, normally I find some app from the package com.DeepFrozen.android :D.


ok found it.

but i think it can be droid's bug :(

consider the simplest layout:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout
  3.         xmlns:android="http://schemas.android.com/apk/res/android"
  4.    android:layout_width="fill_parent"
  5.    android:layout_height="fill_parent"
  6.    android:orientation="vertical"
  7. >
  8.  
  9.         <LinearLayout
  10.             android:layout_width="fill_parent"
  11.             android:layout_height="wrap_content"
  12.             android:orientation="horizontal"
  13.             android:id="@+id/layout0"
  14.         >
  15.                 <Button
  16.                     android:layout_width="fill_parent"
  17.                     android:layout_height="wrap_content"
  18.                     android:id="@+id/child0"
  19.                 />
  20.         </LinearLayout>
  21.  
  22.         <LinearLayout
  23.             android:layout_width="fill_parent"
  24.             android:layout_height="wrap_content"
  25.             android:orientation="horizontal"
  26.             android:id="@+id/layout1"
  27.         >
  28.                 <ListView
  29.                     android:layout_width="fill_parent"
  30.                     android:layout_height="wrap_content"
  31.                     android:id="@+id/child0"
  32.                 />
  33.         </LinearLayout>
  34.  
  35. </LinearLayout>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


here we heve two horizontal layouts. each has one child with id: child0
its OK, we can acces them by layout0.findViewById(child0) and layout1.findViewById(child0)

but... it crashes the same way my Home

if you change child0 to child1 everything seems to be working...

really, really weird

did i miss something?
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Tue Mar 17, 2009 8:01 pm

I guess not, post a bug report and see what happens! It's a pretty shady error, so I guess not many people have seen it before.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Tue Mar 17, 2009 8:51 pm

MrSnowflake wrote:I guess not, post a bug report and see what happens! It's a pretty shady error, so I guess not many people have seen it before.


i posted that problem on android-developers ggroup

Romain Guy answered they fixed it in Cupcake ;)

see http://groups.google.com/group/android- ... e0553f92a1
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top

Postby pskink » Wed Mar 18, 2009 12:12 am

added support for orientation change.

btw: when i override View.onSave/onRestoreInstanceState do i really have to create my own class extending BaseSavedState with so ugly CREATOR???

cannot it be done in some more smart way?

or can i use Activity.onSave/onRestoreInstanceState for that purpose which has more handy Bundle for storing data?
Last edited by pskink on Sat Mar 21, 2009 12:29 pm, edited 2 times in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Wed Mar 18, 2009 5:32 pm

hi,

added basic support for wallpapers.

i really like Wallpaper_Beach (night beach)

also optimized a bit painting
Last edited by pskink on Sat Mar 21, 2009 12:29 pm, edited 3 times in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Wed Mar 18, 2009 8:27 pm

pskink wrote:added support for orientation change.

btw: when i override View.onSave/onRestoreInstanceState do i really have to create my own class extending BaseSavedState with so ugly CREATOR???

cannot it be done in some more smart way?

or can i use Activity.onSave/onRestoreInstanceState for that purpose which has more handy Bundle for storing data?
If you implement the View stuff it will save when you reuse the Views in another project.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Wed Mar 18, 2009 8:42 pm

MrSnowflake wrote:If you implement the View stuff it will save when you reuse the Views in another project.


yes, i know, i know...

but the concept with that odd CREATORS is imho somhow overcomplicated...

even if it has to support inheritance it should be easier...
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Fri Mar 20, 2009 10:51 am

hi,

added page thumbnails when scrolling longer than one second

it shows all pages thumbnails, current window frame and target page, try it out!
Last edited by pskink on Sat Mar 21, 2009 12:28 pm, edited 1 time in total.
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Fri Mar 20, 2009 9:54 pm

hi,

added basic support for custom widgets!.

source contains 2 projects: SkinkHome & SkinkHomeWidgets (3 sample widgets)

i didn't yet check how resources suffer when embedding several activities: will do it in spare time :D
Attachments
Home.tar.gz
(71.95 KiB) Downloaded 47 times
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Thu Mar 26, 2009 12:42 am

pskink wrote:hi,

added basic support for custom widgets!.

source contains 2 projects: SkinkHome & SkinkHomeWidgets (3 sample widgets)

i didn't yet check how resources suffer when embedding several activities: will do it in spare time :D


fyi,

added UI support for adding/moving/deleting custom widgets.

when on some custom widgets page (one of three) perform long press to pop-up dialog with actions.

any comment about this UI welcome

when it comes to creating custom widgets they are like normal activities: everything what is needed by Home application is Manifest file. e.g.:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.      package="org.skink.homewidgets"
  4.      android:versionCode="1"
  5.      android:versionName="1.0.1"
  6.      android:sharedUserId="org.skink.home">
  7.     <application android:icon="@drawable/skink" android:label="@string/app_name">
  8.             <activity android:name=".SampleTestActivity" android:label="Test Widget">
  9.                 <intent-filter>
  10.                                 <action android:name="org.skink.home.intent.WIDGET"></action>
  11.                         </intent-filter>
  12.                         <meta-data android:name="cellWidth" android:value="3" />
  13.                         <meta-data android:name="cellHeight" android:value="1" />
  14.                 </activity>
  15.             <activity android:name=".SampleSendActivity" android:label="Sender Widget" android:icon="@drawable/send">
  16.                 <intent-filter>
  17.                                 <action android:name="org.skink.home.intent.WIDGET"></action>
  18.                         </intent-filter>
  19.                         <meta-data android:name="cellWidth" android:value="1" />
  20.                         <meta-data android:name="cellHeight" android:value="1" />
  21.             </activity>
  22.             <activity android:name=".SampleReceiveActivity" android:label="Receiver Widget" android:icon="@drawable/recv">
  23.                 <intent-filter>
  24.                                 <action android:name="org.skink.home.intent.WIDGET"></action>
  25.                         </intent-filter>
  26.                         <meta-data android:name="cellWidth" android:value="2" />
  27.                         <meta-data android:name="cellHeight" android:value="1" />
  28.             </activity>
  29.     </application>
  30. </manifest>
Parsed in 0.006 seconds, using GeSHi 1.0.8.4


important parts are:

android:sharedUserId="org.skink.home" in manifest tag

and

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.         <intent-filter>
  2.                 <action android:name="org.skink.home.intent.WIDGET"></action>
  3.         </intent-filter>
  4.         <meta-data android:name="cellWidth" android:value="3" />
  5.         <meta-data android:name="cellHeight" android:value="1" />
  6.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4

in each activity tag. intent filters describes actions that will be queried by Home app and two mete-datas define widgets
width and height in cells
Attachments
Home.tar.gz
(87.75 KiB) Downloaded 53 times
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Fri Mar 27, 2009 3:26 pm

Looks great (and thanks for the PM, notifying me, I was stuck in wait() :D, and I had exams and a lot of work for school... :( ).

I decided not to investigate the resource difference between webview and activities, because I read somewhere (it was in a post about the live folders) that the cupcake home had basic support for widgets, so implementing a system for widgets ourself seems pretty wastefull when Google does release it's own widget support. I just wish they released already, so you could to implement the Google Widget system, which would be sweetness :).
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby pskink » Fri Mar 27, 2009 3:44 pm

MrSnowflake wrote:Looks great (and thanks for the PM, notifying me, I was stuck in wait() :D, and I had exams and a lot of work for school... :( ).

I decided not to investigate the resource difference between webview and activities, because I read somewhere (it was in a post about the live folders) that the cupcake home had basic support for widgets, so implementing a system for widgets ourself seems pretty wastefull when Google does release it's own widget support. I just wish they released already, so you could to implement the Google Widget system, which would be sweetness :).


i hope they will release their widgets as normal activities launched by localActivityManager just i did (i think its the most obvious solution) so it won't be difficult to integrate with them...
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top
Previous

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests