OnScrollChanged Listener For AlertDialog in Android
I have a `AlertDialog` which shows text contents as a `AlertDialog.message(message)`.

I need to do some action when the `AlertDialog` contents scrolled.

I tried to use `OnScrollChangedListener Interface` with `ViewTreeObserver`.

The problem is when i scrolled the `View` its not getting listened by the `OnScrollChanged` Listener.


May be i went wrong in somewhere in my code or i am being blind about the use of `OnScrollChangedListener` `Interface` usage.


Here my code follows,

    View newViewForDialog = new View(Activity.this);
    		
    		final AlertDialog.Builder builder = new AlertDialog.Builder(newViewForDialog.getContext())
    				.setTitle(title).setMessage(message)
    				.setIcon(R.drawable.icon)
    				.setNegativeButton("Ok", new Dialog.OnClickListener() {
    
    					public void onClick(DialogInterface dialog, int which) {
    
    						this.dismiss();
    					}
    
    				});
    		
    		builder.create().show();
    		
    		
    		
    		
            newViewForDialog.getViewTreeObserver().addOnScrollChangedListener(new OnScrollChangedListener() {
    			
    			public void onScrollChanged() {
    //To Do When The View has been Scrolled				
    			}
    		}); 



Please help me to come out from this, because i reviewed more, modified more in my code, and messed with everything. 

Thanks in andvance...
OnScrollChanged Listener For AlertDialog in Android
===

I have a `AlertDialog` which shows text contents as a `AlertDialog.message(message)`.

I need to do some action when the `AlertDialog` contents scrolled.

I tried to use `OnScrollChangedListener Interface` with `ViewTreeObserver`.

The problem is when i scrolled the `View` its not getting listened by the `OnScrollChanged` Listener.


May be i went wrong in somewhere in my code or i am being blind about the use of `OnScrollChangedListener` `Interface` usage.


Here my code follows,

    View newViewForDialog = new View(Activity.this);
    		
    		final AlertDialog.Builder builder = new AlertDialog.Builder(newViewForDialog.getContext())
    				.setTitle(title).setMessage(message)
    				.setIcon(R.drawable.icon)
    				.setNegativeButton("Ok", new Dialog.OnClickListener() {
    
    					public void onClick(DialogInterface dialog, int which) {
    
    						this.dismiss();
    					}
    
    				});
    		
    		builder.create().show();
    		
    		
    		
    		
            newViewForDialog.getViewTreeObserver().addOnScrollChangedListener(new OnScrollChangedListener() {
    			
    			public void onScrollChanged() {
    //To Do When The View has been Scrolled				
    			}
    		}); 



Please help me to come out from this, because i reviewed more, modified more in my code, and messed with everything. 

Thanks in andvance...