title: how to make alertdialog show with listview?
body: <p>i want to show alertdialog when i click on a listview on my activity, i have a code to show the alertdialog but i know something wrong with my code and i dont know how to fix it, the alert didn't show like what i want.
  here's my code :</p>
  
  <pre><code>@Override
  protected void onListItemClick(ListView l, View v, int position, long id) {
  
      new bike_type_dao(responsetype).view_bike_type();
  
  
      final Entity_Brand brand = adapterBrand.getItem(position);
  
  
      builder = new Dialog(this);
      builder.setTitle(brand.getBrand_name());
      LayoutInflater li = (LayoutInflater) this
              .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View view = li.inflate(R.layout.tab_brand_activity, null, false);
      builder.setContentView(view);
      builder.setCancelable(true);
  
      listtype = (ListView) builder.findViewById(R.id.list_sepeda);
      listtype.setOnItemClickListener((OnItemClickListener) this);
      listtype.setAdapter(new ArrayAdapter&lt;Entity_Bike_Type&gt;(this,
              android.R.layout.simple_list_item_1, arrayList));
      listtype.showContextMenu();
  
  
      builder.show();
  
  }
  </code></pre>
  
  <p>i hope someone can help me with this problem. thankyou.</p>