package de.cketti.holocolorpicker.demo;

import com.actionbarsherlock.app.SherlockDialogFragment;

import android.app.Dialog;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;


/**
 * Show an "About" dialog
 */
public class AboutDialogFragment extends SherlockDialogFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.about_dialog, null);

        TextView about = (TextView) view.findViewById(R.id.about_text);
        about.setText(Html.fromHtml(getString(R.string.about_text)));
        about.setMovementMethod(LinkMovementMethod.getInstance());

        Dialog dialog = getDialog();
        dialog.setTitle(R.string.label_about);

        return view;
    }
}

@@ -115,16 +115,21 @@
 app.
+Alert
 Dialog;%0A
 impo
@@ -124,16 +124,83 @@
 Dialog;%0A
+import android.app.Dialog;%0Aimport android.app.AlertDialog.Builder;%0A
 import a
@@ -356,39 +356,8 @@
 ew;%0A
-import android.view.ViewGroup;%0A
 impo
@@ -512,20 +512,22 @@
  public 
-View
+Dialog
  onCreat
@@ -531,129 +531,275 @@
 eate
-View(LayoutInflater inflater, ViewGroup container,%0A            Bundle savedInstanceState) %7B%0A%0A        View view = inflater
+Dialog(Bundle savedInstanceState) %7B%0A        Builder builder = new AlertDialog.Builder(getActivity());%0A        builder.setTitle(R.string.label_about);%0A        builder.setPositiveButton(android.R.string.ok, null);%0A%0A        View view = LayoutInflater.from(getActivity())
 .inf
@@ -1056,85 +1056,31 @@
     
-Dialog dialog = getDialog();%0A        dialog.setTitle(R.string.label_about
+builder.setView(view
 );%0A
-%0A
     
@@ -1090,20 +1090,32 @@
  return 
-view
+builder.create()
 ;%0A    %7D%0A

Add "Ok" button to about dialog