tags:

views:

57

answers:

0

I have an EditText area that is not showing due to the keyboard covering it when the focus is on the EditText area. What I want to do is use a button to call an activity that will display a editable text area that overlays the main display and returns the value to the main activity which stores it in a separate class variable.

I added the activity to the main manifest xml.

I added an onClickListener to a button.

Here is some code:

TextEntryActivity class:

public class TextEntryActivity extends Activity{
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.text_entry);

    EditText edit = (EditText)findViewById(R.id.editable);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,  
            WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

}

}

I have a separate XML file for the layout of the blurr.

Originally I had an onClickListerner for an onSave button that stored all the info:

 private View.OnClickListener onSave = new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        Log.d(DEB_TAG, "INSIDE ONCLICK");
        mCurrent = new Restaurant();

        mCurrent.setName(mName.getText().toString());
        mCurrent.setAddr(mAddr.getText().toString());
        mCurrent.setDate(mDateDisplay.getText().toString());
        mCurrent.setNotes(mNotes.getText().toString());

        switch (mTypes.getCheckedRadioButtonId()){
            case R.id.fast_food:
                mCurrent.setType("fast_food");
                break;.........

The new activity is to provide a different view to add a "note"

Does this make sense? I am fairly new to this and know what I want to do in my head, but describing it can be a challenge.