나는 활동이 있으며 대화 상자로 테마가 있습니다. 이 활동에서 , 10 개의 편집 텍스트가 있습니다. 하나의 편집 상자에서 편집 상자에 텍스트를 설정할 수 없습니다.android에서 텍스트를 편집하기위한 설정 텍스트
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
is_tablet=SharedVariables.sharedPrefDate.getBoolean("isTablet", false);
if(!is_tablet){
super.setTheme(android.R.style.Theme_Black_NoTitleBar);
}
//overridePendingTransition(R.anim.slide_bottom_to_top,0);
super.onCreate(savedInstanceState);
activity=UpdateCasePersonAddressScreen.this;
setContentView(R.layout.update_person_address_screen);
//allocating memory to objBLAddCasePersonScreenOperations
objBLAddPersonAddressScreenOperations=new BLAddUpdatePersonAddressScreenOperations();
objBLCommonOperations=new BLCommonOperations();
getAllIds();
//objPersonAddress=new clsPersonAddress();
bundle = getIntent().getExtras();
//code to get all objects using Bundle from previous activity
if(bundle!=null){
objPersonAddress = (clsPersonAddress) bundle.getParcelable("clsPersonAddress");
System.out.println("from Extras");
bundle=null;
}
initTextFields();
inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
/* if (inputMethodManager != null) {
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}*/
}
public void initTextFields(){
updatePersonAddressTitleEditText.setText(objPersonAddress.getAddressTitle());
updatePersonAddressMemoEditText.setText(objPersonAddress.getAddressMemo());
updatePersonAddressNameEditText.setText(objPersonAddress.getAddressName());
updatePersonAddressBusinessNameEditText.setText(objPersonAddress.getAddressBusinessName());
updatePersonAddressWorkPhoneEditText.setText(objPersonAddress.getAddressWorkPhone());
updatePersonAddressHomePhoneEditText.setText(objPersonAddress.getAddressHomePhone());
updatePersonAddressMobilePhoneEditText.setText(objPersonAddress.getAddressMobilePhone());
updatePersonAddressAddressLine1EditText.setText(objPersonAddress.getAddressLine1());
updatePersonAddressAddressLine2EditText.setText(objPersonAddress.getAddressLine2());
updatePersonAddressCityEditText.setText(objPersonAddress.getAddressCity());
System.out.println("objPersonAddress.getAddressState()))))))))))))))))))))))))))))))))))"+objPersonAddress.getAddressState());
updatePersonAddressStateEditText.setText(objPersonAddress.getAddressState().toString());//setText(objPersonAddress.getAddressState(), TextView.BufferType.EDITABLE);
System.out.println("updatePersonAddressStateEditText text is now is:"+updatePersonAddressStateEditText.getText().toString()+"null check:"+updatePersonAddressStateEditText.toString());
System.out.println("below objPersonAddress.getAddressState()))))))))))))))))))))))))))))))))))"+objPersonAddress.getAddressState());
updatePersonAddressZipEditText.setText(objPersonAddress.getAddressZip());
updatePersonAddressCountryEditText.setText(objPersonAddress.getAddressCountry());
}
공공 무효에서 onCreate (번들 savedInstanceState)는 {어떤 몸은 사전에이 issue.For에 어떤 도움 덕분에 나에게 도움이 될 수 있습니다.
귀하의 질문에 더 명확 해주십시오. 우리가 어떤 실수를했는지 알 수 있도록 코드를 제공하십시오. 우리는 단순히이 문제를 찾을 수 없습니다. –
다른 9 개의 텍스트 상자의 코드는 어디에 있습니까? – bacchus
내 코드 라인은 updatePersonAddressStateEditText.setText (objPersonAddress.getAddressState()); 그 객체로부터 나는 내가 다음과 같이 쓴 데이터를 얻었지만 텍스트를 편집 텍스트로 설정하지 않았습니다. – user1108995