| Author |
Message |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Wed Jan 21, 2009 11:24 am Post subject: |
|
|
| Emmanuel7 wrote: | Waoo !!
I must admit I don't really see what is missing now in order to make it a real v1.0 version.
|
see 3 TODOs in Panel.java, last two are minor, but the first one imho should be fixed somehow, but i dont know how...
| Emmanuel7 wrote: | Waoo !!
Two little points :
* First :
There is a bug ! when you drag the handle to have the panel fully expanded ( and pass the limit ), if you release the click button, the panel will instantly close itself. I changed the line 318 :
| Java: | if (calculatedDuration == 0 ) {
|
into
| Java: | if (calculatedDuration == 0 && mIsShrinking) {
|
And it looks like the problem is fixed !
(it's in the startAnimation runnable )
|
you were VERY close, but i think we should really avoid animation when calculatedDuration == 0 so:
| Java: |
if (calculatedDuration == 0) {
mState = State.READY;
if (mIsShrinking) {
mContent.setVisibility(GONE);
}
return;
}
|
| Emmanuel7 wrote: | *Second point :
I added another layout for you to test, to show something cool that perhaps you didn't think about :
You can have several panel on the same side !!!
And I think you should still add some functions to open / close the panel, both with and without the animation, from outside code.( but it should be something like 4 lines of code from what I have seen )
Really a nice thread :) |
big thanks for new layout! i added it as default
added also isOpen and setOpen methods: setOpen is little longer than 4 lines but still small ;) _________________ pskink
Last edited by pskink on Thu Jan 22, 2009 8:35 pm; edited 1 time in total |
|
| Back to top |
|
 |
|
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Wed Jan 21, 2009 11:29 am Post subject: |
|
|
| darolla wrote: | it's really nice ;)
I've found a little bug: open the bottom widget, and try to hit the checkbox. the left widget is opened :( so the checkbox is unreachable...
btw: this widget isnt a standard widget. alrite. but cant it be found inside the original sources? it has to be there, because its part of android, isnt it???
altough the graphic cant be found in the sdk...
greetings,
darolla |
this is not bug imho: run hierarchyviewer and see panels bounds. handle graphics is invisible on the sides but still belong to it.
graphics are in Launcher.apk on the emulator device _________________ pskink |
|
| Back to top |
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Thu Jan 22, 2009 11:11 am Post subject: |
|
|
hi,
i managed to use GestureDetector in both cases - when panel is closed and opened.
i had to play with MotionEvents a bit before passing them to gesture detector but now it works much better ;) _________________ pskink |
|
| Back to top |
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Thu Jan 22, 2009 9:49 pm Post subject: |
|
|
FYI:
added short movie in the first post of this thread _________________ pskink |
|
| Back to top |
|
 |
MrSnowflake Moderator


Joined: 16 Feb 2008 Posts: 1437 Location: Flanders, Belgium
|
Posted: Thu Jan 22, 2009 10:31 pm Post subject: |
|
|
why do both the top and bottom drawer resize the inner layout and the right drawer doesn't? I don't really like the fact that the inner layout changes shape... But the rest looks awsome  |
|
| Back to top |
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Thu Jan 22, 2009 11:15 pm Post subject: |
|
|
| MrSnowflake wrote: | | why do both the top and bottom drawer resize the inner layout and the right drawer doesn't? I don't really like the fact that the inner layout changes shape... But the rest looks awsome :) |
bcoz top/bottom are 'inlined' panels, while left/right are 'overlayed'
i think that 'inlined' panels can be helpful sometimes, cannot give good examples right now, though... ;) _________________ pskink |
|
| Back to top |
|
 |
|
|
 |
darolla Master Developer


Joined: 25 Sep 2008 Posts: 221 Location: Dortmund, Germany
|
Posted: Fri Jan 23, 2009 12:03 am Post subject: |
|
|
movie is a funny idea  |
|
| Back to top |
|
 |
avolovoy Experienced Developer


