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. mohon bantuan, pusing soal DREAM

mohon bantuan lg pusing berat soalnya
ceritanya :
1minggu yg lalu beli HTC dream n mau gw root spy bisa ganti rom :D
tapi pusing, sblm gw apa2 in dreamnya update sendiri ke firmware 1.5
nah trus gw ikutin cara root dari

 dan dari sini

tapi tetep g pernah berhasil, lalu gw coba donlot firmware 1.6 dr
HTCnya gw update sukses tapi tetep g bisa ganti room yg laen??!?!?!

pertanyaannya :
1. ada yg bisa bantuin g cara root yg gampang dr firm 1.6???
2. ato ada theme yg keren n gimana cara installnya yg gampangya.

tq master2 smua. tolong dibantuin
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:


2. Is there an explorer for all contentProviders?


I want to search all the content providers. Is there a UI for doing


3. what is envsetup.sh

4. internal compiler error: Segmentation fault (Eclair + 4.3.1 toolchain)

5. Accents in strings

6. Call Webservice From Android

7. Mod: Info Gathering