问题描述:

My logcat is showing this warning when I am trying to put an entry into my app. Probably, somewhere within my EditText handling is throwing this.

01-24 10:44:34.470 2404-2404/org.andrewjakevillegas.andrewjakevillegas.mymedlist W/IInputConnectionWrapper: finishComposingText on inactive InputConnection

01-24 10:44:35.472 2404-2404/org.andrewjakevillegas.andrewjakevillegas.mymedlist W/IInputConnectionWrapper: finishComposingText on inactive InputConnection

I have a main activity that calls another activity to add a drug entry and save it into a db. This addmed activity has some EditTexts that captures data.

Have anybody encountered this type of situation?

public class AddMed extends AppCompatActivity implements View.OnClickListener {

Button mAddMed;

EditText mDrugName2;

EditText mDose2;

EditText mRoute2;

EditText mFrequency2;

EditText mRefilldate2;

EditText mExpirationdate2;

DBAdapter dbcon;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate( savedInstanceState );

setContentView( R.layout.activity_add_med );

dbcon = new DBAdapter(this);

mDrugName2 = (EditText) findViewById( R.id.drugName2 );

mDose2 = (EditText) findViewById( R.id.dose2 );

mRoute2 = (EditText) findViewById( R.id.route2 );

mFrequency2 = (EditText) findViewById( R.id.frequency2 );

mRefilldate2 = (EditText) findViewById( R.id.refillDate2 );

mExpirationdate2 = (EditText) findViewById( R.id.expirationDate );

mAddMed = (Button) findViewById( R.id.update );

mAddMed.setOnClickListener( this );

}

@Override

public void onClick(View v) {

InputMethodManager inputMethodManager = (InputMethodManager)getSystemService( Context.INPUT_METHOD_SERVICE );

inputMethodManager.hideSoftInputFromWindow( mDrugName2.getWindowToken(), 0 );

switch (v.getId()){

case R.id.addMedicine:

String drugname = mDrugName2.getText().toString();

String dose = mDose2.getText().toString();

String route = mRoute2.getText().toString();

String frequency = mFrequency2.getText().toString();

String refilldate = mRefilldate2.getText().toString();

String expirationdate = mExpirationdate2.getText().toString();

dbcon.createMed( drugname, dose, route, frequency, refilldate, expirationdate );

Intent main = new Intent( AddMed.this, MedMainActivity.class );

startActivity( main );

break;

default:

break;

}

}

}

相关阅读:
Top