AlertDialog single choice

package com.example.androidtest;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;

public class AlertTest extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		final CharSequence[] items = {"First", "Second"};
		AlertDialog alert =null;
		AlertDialog.Builder builder = new AlertDialog.Builder(AlertTest.this);
		builder.setTitle("Test");
		builder.setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
		    public void onClick(DialogInterface dialog, int item) {
		    	
		    	
			
		    }
		    });
		alert = builder.create();
		alert.show();
	}
	

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章