Re: [android-developers] setLayoutParams stops working

2013-07-05 Thread TreKing
On Wed, Jul 3, 2013 at 1:24 AM, Wyler Yerrachione 
foundationservi...@gmail.com wrote:

 So wouldn't I just be setting layout params in your approach as well, so
 would I have any expectation of this same flaky behavior not showing up?


I have no idea. One way to find out is to try and see. There are a lot of
things in Android that work one way but not the other, without clear
evidence of why one method works versus the other.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] setLayoutParams stops working

2013-07-03 Thread Wyler Yerrachione
right, so using an animation is another approach I have notes about.  The 
idea there is to use a Scroller to perform callback animating for the 
various changes that are needed as the scroll happens, right?

The things is, it's not like I have any issues with the current approach, 
except that the values for the layout params get stuck.  And I do need the 
layoutparams to change anyway, since the horizontal linear layout needs to 
adjust based on the changing sizes of the items.  So wouldn't I just be 
setting layout params in your approach as well, so would I have any 
expectation of this same flaky behavior not showing up?

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] setLayoutParams stops working

2013-07-02 Thread TreKing
On Tue, Jul 2, 2013 at 12:40 AM, Wyler Yerrachione 
foundationservi...@gmail.com wrote:

 I'm using setLayoutParams on some images in a HorizontalScrollView to
 change their size as they scroll past.


Not sure about your issue, but why not use an animation?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] setLayoutParams stops working

2013-07-01 Thread Wyler Yerrachione
I'm using setLayoutParams on some images in a HorizontalScrollView to 
change their size as they scroll past.   This seems to work fine, until I 
hit one of the boundaries, then all the imageViews stop responding to 
setLayoutParams.  They are locked in at their last size.  Monitoring my 
code, I can absolutely see that there are no errors being thrown and that 
setLayoutParams is definitely being called with changing values, just like 
before they got locked in.   The UI, which continuing to scroll, is just 
refusing to update my layout params on this ImageView now.

Very frustrating..  Any ideas what's going on here?


  int iWidth = (int) (scale * 108 * getResources().getDisplayMetrics().
density);

 int iHeight = (int) (scale * 56 * getResources().getDisplayMetrics().
density);

   if(r == R.id.imageView5){

  //Log.v(LOCATION, String.valueOf(imageViewCenter) );

  //Log.v(OFFSET, String.valueOf(offset));

  //Log.v(RATIO, String.valueOf(ratio));

  //Log.v(SCALE, String.valueOf(scale));

  Log.v(DIMS, String.valueOf(iWidth) + : + String.valueOf(iHeight) );

 }

   LinearLayout.LayoutParams layoutParams = 
(android.widget.LinearLayout.LayoutParams) iv.getLayoutParams();

 layoutParams.height = iHeight;

 layoutParams.width = iWidth;

 iv.setLayoutParams(layoutParams);

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.