[android-developers] Re: Animations in the list view

2013-01-17 Thread Ansh
sure dude ,i ll share the link of my blog once i finish with this 

On Thursday, 17 January 2013 18:26:46 UTC+5:30, skink wrote:
>
>
>
> Ansh wrote: 
> > Yes i took help from your code.The popup which is floating upwards is a 
> > layout of the same type as the layout being used for the ListView. 
> > 
> > 
>
> share a code snippet then... 
>
> pskink 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-17 Thread skink


Ansh wrote:
> Yes i took help from your code.The popup which is floating upwards is a
> layout of the same type as the layout being used for the ListView.
>
>

share a code snippet then...

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Animations in the list view

2013-01-17 Thread Ansh
Yes i took help from your code.The popup which is floating upwards is a 
layout of the same type as the layout being used for the ListView.

On Thursday, 17 January 2013 18:00:22 UTC+5:30, skink wrote:
>
>
>
> Ansh wrote: 
> > Hats off to you man ...you are a life saver. 
> > 
> > Although the animation with this code is not smoother like the one in 
> the 
> > video but its as smooth as it can be and its good in terms of lines of 
> code 
> > and other unnecessary stuffs i used to achieve. check this out and 
> provide 
> > me your feedback 
> > http://youtu.be/BrIJ-1HblIY 
> > 
>
> is it done based of my code? 
>
> how did you animate item which is added to the list? is it a popup 
> window or some child of a frame layout? 
>
> pskink 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-17 Thread skink


Ansh wrote:
> Hats off to you man ...you are a life saver.
>
> Although the animation with this code is not smoother like the one in the
> video but its as smooth as it can be and its good in terms of lines of code
> and other unnecessary stuffs i used to achieve. check this out and provide
> me your feedback
> http://youtu.be/BrIJ-1HblIY
>

is it done based of my code?

how did you animate item which is added to the list? is it a popup
window or some child of a frame layout?

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Animations in the list view

2013-01-17 Thread Ansh
Hats off to you man ...you are a life saver.

Although the animation with this code is not smoother like the one in the 
video but its as smooth as it can be and its good in terms of lines of code 
and other unnecessary stuffs i used to achieve. check this out and provide 
me your feedback
http://youtu.be/BrIJ-1HblIY