Joined: 03 Nov 2008 Posts: 68 Location: kansas
|
Posted: Fri Jan 23, 2009 5:23 am Post subject: |
|
|
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 _________________ Alexey Volovoy
Bytesharp.NET |
|
| Back to top |
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Fri Jan 23, 2009 9:26 am Post subject: |
|
|
| 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? _________________ pskink |
|
| Back to top |
|
 |
darolla Master Developer


Joined: 25 Sep 2008 Posts: 221 Location: Dortmund, Germany
|
Posted: Fri Jan 23, 2009 9:56 am Post subject: |
|
|
hi,
I'd like to animate a tablerow which visibility is is VISIBLE or GONE, and this should be animated (maybe growing just like this panel)
can you maybe give me a starter to the animations?
greetings,
darolla |
|
| Back to top |
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Fri Jan 23, 2009 11:48 am Post subject: |
|
|
| darolla wrote: | hi,
I'd like to animate a tablerow which visibility is is VISIBLE or GONE, and this should be animated (maybe growing just like this panel)
can you maybe give me a starter to the animations?
greetings,
darolla |
hi, as far as i remember i started with http://developerlife.com/tutorials/?p=343 _________________ pskink |
|
| Back to top |
|
 |
darolla Master Developer


Joined: 25 Sep 2008 Posts: 221 Location: Dortmund, Germany
|
Posted: Fri Jan 23, 2009 1:32 pm Post subject: |
|
|
hi pskink,
well, I used my own fading out animation. thats nice so far.
but I've got the problem that after the animation everything is as it was before the animation.
I need to change something AFTER the animation, but I dont know which event?
can u please help me on this?
lets say I have got a button.
when its pressed (onclicklistener) the animation (fadeout) is startet.
then the button has to be visibility = gone.
greetings,
darolla
ps: sorry for using this thread, but u dont read your pms, do you?  |
|
| Back to top |
|
 |
Emmanuel7 Senior Developer

Joined: 12 Dec 2008 Posts: 161 Location: Paris
|
|
| Back to top |
|
 |
pskink Master Developer

Joined: 24 Nov 2008 Posts: 326
|
Posted: Fri Jan 23, 2009 1:57 pm Post subject: |
|
|
| darolla wrote: | hi pskink,
well, I used my own fading out animation. thats nice so far.
but I've got the problem that after the animation everything is as it was before the animation.
I need to change something AFTER the animation, but I dont know which event?
can u please help me on this?
lets say I have got a button.
when its pressed (onclicklistener) the animation (fadeout) is startet.
then the button has to be visibility = gone.
greetings,
darolla
ps: sorry for using this thread, but u dont read your pms, do you? ;) |
pms? sorry i always forget to check it...
for animations: they DONT change any view's attribute - position, visibility, alpha etc.
all you need to do is: set the view state as it would look after animation finishes and then start animation - eg setVisibility(GONE); startAnimation(fade-out)
sometimes you could use animation listener and its methods: start, finish, repeat. _________________ pskink |
|
| Back to top |
|
 |
darolla Master Developer


Joined: 25 Sep 2008 Posts: 221 Location: Dortmund, Germany
|
Posted: Fri Jan 23, 2009 4:04 pm Post subject: |
|
|
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))
it took me some time to find out, but the Animation object has a setAnimationListener, so this way it works nicely.
| Java: |
protected class MyAnimationListener implements AnimationListener {
private LinearLayout ll;
public AusblendenAnimationListener( LinearLayout ll ) {
this.ll = ll;
}
public void onAnimationEnd(Animation animation) {
ll.setVisibility( View.GONE );
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationStart(Animation animation) {
}
}
|
and the button (onclicklistener), which starts all, looks like this:
| Java: |
protected class LoeschenListener implements OnClickListener {
private int id;
public LoeschenListener( int id ) {
this.id = id;
}
public void onClick(View v) {
LinearLayout ll = (LinearLayout) findViewById( id );
Animation anim = AnimationUtils.loadAnimation(MyClass.this, R.anim.fade_away);
anim.setAnimationListener( new MyAnimationListener( ll ) );
ll.startAnimation(anim);
// this definitly doesn't work here !!!
// ll.setVisibility( View.GONE );
}
}
|
greetings,
darolla |
|
| Back to top |
|
 |
|