development
Revisão | e4d6bfae6565949bca6b39a5a559095e95698415 (tree) |
---|---|
Hora | 2011-01-09 06:29:50 |
Autor | Adam Powell <adamp@goog...> |
Commiter | Adam Powell |
Update dialog demos for API changes related to setting themed icons.
Change-Id: I73213f9593a381bd43b935aa2fa020ec3d6095d7
@@ -77,7 +77,7 @@ public class AlertDialogSamples extends Activity { | ||
77 | 77 | switch (id) { |
78 | 78 | case DIALOG_YES_NO_MESSAGE: |
79 | 79 | return new AlertDialog.Builder(AlertDialogSamples.this) |
80 | - .setIcon(R.drawable.alert_dialog_icon) | |
80 | + .setIconAttribute(android.R.attr.alertDialogIcon) | |
81 | 81 | .setTitle(R.string.alert_dialog_two_buttons_title) |
82 | 82 | .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { |
83 | 83 | public void onClick(DialogInterface dialog, int whichButton) { |
@@ -94,7 +94,7 @@ public class AlertDialogSamples extends Activity { | ||
94 | 94 | .create(); |
95 | 95 | case DIALOG_YES_NO_LONG_MESSAGE: |
96 | 96 | return new AlertDialog.Builder(AlertDialogSamples.this) |
97 | - .setIcon(R.drawable.alert_dialog_icon) | |
97 | + .setIconAttribute(android.R.attr.alertDialogIcon) | |
98 | 98 | .setTitle(R.string.alert_dialog_two_buttons_msg) |
99 | 99 | .setMessage(R.string.alert_dialog_two_buttons2_msg) |
100 | 100 | .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { |
@@ -118,7 +118,7 @@ public class AlertDialogSamples extends Activity { | ||
118 | 118 | .create(); |
119 | 119 | case DIALOG_YES_NO_ULTRA_LONG_MESSAGE: |
120 | 120 | return new AlertDialog.Builder(AlertDialogSamples.this) |
121 | - .setIcon(R.drawable.alert_dialog_icon) | |
121 | + .setIconAttribute(android.R.attr.alertDialogIcon) | |
122 | 122 | .setTitle(R.string.alert_dialog_two_buttons_msg) |
123 | 123 | .setMessage(R.string.alert_dialog_two_buttons2ultra_msg) |
124 | 124 | .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { |
@@ -156,7 +156,7 @@ public class AlertDialogSamples extends Activity { | ||
156 | 156 | .create(); |
157 | 157 | case DIALOG_PROGRESS: |
158 | 158 | mProgressDialog = new ProgressDialog(AlertDialogSamples.this); |
159 | - mProgressDialog.setIcon(R.drawable.alert_dialog_icon); | |
159 | + mProgressDialog.setIconAttribute(android.R.attr.alertDialogIcon); | |
160 | 160 | mProgressDialog.setTitle(R.string.select_dialog); |
161 | 161 | mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); |
162 | 162 | mProgressDialog.setMax(MAX_PROGRESS); |
@@ -177,7 +177,7 @@ public class AlertDialogSamples extends Activity { | ||
177 | 177 | return mProgressDialog; |
178 | 178 | case DIALOG_SINGLE_CHOICE: |
179 | 179 | return new AlertDialog.Builder(AlertDialogSamples.this) |
180 | - .setIcon(R.drawable.alert_dialog_icon) | |
180 | + .setIconAttribute(android.R.attr.alertDialogIcon) | |
181 | 181 | .setTitle(R.string.alert_dialog_single_choice) |
182 | 182 | .setSingleChoiceItems(R.array.select_dialog_items2, 0, new DialogInterface.OnClickListener() { |
183 | 183 | public void onClick(DialogInterface dialog, int whichButton) { |
@@ -254,7 +254,7 @@ public class AlertDialogSamples extends Activity { | ||
254 | 254 | LayoutInflater factory = LayoutInflater.from(this); |
255 | 255 | final View textEntryView = factory.inflate(R.layout.alert_dialog_text_entry, null); |
256 | 256 | return new AlertDialog.Builder(AlertDialogSamples.this) |
257 | - .setIcon(R.drawable.alert_dialog_icon) | |
257 | + .setIconAttribute(android.R.attr.alertDialogIcon) | |
258 | 258 | .setTitle(R.string.alert_dialog_text_entry) |
259 | 259 | .setView(textEntryView) |
260 | 260 | .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { |