-1
組片段的EditText我有一個包含兩個setter方法ProfileFragment類:從父Activty
public void setPseudo(String pseudo){
textPseudo.setText(pseudo);
}
public void setEmail(String email){
textEmail.setText(email);
}
而且在我的活動,我想調用這些函數:
user = new ProfileFragment();
if (intent != null) {
user.setPseudo(intent.getStringExtra(USER_PSEUDO));
user.setEmail(intent.getStringExtra(USER_EMAIL));
}
它說:「能不解決方法...「。
這是否意味着我不能這樣做呢?
,USER_PSEUDO解決不了.. –
右鍵,你需要靜態IMPO室溫它 –
已經在範圍上,因爲我在一個又一個活動宣佈它 –