当我点击任何文本框时,我会收到以下警告。请帮助
W / IInputConnectionWrapper:在非活动的InputConnection上的finishComposingText W / IInputConnectionWrapper:在非活动的InputConnection上的finishComposingText W / IInputConnectionWrapper:在非活动的InputConnection上的finishComposingText
以下是Mainactivity
代码:
public class MainActivity extends AppCompatActivity implements View.OnClickListener{
private EditText editTextName;
private EditText editTextUsername;
private EditText editTextPassword;
private EditText editTextEmail;
private Button buttonRegister;
private static final String REGISTER_URL = "********************";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
editTextName = (EditText) findViewById(R.id.editTextName);
editTextUsername = (EditText) findViewById(R.id.editTextUserName);
editTextPassword = (EditText) findViewById(R.id.editTextPassword);
editTextEmail = (EditText) findViewById(R.id.editTextEmail);
buttonRegister = (Button) findViewById(R.id.buttonRegister);
buttonRegister.setOnClickListener(this);
}
@Override
public void onClick(View v) {
if(v == buttonRegister){
registerUser();
}
}
private void registerUser() {
String name = editTextName.getText().toString().trim().toLowerCase();
String username = editTextUsername.getText().toString().trim().toLowerCase();
String password = editTextPassword.getText().toString().trim().toLowerCase();
String email = editTextEmail.getText().toString().trim().toLowerCase();
register(name,username,password,email);
}
private void register(String name, String username, String password, String email) {
String urlSuffix = "?name="+name+"&username="+username+"&password="+password+"&email="+email;
class RegisterUser extends AsyncTask<String, Void, String>{
ProgressDialog loading;
@Override
protected void onPreExecute() {
super.onPreExecute();
loading = ProgressDialog.show(MainActivity.this, "Please Wait",null, true, true);
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
loading.dismiss();
Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();
}
@Override
protected String doInBackground(String... params) {
String s = params[0];
BufferedReader bufferedReader = null;
try {
URL url = new URL(REGISTER_URL+s);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));
String result;
result = bufferedReader.readLine();
return result;
}catch(Exception e){
return null;
}
}
}
RegisterUser ru = new RegisterUser();
ru.execute(urlSuffix);
}
}
这是什么警告?我怎么能避免它?