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.

--



Other Threads

1. What phone to buy for development?



Just about any phone is fine for Android application development. You
only need ADP1 or ADP2 if you want to replace the firmware (i.e., load
your own modified copy of the Android OS).

So, I would find one that is available for sale in Germany, either
through a carrier (e.g., T-Mobile) or through other channels.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

-- 

2. Tab widget first tab intent oncreate always called regardless we set tab2 as default tab

Following is the example of tabs with intent data.

While debugging i found that always when first tab we add in tab host
in our case following tab

tabHost.addTab(tabHost.newTabSpec("tab1")
                    .setIndicator("list")
                    .setContent(new Intent(this, List1.class)));

oncreate method of "List1" intent get called regardless it is our
current tab or not even if i define tab2 as a current tab how to fix
this ?

public class Tabs3 extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final TabHost tabHost = getTabHost();

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("list")
                .setContent(new Intent(this, List1.class)));

        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("photo list")
                .setContent(new Intent(this,
List8.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
    }
}

I want to add all the tabs, but have something other than the first
tab be selected on default, and don't want the List1 Activity to be
created until you click on the tab.

-- 

3. I got a very strange error using "setAudioSource" ? ERROR/audio_input(52)

4. How to set priority on Image button

5. How do you implement input (keyboard) device driver?

6. How to get notified of incoming email messages?

7. transforming an activity to a modal full screen dialog