вы можете сделать это, используя пользовательский диалог, для получения дополнительной помощи перейдите к пример пользовательского диалога
или в соответствии с вашими требованиями
это ваш основной XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainLayout" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
</LinearLayout>
и java-файл
package com.chirag;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class TestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Dialog dialog = new Dialog(TestActivity.this);
dialog.setContentView(R.layout.dialog_layout);
dialog.setCancelable(true);
//there are a lot of settings, for dialog, check them all out!
//now that the dialog is set up, it's time to show it
dialog.show();
}
}
Надеюсь, теперь его работа для вас ...