Load two different views simultaneously in a screen

by And-Rider » Thu, 05 Mar 2009 21:52:12 GMT

Sponsored Links
 I want to create a single screen with two different views .And i want
to refresh one view without disturbing the second view.I mean i do not
want to refresh the entire screen and want to refresh only a part in a
screen....i am able to populate two layouts in one view but is there a
way to populate two views in one screen...?

                                         ------------->View 1

                                     -------------------->View 2



Load two different views simultaneously in a screen

by Kacza » Fri, 06 Mar 2009 05:19:33 GMT


the first thing that comes to my mind is to create a LinearLayout, put
two views into it and refresh only one when needed.

class MyActivity extends Activity
    View topView;
    View bottomView;

    public void onCreate(Bundle savedInstanceState)

         LinearLayout layout = new LinearLayout(this);

         this.topView = new MyTopView(this);
         this.bottomView = new MyBottomView(this);

        layout.addView(topView, new LinearLayout.LayoutParams
        layout.addView(bottomView, new LinearLayout.LayoutParams

    void refreshBottomView()
       if (this.topView != null)

(code not checked)


Sponsored Links

Other Threads

1. help with wpa_supplicant


how to issue commands like STOP,LINKSPEED,START, e.t.c to the hardware
wrapper driver_wext.c from wpa_supplicant ....



2. Looking for someone to test with a 600mhz phone


I've just released Squibble Lite, a game i've been developing for
android.  I've had access to a nexus1, a desire, and a samsung galaxy
s to test on.  Unfortunately, these are all pretty fast phones with
1ghz processors.  Just wondering if someone with a 600mhz phone would
be willing to give it a go, and let me know how it plays performance-




3. VPN traffic enroute

4. Accessing Shared Preferences of another Application

5. memory leaks

6. is LVL the best solution?

7. Why doesn't Context.bindService() call onStartCommand()?