package com.androidbegin.buttonclicktutorial;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.TimePicker;

public class debug_fragment extends DialogFragment 
{
	 
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState)
    {
        final Context ctx = getActivity();
        LayoutInflater inflater = getActivity().getLayoutInflater();
         
        View rootView = inflater.inflate(R.layout.dialogfragment_layout, null, false);
        
        
        TimePicker timePicker = (TimePicker) rootView.findViewById(R.id.timePicker1);
        timePicker.setIs24HourView(true); // to set 24 hours mode
         
        return new AlertDialog.Builder(ctx)
        .setTitle("Add Item")
        .setView(rootView)
        .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() 
        {
             
		            @Override
		            public void onClick(DialogInterface dialog, int which) 
		            {
		                //editText1.setError(null);
		                 
		               // String title = editText1.getText().toString();
		               // String desc = editText2.getText().toString();
		               
		                 
		               
		            }
        })
        
        
        .setNegativeButton(android.R.string.cancel, null)
        .create();
    }
 
}