Я хотел бы добавить вертикальную полосу прокрутки в AlertDialog, потому что мой текст слишком длинный для отображения на 1 экране:
Я попытался использовать:
android:scrollbars="vertical" 
android:scrollbarAlwaysDrawVerticalTrack="true"
но полосы прокрутки даже не отображаются?
Вот файл макета xml, который я использую:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scrollbars="vertical"
    android:scrollbarAlwaysDrawVerticalTrack="true"
    android:id="@+id/instructions_view" >
    <TextView
        android:id="@+id/TextView01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="A LONG TEXT 1"/>
    <TextView 
        android:id="@+id/TextView02"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="A LONG TEXT 2"/>
</LinearLayout>
Я вызываю AlertsDialog с помощью:
public void onClick(View v) {
  switch(v.getId()){
    case R.id.Button_Instructions: 
     InstructionsDialog();
    break;
    case R.id.Button_Exit: 
     ExitDialog();
    break;
    }
 }
public void InstructionsDialog(){
  AlertDialog.Builder ad = new AlertDialog.Builder(this);
  ad.setIcon(R.drawable.icon);
  ad.setTitle("Instructions ...");
  ad.setView(LayoutInflater.from(this).inflate(R.layout.instructions_dialog,null));
  ad.setPositiveButton("OK", 
    new android.content.DialogInterface.OnClickListener() {
     public void onClick(DialogInterface dialog, int arg1) {
      // OK, go back to Main menu
     }
    }
   );
   ad.setOnCancelListener(new DialogInterface.OnCancelListener(){
    public void onCancel(DialogInterface dialog) {
     // OK, go back to Main menu   
    }}
   );
  ad.show();
 }
Я нашел ответ сейчас = > ЭТО РАБОТАЕТ С ЭТОЙ:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ScrollView01"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:scrollbars="vertical"
        android:scrollbarAlwaysDrawVerticalTrack="true"
        android:id="@+id/instructions_view" >
        <TextView
            android:id="@+id/TextView01"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="A LONG TEXT 1"/>
        <TextView
            android:id="@+id/TextView02"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="A LONG TEXT 2"/>
    </LinearLayout>
</ScrollView>