Set Positive|Neutral|Negative Buton disabled in AlertDialog


今日はAlertDialogのボタンが使えなくて、ずっと空の指針が異常に現れています。コードも正常ですね。AlertDialog.Burder.create()を見てから呼び出します。
   
   
   
   
  1. dialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);  
インターネットでも似たような問題が見つかりました。http://www.anddev.org/set_positive_ブットン.アワdisabled_同前alertdialog-t 3506.
I get another trouble with it.I'm trying to retrieve this button on on on CreateDialog(…)method,I always get null Point Exception by using
   
   
   
   
  1. (AlertDialog)dialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);   
Before or after:
   
   
   
   
  1. dialog=builder.create()  
 dialog.show()の後でなければ使えません。
   
   
   
   
  1. dialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);   
そうでなければ、create方法の後でも、入手したButtonは空です。APIを見ました。 
    
    
    
    
  1. Creates a AlertDialog with the arguments supplied to this builder. It does not show() the dialog. This allows the user to do any extra processing before displaying the dialog. Use show() if you don't have any other processing to do and want this to be created and displayed.   
  2.  
私の理解では、 つまり、Show(Display)というダイアログの前に、createメソッドを呼び出しても、その状態は不確定で、どのような処理ができますか?この場合は、ダイアログのButtonや他の要素が入手できません。