Scrolling a dynamically filled AbsoluteLayout.

by ~ TreKing » Fri, 23 Apr 2010 10:16:22 GMT


Sponsored Links
 




Yeah, don't use AbsoluteLayout, it's deprecated.




Yeah, you're using AbsoluteLayout, which is deprecated.

Are you trying to achieve the same effect as the pictures in the link, or is
that what you have working so far?

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

--



Scrolling a dynamically filled AbsoluteLayout.

by rocrail » Sat, 24 Apr 2010 04:14:32 GMT


 > Yeah, don't use AbsoluteLayout, it's deprecated.
No, it is not and for the track plan it is the only option.

This is also stated in this group:

     'll say again: we are not going to remove AbsoluteLayout from a
future
      release, but we strongly discourage people from using it.      Dianne Hackborn
      Android framework engineer


This is not possible because the only layout supporting exact
positioning is the AbsoluteLayout.

This is my working App: andRoc.

BR,
Rob

--


Sponsored Links


Scrolling a dynamically filled AbsoluteLayout.

by rocrail » Sat, 24 Apr 2010 04:24:29 GMT


 Hi,

I just need a scrollable layout where I can exactly position bitmaps
at run time.

BR,
Rob.

--



Scrolling a dynamically filled AbsoluteLayout.

by ~ TreKing » Sat, 24 Apr 2010 05:39:23 GMT


 



Yes, it is. Try reading the documentation.
 http://developer.android.com/intl/fr/reference/android/widget/AbsoluteLayout.html 
< http://developer.android.com/intl/fr/reference/android/widget/AbsoluteLayout.html> ;

*This class is deprecated.*
Use 
FrameLayout< http://developer.android.com/reference/android/widget/FrameLayout.html> ;
, 
RelativeLayout< http://developer.android.com/reference/android/widget/RelativeLayout.html> ;
or
a custom layout instead.



And quoting an Android Framework Engineer strongly discouraging you from
using it proves your point how?



Which is the problem. You don't want to be doing exact positioning as it's
liable to break as you run on different sized devices.





Then you're probably going to have to write your own layout that does this.

Good luck. I think you're going to need it.

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

--



Scrolling a dynamically filled AbsoluteLayout.

by rocrail » Mon, 26 Apr 2010 13:54:30 GMT


 OK, it works without the ScrollView which is only vertically; just
scrolling by touch events.

The extended AbsoluteLayout class:
 http://bazaar.launchpad.net/ ~rocrail-project/rocrail/androc/annotate/head%3A/src/net/rocrail/androc/widgets/LevelCanvas.java

The dynamically added views also support the scrolling:
 http://bazaar.launchpad.net/ ~rocrail-project/rocrail/androc/annotate/head%3A/src/net/rocrail/androc/widgets/LevelItem.java

The layout xml is very small:
 http://bazaar.launchpad.net/ ~rocrail-project/rocrail/androc/annotate/head%3A/res/layout/level.xml

BTW:
This is the only view in my app who needs the absolute layout.
I can imagine that also other apps will need sometimes an
AbsoluteLayout.
I hope that the deprecated flag will be removed from the API because
it is up to the developer and depending of the App if it is needed.

Best regards,
Rob.

--