andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

new widget - Panel

Goto page Previous  1, 2, 3, 4, 5  Next
 
       anddev.org - Android Development Community | Android Tutorials | Index -> View, Layout & Resource Problems
Author Message
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Fri Jan 23, 2009 5:25 pm    Post subject: Reply with quote

darolla wrote:
well, mate, thanks for the response, but you are wrong.

the animation is concurrent, so only in case of a very fast animation you can do both steps after each other (setVisibility(GONE); startAnimation(fade-out))

greetings,
darolla


ok, you are right when it comes to GONE & fade-out, however the opposite should work without listener: VISIBLE & fade-in even for 5000 ms animation

_________________
pskink
Back to top
View user's profile Send private message
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Fri Jan 23, 2009 8:11 pm    Post subject: Reply with quote

pskink wrote:


ok, you are right when it comes to GONE & fade-out, however the opposite should work without listener: VISIBLE & fade-in even for 5000 ms animation


i think this is because GONE completely hides view from the screen (setting its bounds to [0, 0]) but in other animations you can live without listener e.g. when using translate, rotate or alpha.

_________________
pskink
Back to top
View user's profile Send private message
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Sat Jan 24, 2009 12:35 am    Post subject: Reply with quote

wow!

guys, look at this! thanks Emmanuel7 for inspiration ;)

this is how i did it (right-top panel):

<Button
android:id="@id/panelHandle"
android:layout_width="33dip"
android:layout_height="wrap_content"
android:layout_marginTop="-110dip"
android:layout_gravity="center"
/>

i know, i know: this is weird, stupid & ugly, thats why i'm lokking for better solution...

_________________
pskink
Back to top
View user's profile Send private message
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Sun Jan 25, 2009 3:36 pm    Post subject: Reply with quote

hi,

introduced new attribute weight: it should force content's size relative to parent

it's used in right-center and right-bottom panel

panel:weight="100%p"
panel:weight="75%p"

however my implementation uses setMinimumWidth/Height() which is ok when using 100%p but when using for example 75%p it can work not as expected: if panel has for example TextView with very long text the panel extends beyound 75%

i cannot find out a way how to force fixed size, any suggestions?

_________________
pskink
Back to top
View user's profile Send private message
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Mon Jan 26, 2009 2:13 pm    Post subject: Reply with quote

pskink wrote:
hi,

introduced new attribute weight

however my implementation uses setMinimumWidth/Height() which is ok when using 100%p but when using for example 75%p it can work not as expected: if panel has for example TextView with very long text the panel extends beyound 75%

i cannot find out a way how to force fixed size, any suggestions?


ok, managed to fix it in onMeasure method :)

_________________
pskink
Back to top
View user's profile Send private message
avolovoy
Experienced Developer
Experienced Developer


Joined: 03 Nov 2008
Posts: 68
Location: kansas

PostPosted: Tue Jan 27, 2009 8:10 pm    Post subject: Reply with quote

pskink wrote:
avolovoy wrote:
Really really cool stuff . Can i make a suggestion ? Since i see couple of people working on this here may be it's good idea to move it to a project on code.google.com ? It'll ve SVN accessible which is good . Really awesome job though


Aleksiej,

are you reffering to some existing google project or to new one?

I'm suggesting create a new space at code.google.com/p name it like andWidgets or whatever and after that we can all use it and contribute . It'll be just a bit easier to maintain the code.

_________________
Alexey Volovoy
Bytesharp.NET
Back to top
View user's profile Send private message Visit poster's website
srajpal
Junior Developer
Junior Developer


Joined: 09 Jan 2009
Posts: 17

PostPosted: Tue Jan 27, 2009 9:48 pm    Post subject: Reply with quote

can someone give or point to a tutorial on how to implement this in my own code?
_________________
--
Sunny
Back to top
View user's profile Send private message AIM Address
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Wed Jan 28, 2009 3:00 pm    Post subject: Reply with quote

avolovoy wrote:

I'm suggesting create a new space at code.google.com/p name it like andWidgets or whatever and after that we can all use it and contribute . It'll be just a bit easier to maintain the code.


Aleksiej and all,

created http://code.google.com/p/android-misc-widgets project (hope there will be more than one widget here). i'll submit files to svn today

thanks

_________________
pskink
Back to top
View user's profile Send private message
avolovoy
Experienced Developer
Experienced Developer


Joined: 03 Nov 2008
Posts: 68
Location: kansas

PostPosted: Wed Jan 28, 2009 4:27 pm    Post subject: Reply with quote

Thanks ! A Lot ..
_________________
Alexey Volovoy
Bytesharp.NET
Back to top
View user's profile Send private message Visit poster's website
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Wed Jan 28, 2009 8:12 pm    Post subject: Reply with quote

avolovoy wrote:
Thanks ! A Lot ..


you are welcome...

all the files are now in svn and from now everything will be commited there.

thanks

_________________
pskink
Back to top
View user's profile Send private message
avolovoy
Experienced Developer
Experienced Developer


Joined: 03 Nov 2008
Posts: 68
Location: kansas

PostPosted: Wed Jan 28, 2009 11:09 pm    Post subject: Reply with quote

What's the license on the panel ? BSD ?
_________________
Alexey Volovoy
Bytesharp.NET
Back to top
View user's profile Send private message Visit poster's website
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Wed Jan 28, 2009 11:20 pm    Post subject: Reply with quote

avolovoy wrote:
What's the license on the panel ? BSD ?


the project i created is under apache 2.

what is more liberal: apache 2 or bsd?

i wanted it to be as free as possible.

_________________
pskink
Back to top
View user's profile Send private message
avolovoy
Experienced Developer
Experienced Developer


Joined: 03 Nov 2008
Posts: 68
Location: kansas

PostPosted: Wed Jan 28, 2009 11:30 pm    Post subject: Reply with quote

http://sam.zoy.org/wtfpl/
i don't know how legit it is but i've seen in the blog of the guy who works on mono on android ( search my brain hurts blog )

_________________
Alexey Volovoy
Bytesharp.NET
Back to top
View user's profile Send private message Visit poster's website
pskink
Master Developer
Master Developer


Joined: 24 Nov 2008
Posts: 336

PostPosted: Wed Jan 28, 2009 11:40 pm    Post subject: Reply with quote

avolovoy wrote:
http://sam.zoy.org/wtfpl/
i don't know how legit it is but i've seen in the blog of the guy who works on mono on android ( search my brain hurts blog )


i have never seen wtfpl ;) nice license.

unfortunatelly google code doesn't have it on their license list...

_________________
pskink
Back to top
View user's profile Send private message
MrSnowflake
Moderator
Moderator


Joined: 16 Feb 2008
Posts: 1437
Location: Flanders, Belgium

PostPosted: Thu Jan 29, 2009 10:32 am    Post subject: Reply with quote

pskink wrote:
avolovoy wrote:
http://sam.zoy.org/wtfpl/
i don't know how legit it is but i've seen in the blog of the guy who works on mono on android ( search my brain hurts blog )


i have never seen wtfpl Wink nice license.

unfortunatelly google code doesn't have it on their license list...
To bad, but you could use a BSD style licence, it has a lot in common with the WTFPL, exect it asks the user to leave your name in it, that's it!
Oh and I believe BSD is a lot more liberal than Apache. I have never read the apache licence, but as it's a lot bigger than BSD's it can only be more strickt Smile. The BSD (style) licence is only a couple of lines long.
Back to top
View user's profile Send private message
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> View, Layout & Resource Problems All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.