new widget - Panel

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

Postby pskink » Fri Jan 23, 2009 5:25 pm

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
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top

Postby pskink » Fri Jan 23, 2009 8:11 pm

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
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Sat Jan 24, 2009 12:35 am

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...
Attachments
Panel.tar.gz
v 0.13
(75.19 KiB) Downloaded 142 times
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Sun Jan 25, 2009 3:36 pm

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?
Attachments
Panel.tar.gz
v 0.14 with weight attribute (currently broken in some situations)
(75.73 KiB) Downloaded 90 times
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby pskink » Mon Jan 26, 2009 2:13 pm

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 :)
Attachments
Panel.tar.gz
v 0.15 fixed weight attribute
(75.88 KiB) Downloaded 170 times
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby avolovoy » Tue Jan 27, 2009 8:10 pm

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
User avatar
avolovoy
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Nov 03, 2008 10:32 pm
Location: kansas

Top

Postby srajpal » Tue Jan 27, 2009 9:48 pm

can someone give or point to a tutorial on how to implement this in my own code?
--
Sunny
srajpal
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jan 09, 2009 7:48 pm

Postby pskink » Wed Jan 28, 2009 3:00 pm

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
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby avolovoy » Wed Jan 28, 2009 4:27 pm

Thanks ! A Lot ..
Alexey Volovoy
Bytesharp.NET
User avatar
avolovoy
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Nov 03, 2008 10:32 pm
Location: kansas

Postby pskink » Wed Jan 28, 2009 8:12 pm

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
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby avolovoy » Wed Jan 28, 2009 11:09 pm

What's the license on the panel ? BSD ?
Alexey Volovoy
Bytesharp.NET
User avatar
avolovoy
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Nov 03, 2008 10:32 pm
Location: kansas

Postby pskink » Wed Jan 28, 2009 11:20 pm

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
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby avolovoy » Wed Jan 28, 2009 11:30 pm

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
User avatar
avolovoy
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Nov 03, 2008 10:32 pm
Location: kansas

Postby pskink » Wed Jan 28, 2009 11:40 pm

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
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby MrSnowflake » Thu Jan 29, 2009 10:32 am

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 ;) 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 :). The BSD (style) licence is only a couple of lines long.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top
PreviousNext

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests