Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom alert dialogbox error
    primarykey
    data
    text
    <p>Hi guys thanks in advance ...</p> <p>I am trying to show an alert dialog in my activity but I am getting some error ....</p> <p>I followed code from <a href="http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog" rel="nofollow noreferrer">http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog</a> last section of that link ....</p> <p><img src="https://i.stack.imgur.com/EixLO.png" alt="enter image description here"></p> <p>same mine see below </p> <p><img src="https://i.stack.imgur.com/1thrM.png" alt="enter image description here"></p> <p>and as shown there I wrote code </p> <p><img src="https://i.stack.imgur.com/XpwEa.png" alt="enter image description here"></p> <p>and my code is below which is called on button click </p> <pre><code>AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext; mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(LAYOUT_INFLATER_SERVICE); layout = inflater.inflate(R.layout.search_dialog,(ViewGroup)findViewById(R.id.search_root)); builder = new AlertDialog.Builder(mContext); builder.setView(layout); alertDialog = builder.create(); alertDialog.show(); </code></pre> <p>and only difference is </p> <pre><code>public class CatalogueActivity extends FragmentActivity{ </code></pre> <p>and it shows error like below </p> <p><img src="https://i.stack.imgur.com/j93nL.png" alt="enter image description here"></p> <p>I hope you understand my problem ...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload