last day (14 days later) » 

11:49 AM
0
Q: RelativeLayout child top is coming as zero

Techfistam facing a strange problem, I have generated my layout file using RelativeLayout. however while reading top of one of the child's present in it is being returned as zero,which is causing my whole animation logic go for toss. My idea is to animate them from bottom of screen, to there initial pos...

 
use INVISIBLE insted GONE n try ...
 
sure let me try !!
Nopes it didn't worked still top is coming as zero @MSGadag
 
k n sry im not gettin you...
 
Basically it didn't worked, even by setting visibility to INVISIBLE top of view(R.id.view_twitter, that twitter circle in screenshot) is being returned to ZERO only.
 
animation is working rite but end of the animation ur ui is disterbed rite?
 
11:49 AM
Hi
 
hi
 
yes animation is working absolutely fine
but, as view top is being returned as 0
after animation, view positions are not staying as same as initial state
 
k then u have to set the layout params on endanimation()
 
no, that wont look good
I need to animate them from bottom of screen to there initial position
so before animation is started, all i need to do is to read Initial top position views
Issue, is its coming as zero
as you can see in code as well, I have commented next to that line
 
wat is zero?
 
11:52 AM
beginPoint = twitter.getTop(); // this is coming as ZERO
beginPoint is zero
this is my original issue
 
k..let me check again..
 
sure, plz help am stuck since hours in this.
 
wat is the value of beginPoint initially before animating
 
it was zero only
my idea was to calculate screen height and apply translate animation, starting from screen bottom to, view top .
 
12:08 PM
have tried implementing onAnimationEnd(Animator animation)
method becouse u shud update this method to what shud be your state on end of animation
 
i have not written any code inside that
what you are suggesting to do there?
 
facebook.setVisibility(View.VISIBLE); add this in that metod..do same for all 3
 
actually, that am doing just when animation is being started
my question is to read, top of twitter view just before animation was started
 
ya when animation ends that images will not be visible rite?
 
they are visible
as i said am making them visible just before animation is being started
@Override
public void onAnimationStart(Animator animation) {
twitter.setVisibility(View.VISIBLE);

}
 
12:17 PM
k but they are not in the desired position im i correct?
 
yes
correct they are not in right position
ObjectAnimator anim2 = ObjectAnimator.ofFloat(twitter, "y", offset , beginPoint);
this is what am doing
offset = 200 pixel below screen height
beginPoint = top of view, just before animation was started
problem is, beginPoint is coming as zero
hence view are getting animated from screen bottom, and then settling at screen top
although Initial position was just above text (Share)
 
and wat abt those texts they is the desired position o not?
concentrate on onAnimationEnd
3
Q: Android animate my Relative Layout from bottom to Top and Top to Bottom using translate animation on image view click

Farhan ShahI Need to make animate my Relative Layout when click on image view.. 1.Moving Relative Layout from Bottom to Top (when clicking him on image view). 2.Moving back from Top to Bottom (when clicking him again on image view). First when i click on image view it's works fine and Relative Layout mov...

buddy i need to go ....gud luck for ur issue....i ll catch u on monday if ur issue is not solved..bbye
 
alright let me check
sure
thanks
 

last day (14 days later) »