On Thursday, 17 January 2013 13:59:16 UTC+5:30, skink wrote:
>
>
>
> On 12 Sty, 19:40, Ansh  wrote: 
> > Hi guys 
> > 
> > I am new to animation in android.I am trying to translate  childitem/ of 
> a 
> > listview.First child view should translate from middle to top of the 
> list 
> > and the list should also slide down during the translate animation and 
> make 
> > the space of the view being translated.Please help me guys as it has 
> eaten 
> > up my mind for  past 3days. 
> > 
> > i am trying to achieve exactly the same in this video.
> http://youtu.be/xPLhfEJuz4k 
>
> here you have sample code to start with: 
>
> import android.app.Activity; 
> import android.app.AlertDialog; 
> import android.content.DialogInterface; 
> import android.content.DialogInterface.OnClickListener; 
> import android.os.Bundle; 
> import android.view.View; 
> import android.view.animation.AlphaAnimation; 
> import android.view.animation.Animation; 
> import android.view.animation.TranslateAnimation; 
> import android.widget.AdapterView; 
> import android.widget.AdapterView.OnItemClickListener; 
> import android.widget.ArrayAdapter; 
> import android.widget.EditText; 
> import android.widget.ListView; 
>
> public class AnimatedListActivity extends Activity implements 
> OnItemClickListener, OnClickListener, Runnable { 
> private final static String TAG = "AnimatedListActivity"; 
> private ArrayAdapter mAdapter; 
> private int mInsertPosition; 
>
> @Override 
> protected void onCreate(Bundle savedInstanceState) { 
> super.onCreate(savedInstanceState); 
> setContentView(R.layout.lv); 
> ListView lv = (ListView) findViewById(R.id.lv); 
> lv.setClipChildren(false); 
> lv.setOnItemClickListener(this); 
> lv.setDivider(null); 
> mAdapter = new ArrayAdapter(this, 
> android.R.layout.simple_list_item_1); 
> mAdapter.add("10"); 
> mAdapter.add("20"); 
> mAdapter.add("30"); 
> mAdapter.add("40"); 
> mAdapter.add("50"); 
> mAdapter.add("60"); 
> mAdapter.add("70"); 
> mAdapter.add("80"); 
> mAdapter.add("90"); 
> lv.setAdapter(mAdapter); 
> } 
>
> @Override 
> public void onItemClick(AdapterView parent, View view, int 
> position, long id) { 
> AlertDialog.Builder b = new AlertDialog.Builder(this); 
> b.setPositiveButton(android.R.string.ok, this); 
> b.setTitle("Enter Integer"); 
> EditText et = new EditText(this); 
> et.setId(99); 
> b.setView(et); 
> b.show(); 
> } 
>
> @Override 
> public void onClick(DialogInterface dialog, int which) { 
> AlertDialog d = (AlertDialog) dialog; 
> EditText et = (EditText) d.findViewById(99); 
> String newItem = et.getText().toString(); 
>
> ListView lv = (ListView) findViewById(R.id.lv); 
> int cnt = mAdapter.getCount(); 
> for (int i = 0; i < cnt; i++) { 
> String item = mAdapter.getItem(i); 
> if (newItem.compareTo(item) < 0) { 
> mAdapter.insert(newItem, i); 
> mInsertPosition = i; 
> lv.setSelection(i); 
> lv.post(this); 
> break; 
> } 
> } 
> } 
>
> @Override 
> public void run() { 
> ListView lv = (ListView) findViewById(R.id.lv); 
> // here animations start 
> int first = lv.getFirstVisiblePosition(); 
> int last = lv.getLastVisiblePosition(); 
> for (int k = 0; k < last - first + 1; k++) { 
> View child = lv.getChildAt(k); 
> int pos = lv.getPositionForView(child); 
> Animation animation = null; 
> if (pos == mInsertPosition) { 
> // instead of alpha animation you can make 
> your 
> // new inserted item move here 
> animation = new AlphaAnimation(0, 1); 
> } else 
> if (pos > mInsertPosition) { 
> animati

[android-developers] Re: Animations in the list view

2013-01-17 Thread skink


On 12 Sty, 19:40, Ansh  wrote:
> Hi guys
>
> I am new to animation in android.I am trying to translate  childitem/ of a
> listview.First child view should translate from middle to top of the list
> and the list should also slide down during the translate animation and make
> the space of the view being translated.Please help me guys as it has eaten
> up my mind for  past 3days.
>
> i am trying to achieve exactly the same in this 
> video.http://youtu.be/xPLhfEJuz4k

here you have sample code to start with:

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;

public class AnimatedListActivity extends Activity implements
OnItemClickListener, OnClickListener, Runnable {
private final static String TAG = "AnimatedListActivity";
private ArrayAdapter mAdapter;
private int mInsertPosition;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.lv);
ListView lv = (ListView) findViewById(R.id.lv);
lv.setClipChildren(false);
lv.setOnItemClickListener(this);
lv.setDivider(null);
mAdapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1);
mAdapter.add("10");
mAdapter.add("20");
mAdapter.add("30");
mAdapter.add("40");
mAdapter.add("50");
mAdapter.add("60");
mAdapter.add("70");
mAdapter.add("80");
mAdapter.add("90");
lv.setAdapter(mAdapter);
}

@Override
public void onItemClick(AdapterView parent, View view, int
position, long id) {
AlertDialog.Builder b = new AlertDialog.Builder(this);
b.setPositiveButton(android.R.string.ok, this);
b.setTitle("Enter Integer");
EditText et = new EditText(this);
et.setId(99);
b.setView(et);
b.show();
}

@Override
public void onClick(DialogInterface dialog, int which) {
AlertDialog d = (AlertDialog) dialog;
EditText et = (EditText) d.findViewById(99);
String newItem = et.getText().toString();

ListView lv = (ListView) findViewById(R.id.lv);
int cnt = mAdapter.getCount();
for (int i = 0; i < cnt; i++) {
String item = mAdapter.getItem(i);
if (newItem.compareTo(item) < 0) {
mAdapter.insert(newItem, i);
mInsertPosition = i;
lv.setSelection(i);
lv.post(this);
break;
}
}
}

@Override
public void run() {
ListView lv = (ListView) findViewById(R.id.lv);
// here animations start
int first = lv.getFirstVisiblePosition();
int last = lv.getLastVisiblePosition();
for (int k = 0; k < last - first + 1; k++) {
View child = lv.getChildAt(k);
int pos = lv.getPositionForView(child);
Animation animation = null;
if (pos == mInsertPosition) {
// instead of alpha animation you can make your
// new inserted item move here
animation = new AlphaAnimation(0, 1);
} else
if (pos > mInsertPosition) {
animation = new TranslateAnimation(
Animation.ABSOLUTE, 0, 
Animation.ABSOLUTE, 0,
Animation.RELATIVE_TO_SELF, -1, 
Animation.RELATIVE_TO_SELF, 0);
}
if (animation != null) {
animation.setDuration(750);
child.startAnimation(animation);
}
}
}
}


pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe f

[android-developers] Re: Animations in the list view

2013-01-16 Thread Ansh
Thanks for replying again.
*
*
* you can override its height in the getview() and set it at 1 dp high 
(tip: don't set the row view to View.GONE).  At the end of the animations 
you will just be fiddling around with row heights and view contents so you 
shouldn't need the notifyDatasetChanged().*
*
*
I could not get you by setting  it at 1 dp high.And what i need to do after 
animation ends?Please explain little more.

On Tuesday, 15 January 2013 19:01:13 UTC+5:30, Spiral123 wrote:
>
>
> in that case I'd think about insert a new row into the list when the 
> listview is first displayed.  from the example its always going to be at 
> position(0) in the list so you can override its height in the getview() and 
> set it at 1 dp high (tip: don't set the row view to View.GONE).  At the end 
> of the animations you will just be fiddling around with row heights and 
> view contents so you shouldn't need the notifyDatasetChanged().
>
>
> On Tuesday, January 15, 2013 4:14:52 AM UTC-5, Ansh wrote:
>>
>> Hi Nick ,
>>
>> Thanks a lot for your reply. I did the same you suggested but it had 
>> revealed few issues:
>>
>> after implementing all three steps and when i did below step also
>>
>> *- After the animations have finished insert a new Row into the List at 
>> the insertion point, change the child view height back to a single row 
>> height and destroy the dummy row view.*
>> *
>> *
>> *-*when i inserted Row into the insertion point and called 
>> notifyDatasetChanged for the list to update the row it showed some jerk 
>> because list's getview method called and repopulate the list again and i 
>> needed not to change the child view height back as getView changed its 
>> height back to original.Animation was not that smooth as its in the 
>> youtube video.
>>
>> If i misunderstood your stpes ,and if possible ,could u please create a 
>> demo project and send it to me to yourans...@gmail.com.I ll be grateful to 
>> you. 
>> On Monday, 14 January 2013 18:55:46 UTC+5:30, Spiral123 wrote:
>>>
>>> I think this is not very different to a question we had a couple of 
>>> weeks ago.
>>>
>>> This is what I would do:
>>>
>>> - I would not use 2 ListViews.  I would leave the original ListView 
>>> underneath and dynamically create a new View that was a single RowView and 
>>> put that on top and slide it around.
>>>
>>> - I would not insert an extra row into the original ListView.  Instead 
>>> find the child view at the top of the list and double the height of it. 
>>>  Make sure the gravity of the content is such that is sticks to the bottom 
>>> of the view.
>>>
>>> - Slide the dummy row view up until it lies directly over the top 
>>> (blank) part of the child view.
>>>
>>> - After the animations have finished insert a new Row into the List at 
>>> the insertion point, change the child view height back to a single row 
>>> height and destroy the dummy row view.
>>>
>>>
>>> I think that should give you the appearance you want.  Judging from the 
>>> neutral background and lack of row dividers I'm guessing whoever wrote the 
>>> sample behind your youtube example did something similar.
>>>
>>> Best,
>>>
>>> Nick
>>>
>>>
>>>
>>> On Monday, January 14, 2013 3:16:59 AM UTC-5, Ansh wrote:

 I have tried one way of doing this kind of animation.I have taken 2 
 listviews and made first list view's visibility gone.Then i have taken one 
 separate layout( the same custom layout i am using for the listview )and 
 trying to translate that layout from middle to top and once it reaches to 
 top and making it's visibility to gone.and the same time when the view is 
 translating, i am sliding down the list also and once the view's animation 
 ends i am setting list animation to fillAfter = true and fillEnabled=true 
 and list1.setVisibility = gone and list2.setVisibility = visible sothat 
 list2 should be visible but what happening is list1 is not getting gone it 
 still be there because of the bug when we use fillAfter = true and 
 fillEnabled=true.How can i make my list1 visibility to gone ?

 On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote:
>
> Hi guys
>
> I am new to animation in android.I am trying to translate  childitem/ 
> of a listview.First child view should translate from middle to top of the 
> list and the list should also slide down during the translate animation 
> and 
> make the space of the view being translated.Please help me guys as it has 
> eaten up my mind for  past 3days.
>
> i am trying to achieve exactly the same in this video.
> http://youtu.be/xPLhfEJuz4k



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/gr

[android-developers] Re: Animations in the list view

2013-01-15 Thread Spiral123

in that case I'd think about insert a new row into the list when the 
listview is first displayed.  from the example its always going to be at 
position(0) in the list so you can override its height in the getview() and 
set it at 1 dp high (tip: don't set the row view to View.GONE).  At the end 
of the animations you will just be fiddling around with row heights and 
view contents so you shouldn't need the notifyDatasetChanged().


On Tuesday, January 15, 2013 4:14:52 AM UTC-5, Ansh wrote:
>
> Hi Nick ,
>
> Thanks a lot for your reply. I did the same you suggested but it had 
> revealed few issues:
>
> after implementing all three steps and when i did below step also
>
> *- After the animations have finished insert a new Row into the List at 
> the insertion point, change the child view height back to a single row 
> height and destroy the dummy row view.*
> *
> *
> *-*when i inserted Row into the insertion point and called 
> notifyDatasetChanged for the list to update the row it showed some jerk 
> because list's getview method called and repopulate the list again and i 
> needed not to change the child view height back as getView changed its 
> height back to original.Animation was not that smooth as its in the 
> youtube video.
>
> If i misunderstood your stpes ,and if possible ,could u please create a 
> demo project and send it to me to yourans...@gmail.com.I ll be grateful to 
> you. 
> On Monday, 14 January 2013 18:55:46 UTC+5:30, Spiral123 wrote:
>>
>> I think this is not very different to a question we had a couple of weeks 
>> ago.
>>
>> This is what I would do:
>>
>> - I would not use 2 ListViews.  I would leave the original ListView 
>> underneath and dynamically create a new View that was a single RowView and 
>> put that on top and slide it around.
>>
>> - I would not insert an extra row into the original ListView.  Instead 
>> find the child view at the top of the list and double the height of it. 
>>  Make sure the gravity of the content is such that is sticks to the bottom 
>> of the view.
>>
>> - Slide the dummy row view up until it lies directly over the top (blank) 
>> part of the child view.
>>
>> - After the animations have finished insert a new Row into the List at 
>> the insertion point, change the child view height back to a single row 
>> height and destroy the dummy row view.
>>
>>
>> I think that should give you the appearance you want.  Judging from the 
>> neutral background and lack of row dividers I'm guessing whoever wrote the 
>> sample behind your youtube example did something similar.
>>
>> Best,
>>
>> Nick
>>
>>
>>
>> On Monday, January 14, 2013 3:16:59 AM UTC-5, Ansh wrote:
>>>
>>> I have tried one way of doing this kind of animation.I have taken 2 
>>> listviews and made first list view's visibility gone.Then i have taken one 
>>> separate layout( the same custom layout i am using for the listview )and 
>>> trying to translate that layout from middle to top and once it reaches to 
>>> top and making it's visibility to gone.and the same time when the view is 
>>> translating, i am sliding down the list also and once the view's animation 
>>> ends i am setting list animation to fillAfter = true and fillEnabled=true 
>>> and list1.setVisibility = gone and list2.setVisibility = visible sothat 
>>> list2 should be visible but what happening is list1 is not getting gone it 
>>> still be there because of the bug when we use fillAfter = true and 
>>> fillEnabled=true.How can i make my list1 visibility to gone ?
>>>
>>> On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote:

 Hi guys

 I am new to animation in android.I am trying to translate  childitem/ 
 of a listview.First child view should translate from middle to top of the 
 list and the list should also slide down during the translate animation 
 and 
 make the space of the view being translated.Please help me guys as it has 
 eaten up my mind for  past 3days.

 i am trying to achieve exactly the same in this video.
 http://youtu.be/xPLhfEJuz4k
>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-15 Thread Ansh
Hi Nick ,

Thanks a lot for your reply. I did the same you suggested but it had 
revealed few issues:

after implementing all three steps and when i did below step also

*- After the animations have finished insert a new Row into the List at the 
insertion point, change the child view height back to a single row height 
and destroy the dummy row view.*
*
*
*-*when i inserted Row into the insertion point and called 
notifyDatasetChanged for the list to update the row it showed some jerk 
because list's getview method called and repopulate the list again and i 
needed not to change the child view height back as getView changed its 
height back to original.Animation was not that smooth as its in the 
youtube video.

If i misunderstood your stpes ,and if possible ,could u please create a 
demo project and send it to me to yourans...@gmail.com.I ll be grateful to 
you. 
On Monday, 14 January 2013 18:55:46 UTC+5:30, Spiral123 wrote:
>
> I think this is not very different to a question we had a couple of weeks 
> ago.
>
> This is what I would do:
>
> - I would not use 2 ListViews.  I would leave the original ListView 
> underneath and dynamically create a new View that was a single RowView and 
> put that on top and slide it around.
>
> - I would not insert an extra row into the original ListView.  Instead 
> find the child view at the top of the list and double the height of it. 
>  Make sure the gravity of the content is such that is sticks to the bottom 
> of the view.
>
> - Slide the dummy row view up until it lies directly over the top (blank) 
> part of the child view.
>
> - After the animations have finished insert a new Row into the List at the 
> insertion point, change the child view height back to a single row height 
> and destroy the dummy row view.
>
>
> I think that should give you the appearance you want.  Judging from the 
> neutral background and lack of row dividers I'm guessing whoever wrote the 
> sample behind your youtube example did something similar.
>
> Best,
>
> Nick
>
>
>
> On Monday, January 14, 2013 3:16:59 AM UTC-5, Ansh wrote:
>>
>> I have tried one way of doing this kind of animation.I have taken 2 
>> listviews and made first list view's visibility gone.Then i have taken one 
>> separate layout( the same custom layout i am using for the listview )and 
>> trying to translate that layout from middle to top and once it reaches to 
>> top and making it's visibility to gone.and the same time when the view is 
>> translating, i am sliding down the list also and once the view's animation 
>> ends i am setting list animation to fillAfter = true and fillEnabled=true 
>> and list1.setVisibility = gone and list2.setVisibility = visible sothat 
>> list2 should be visible but what happening is list1 is not getting gone it 
>> still be there because of the bug when we use fillAfter = true and 
>> fillEnabled=true.How can i make my list1 visibility to gone ?
>>
>> On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote:
>>>
>>> Hi guys
>>>
>>> I am new to animation in android.I am trying to translate  childitem/ of 
>>> a listview.First child view should translate from middle to top of the list 
>>> and the list should also slide down during the translate animation and make 
>>> the space of the view being translated.Please help me guys as it has eaten 
>>> up my mind for  past 3days.
>>>
>>> i am trying to achieve exactly the same in this video.
>>> http://youtu.be/xPLhfEJuz4k
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-14 Thread Spiral123
I think this is not very different to a question we had a couple of weeks 
ago.

This is what I would do:

- I would not use 2 ListViews.  I would leave the original ListView 
underneath and dynamically create a new View that was a single RowView and 
put that on top and slide it around.

- I would not insert an extra row into the original ListView.  Instead find 
the child view at the top of the list and double the height of it.  Make 
sure the gravity of the content is such that is sticks to the bottom of the 
view.

- Slide the dummy row view up until it lies directly over the top (blank) 
part of the child view.

- After the animations have finished insert a new Row into the List at the 
insertion point, change the child view height back to a single row height 
and destroy the dummy row view.


I think that should give you the appearance you want.  Judging from the 
neutral background and lack of row dividers I'm guessing whoever wrote the 
sample behind your youtube example did something similar.

Best,

Nick



On Monday, January 14, 2013 3:16:59 AM UTC-5, Ansh wrote:
>
> I have tried one way of doing this kind of animation.I have taken 2 
> listviews and made first list view's visibility gone.Then i have taken one 
> separate layout( the same custom layout i am using for the listview )and 
> trying to translate that layout from middle to top and once it reaches to 
> top and making it's visibility to gone.and the same time when the view is 
> translating, i am sliding down the list also and once the view's animation 
> ends i am setting list animation to fillAfter = true and fillEnabled=true 
> and list1.setVisibility = gone and list2.setVisibility = visible sothat 
> list2 should be visible but what happening is list1 is not getting gone it 
> still be there because of the bug when we use fillAfter = true and 
> fillEnabled=true.How can i make my list1 visibility to gone ?
>
> On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote:
>>
>> Hi guys
>>
>> I am new to animation in android.I am trying to translate  childitem/ of 
>> a listview.First child view should translate from middle to top of the list 
>> and the list should also slide down during the translate animation and make 
>> the space of the view being translated.Please help me guys as it has eaten 
>> up my mind for  past 3days.
>>
>> i am trying to achieve exactly the same in this video.
>> http://youtu.be/xPLhfEJuz4k
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-14 Thread Ansh
I have tried one way of doing this kind of animation.I have taken 2 
listviews and made first list view's visibility gone.Then i have taken one 
separate layout( the same custom layout i am using for the listview )and 
trying to translate that layout from middle to top and once it reaches to 
top and making it's visibility to gone.and the same time when the view is 
translating, i am sliding down the list also and once the view's animation 
ends i am setting list animation to fillAfter = true and fillEnabled=true 
and list1.setVisibility = gone and list2.setVisibility = visible sothat 
list2 should be visible but what happening is list1 is not getting gone it 
still be there because of the bug when we use fillAfter = true and 
fillEnabled=true.How can i make my list1 visibility to gone ?

On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote:
>
> Hi guys
>
> I am new to animation in android.I am trying to translate  childitem/ of a 
> listview.First child view should translate from middle to top of the list 
> and the list should also slide down during the translate animation and make 
> the space of the view being translated.Please help me guys as it has eaten 
> up my mind for  past 3days.
>
> i am trying to achieve exactly the same in this video.
> http://youtu.be/xPLhfEJuz4k

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-13 Thread Ansh
Hi Nobu,

Thanks for your reply.But Can you please elaborate on the solutions you 
have suggested.I have tried lot to achieve the task.Is this task possible 
to achieve?

On Sunday, 13 January 2013 00:57:55 UTC+5:30, Nobu Games wrote:
>
> The quick and incorrect approach would be starting these growing 
> animations from your ListAdapter's getView method. Right before you return 
> the convertView you'd start the animation object on that view.
>
> However, there is a problem with that animation approach because ListViews 
> lays out its child views (items) and determines their positions. So using 
> an Animation object for transforming the height of an item (grow animation) 
> would not affect the other list items. They would statically remain in 
> their locations and your new item that slides in will just grow into a gap 
> that is exactly that item's full size.
>
> Following solution ideas:
>
> - You override ListView and add some layout animation behavior that does 
> what you need
>
> - Animate the height of your added item using a Timer object. Trigger 
> re-layouts of the ListView in order to align the other child views 
> accordingly.
> (However, I don't know whether you'll need to constantly invalidate your 
> listadapter in order to make that work. This might turn out to be a pretty 
> wasteful approach!)
>
>
> On Saturday, January 12, 2013 12:40:47 PM UTC-6, Ansh wrote:
>>
>> Hi guys
>>
>> I am new to animation in android.I am trying to translate  childitem/ of 
>> a listview.First child view should translate from middle to top of the list 
>> and the list should also slide down during the translate animation and make 
>> the space of the view being translated.Please help me guys as it has eaten 
>> up my mind for  past 3days.
>>
>> i am trying to achieve exactly the same in this video.
>> http://youtu.be/xPLhfEJuz4k
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Animations in the list view

2013-01-12 Thread Nobu Games
The quick and incorrect approach would be starting these growing animations 
from your ListAdapter's getView method. Right before you return the 
convertView you'd start the animation object on that view.

However, there is a problem with that animation approach because ListViews 
lays out its child views (items) and determines their positions. So using 
an Animation object for transforming the height of an item (grow animation) 
would not affect the other list items. They would statically remain in 
their locations and your new item that slides in will just grow into a gap 
that is exactly that item's full size.

Following solution ideas:

- You override ListView and add some layout animation behavior that does 
what you need

- Animate the height of your added item using a Timer object. Trigger 
re-layouts of the ListView in order to align the other child views 
accordingly.
(However, I don't know whether you'll need to constantly invalidate your 
listadapter in order to make that work. This might turn out to be a pretty 
wasteful approach!)


On Saturday, January 12, 2013 12:40:47 PM UTC-6, Ansh wrote:
>
> Hi guys
>
> I am new to animation in android.I am trying to translate  childitem/ of a 
> listview.First child view should translate from middle to top of the list 
> and the list should also slide down during the translate animation and make 
> the space of the view being translated.Please help me guys as it has eaten 
> up my mind for  past 3days.
>
> i am trying to achieve exactly the same in this video.
> http://youtu.be/xPLhfEJuz4k

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en