Keyboard doesn't appears and the buttons on the parent view are clickable after popup appears
<p>After a specific button is clicked, a popup window appears on the screen. There is a edittext object on the popup, but I couldn't write int it, because keyboard doesn't appears. Secondly, the other buttons on parent view of popup are still clickable. How can I fix these? My code: </p>

<p>edit_text_popup.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="10dip"
    android:background="@color/conn_text" &gt;

    &lt;EditText
        android:id="@+id/editTextInPopup"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hello_world"
        android:padding="5dip"
        android:background="@color/blue3"&gt;
    &lt;/EditText&gt;
    &lt;RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:padding="10dip"&gt;
        &lt;Button
            android:id="@+id/popupcommitbutton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/ok"/&gt;

        &lt;Button
            android:id="@+id/popupcancelbutton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/cancel"
            android:layout_alignParentRight="true" /&gt;
    &lt;/RelativeLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>where popup is called:</p>

<pre><code>public class GroupConnections extends Activity implements OnClickListener {
    Category thiscat;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);     
        setContentView(R.layout.activity_group_connections);        
        View addMoreConnButton =findViewById(R.id.attachMorePeopleButton);
        View editPropButton = findViewById(R.id.editCategoryPropertiesButton);
        addMoreConnButton.setOnClickListener(this);
        editPropButton.setOnClickListener(this);

        //get selected category
        int catId = getIntent().getExtras().getInt("categoryid");
        thiscat = (Category)SocialRssModel.Instance().holders.get(catId);

        //set text views        
        TableRow tabler = (TableRow)findViewById(R.id.tableRow1);
        TextView cateNameTextView = (TextView)tabler.findViewById(R.id.numOfContentsTextView2);
        cateNameTextView.setText(thiscat.getName());

        tabler = (TableRow)findViewById(R.id.tableRow2);
        CheckBox enable = (CheckBox)tabler.findViewById(R.id.notificationCheckBox);
        enable.setChecked(thiscat.isSelected());
    }
    /**
     * Button listeners are specified
     */
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.attachMorePeopleButton:
                Intent i = new Intent(this, AddMoreConnections.class);
                startActivity(i);
                break;
            case R.id.editCategoryPropertiesButton:
                LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
                View popupView = layoutInflater.inflate(R.layout.edit_text_popup, null);
                final PopupWindow editpopup = new PopupWindow(popupView,LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
                //specify cancel button
                View cancelbutton = popupView.findViewById(R.id.popupcancelbutton);
                cancelbutton.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View arg0) {
                        editpopup.dismiss();
                    }
                });
                //specify edittext
                editpopup.setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE);
                editpopup.showAsDropDown(findViewById(R.id.editCategoryPropertiesButton), 0, -30);
                break;

            // More buttons go here (if any) ...
        }
    }
}
</code></pre>

<p>Activity tag in AndroidManifest to show softInputMode is not hidden:</p>

<pre><code>&lt;activity
    android:name=".GroupConnections"
    android:label="@string/app_name" &gt;
&lt;/activity&gt;
</code></pre>
