How to set up a Login Dialog in Android?

view story

http://stackoverflow.com – I was trying to add a login in my edit button. What I want to do is that, when a user selected an item to edit, then hits the edit button a pop-up will show asking for the person's username and password. I tried making a login dialog but I keep on failing. Here is my code: public void btn_edit_click(View v){ LayoutInflater li = LayoutInflater.from(context); View prompt = li.inflate(R.layout.prompts, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); alertDialogBuilder.setView(prompt); final String username = getIntent().g (HowTos)