• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

development


Commit MetaInfo

Revisãoe4d6bfae6565949bca6b39a5a559095e95698415 (tree)
Hora2011-01-09 06:29:50
AutorAdam Powell <adamp@goog...>
CommiterAdam Powell

Mensagem de Log

Update dialog demos for API changes related to setting themed icons.

Change-Id: I73213f9593a381bd43b935aa2fa020ec3d6095d7

Mudança Sumário

Diff

--- a/samples/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.java
+++ b/samples/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.java
@@ -77,7 +77,7 @@ public class AlertDialogSamples extends Activity {
7777 switch (id) {
7878 case DIALOG_YES_NO_MESSAGE:
7979 return new AlertDialog.Builder(AlertDialogSamples.this)
80- .setIcon(R.drawable.alert_dialog_icon)
80+ .setIconAttribute(android.R.attr.alertDialogIcon)
8181 .setTitle(R.string.alert_dialog_two_buttons_title)
8282 .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {
8383 public void onClick(DialogInterface dialog, int whichButton) {
@@ -94,7 +94,7 @@ public class AlertDialogSamples extends Activity {
9494 .create();
9595 case DIALOG_YES_NO_LONG_MESSAGE:
9696 return new AlertDialog.Builder(AlertDialogSamples.this)
97- .setIcon(R.drawable.alert_dialog_icon)
97+ .setIconAttribute(android.R.attr.alertDialogIcon)
9898 .setTitle(R.string.alert_dialog_two_buttons_msg)
9999 .setMessage(R.string.alert_dialog_two_buttons2_msg)
100100 .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {
@@ -118,7 +118,7 @@ public class AlertDialogSamples extends Activity {
118118 .create();
119119 case DIALOG_YES_NO_ULTRA_LONG_MESSAGE:
120120 return new AlertDialog.Builder(AlertDialogSamples.this)
121- .setIcon(R.drawable.alert_dialog_icon)
121+ .setIconAttribute(android.R.attr.alertDialogIcon)
122122 .setTitle(R.string.alert_dialog_two_buttons_msg)
123123 .setMessage(R.string.alert_dialog_two_buttons2ultra_msg)
124124 .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {
@@ -156,7 +156,7 @@ public class AlertDialogSamples extends Activity {
156156 .create();
157157 case DIALOG_PROGRESS:
158158 mProgressDialog = new ProgressDialog(AlertDialogSamples.this);
159- mProgressDialog.setIcon(R.drawable.alert_dialog_icon);
159+ mProgressDialog.setIconAttribute(android.R.attr.alertDialogIcon);
160160 mProgressDialog.setTitle(R.string.select_dialog);
161161 mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
162162 mProgressDialog.setMax(MAX_PROGRESS);
@@ -177,7 +177,7 @@ public class AlertDialogSamples extends Activity {
177177 return mProgressDialog;
178178 case DIALOG_SINGLE_CHOICE:
179179 return new AlertDialog.Builder(AlertDialogSamples.this)
180- .setIcon(R.drawable.alert_dialog_icon)
180+ .setIconAttribute(android.R.attr.alertDialogIcon)
181181 .setTitle(R.string.alert_dialog_single_choice)
182182 .setSingleChoiceItems(R.array.select_dialog_items2, 0, new DialogInterface.OnClickListener() {
183183 public void onClick(DialogInterface dialog, int whichButton) {
@@ -254,7 +254,7 @@ public class AlertDialogSamples extends Activity {
254254 LayoutInflater factory = LayoutInflater.from(this);
255255 final View textEntryView = factory.inflate(R.layout.alert_dialog_text_entry, null);
256256 return new AlertDialog.Builder(AlertDialogSamples.this)
257- .setIcon(R.drawable.alert_dialog_icon)
257+ .setIconAttribute(android.R.attr.alertDialogIcon)
258258 .setTitle(R.string.alert_dialog_text_entry)
259259 .setView(textEntryView)
260260 .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() {