How to manage several screens

by robertd...@gmail.com » Tue, 03 Mar 2009 02:51:49 GMT


Sponsored Links
 Hello,

I got a Device with several screens.
How to manage these several screens with Android Framework?

Thanks
Rob

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. WebView display nothing with TabHost

Hi,

The WebView shows nothing the very first time, however, if you switch
to other TAB and return back, everything is displayed.

Here is my XML file:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:gravity="center">

    <TabHost
                android:id="@android:id/tabhost"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content">

        <TabWidget
            android:id="@android:id/tabs"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>

        <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="450px"
                android:paddingTop="60px">

                <LinearLayout
                android:id="@+id/legal_layout"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="400px">

                <ScrollView
                        android:id="@+id/scroll"
                        android:layout_width="fill_parent"
                        android:layout_height="350px"
                        android:background="@drawable/silver">
                        >
                        <WebView
                                android:id="@+id/legal_view"
                            android:layout_width="fill_parent"
                            android:layout_height="350px"
                            android:minHeight="350dp"
                            android:textColor="@drawable/dark"
                            android:padding = "3dip"
                            android:paddingLeft = "3dip"
                            android:paddingRight = "3dip"
                            android:paddingTop = "3dip"
                            android:paddingBottom = "3dip"
                            android:text="test"/>
                </ScrollView>

                    <LinearLayout
                        android:orientation="horizontal"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                    android:paddingTop = "3dip"
                        android:gravity="center">

                        <Button
                                android:id = "@+id/button_accept"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/button_accept_text"/>

                        <Button
                                android:id = "@+id/button_cancel"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/button_cancel_text"/>

                        </LinearLayout>

        </LinearLayout>
                </FrameLayout>
        </TabHost>

        </LinearLayout>


++++++++++++++++++++++++++++++++++++++++++++
here is part of my code for onCreate:

                //load gloabl asset
                loadAllLegalText();

                //init the view
                setContentView(R.layout.legal);

                tabHost = (TabHost) findViewById(android.R.id.tabhost);
                tabHost.setup();

                legalText = (WebView)findViewById(R.id.legal_view);
                legalText.getSettings().setJavaScriptEnabled(true);
                legalText.loadData(TOC, mimeType, encoding);

                Resources rs = getResources();
                tabHost.addTab(tabHost.newTabSpec(TAG_LEGAL_TOC)
                                
.setIndicator(rs.getText(R.string.legal_tab_indicator_toc))
                                .setContent(R.id.legal_layout));

                tabHost.addTab(tabHost.newTabSpec(TAG_LEGAL_NOTICE)
                                
.setIndicator(rs.getText(R.string.legal_tab_indicator_legal))
                                .setContent(R.id.legal_layout));

                tabHost.addTab(tabHost.newTabSpec(TAG_LEGAL_PRIVACY)
                                
.setIndicator(rs.getText(R.string.legal_tab_indicator_privacy))
                                .setContent(R.id.legal_layout));

                ......
                //set focus
                tabHost.setOnTabChangedListener(this);
                tabHost.setCurrentTabByTag(TAG_LEGAL_TOC);


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

There is one thread about WebView display nothing and I tried their
suggestion, none works...

Anyone has any clue? or it is Android's bug.

http://code.google.com/p/android/issues/detail?id=678
http://www.mail-archive.com/android-developers@googlegroups.com/msg02420.html

--elephantbug

--~--~---------~--~----~------------~-------~--~----~

2. "back button" function

ciao, does someone know what/how android implements the back button?
If I add back button myself, Do I have to do something(use stack to
remember activity) myself?

Thank you so much
--~--~---------~--~----~------------~-------~--~----~

3. transition

4. UserTask

5. Filter-Search Applications

6. Does Android support the arm9-linux?

7. How to change data in emulator, which is set in android:label in AndroidManifest.xml file.