views:

2171

answers:

3

In Android, how can I replace the user interface of an emulator by my own interface? I would like to start my own interface immediately as the emulator gets started and that the user can't use the original interface but the original interface is on the background.

Update:

Now my code looks like this:

public class NewHomeScreen extends Activity {
/** Called when the activity is first created. */
@Override public void onCreate(Bundle state) {
    super.onCreate(state);
    setContentView(R.layout.main);
    Intent mainIntent = new Intent(this,Hello.class);
    startActivity(mainIntent);
    }
}

As I run the program, Eclipse displays

ActivityManager: Warning: Activity not started, its current task has been brought to the front

Does anyone knows why?

A: 

seems you are talking about skins... in that case, look in: c:\android-sdk-windows-1.5_r1\platforms\android-1.5\skins\HVGA\ there is a INI file that defines the look and feel

Reflog
My idea is that in Android, I have buttons such that if I press it, it starts some software, for example a calculator. I would like to know how to modify the user interface such that I can install new software to Android and then add a button which starts the new application. Okay, in this file (actually corresponding as I'm a Linux user) I can remove the buttons I don't need but can I modify them such that a button starts a specific application?
Jaska
the reaction to the buttons comes from the Launcher/Home application.that application decides what to run when you press a certain key.so to make this work - you'll have to make a custom Home application. There is one in the SDK examples.
Reflog
As I click the house button, I can choose to run my application. However, I would like to start my own application immediately without clicking the house button. Is there an easy way to do it? SDK's example is so huge that I guess there is some shorter way.
Jaska
+2  A: 

I think you mean you want to create an alternative Home application which can be set as the default.

You need to add something like the following to your AndroidManifest.xml:

    <activity android:name="Home"
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.HOME"/>
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

If you look in the samples folder of the Android SDK you will find a sample Home application which may help you. In the Android 1.6 SDK it is location at /android-sdk-linux_x86-1.6_r1/platforms/android-1.6/samples/Home

Also you can look at the source of the native Android Home application in the Android source at: http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=tree

AshtonBRSC
A: 

Add in your emulator the proxy settings, menu/wireless&networks/mobile/ , add your access points with your http proxy details.

Agnel Antony