就像你可以在这里看到的,用户必须提供一个SIM卡号码,当提供这个号码时,我想填写内容自动添加SIM卡号码是提供。 我认为我必须自动更新(Autoupdate?)活动或类似的东西。如果任何人都可以通过编辑我所做的或者通过提供示例来帮助我,这将非常有帮助! 非常感谢您自动更新我的活动,以显示哪些被写
我的应用程序的图像是在这里:http://imageshack.us/a/img199/1561/12216127.png
我的代码是在这里:
public class RegulationTime extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
EditText edit2;
super.onCreate(savedInstanceState);
setContentView(R.layout.regulation_time);
// Show the Up button in the action bar.
setupActionBar();
//Récupérer le n° de la carte SIM saisi par l'utilisateur
EditText edit1 = (EditText) findViewById(R.id.regedit1);
String simCard = edit1.getText().toString();
//Récupérer le n° du destinataire & le saisir automatiquement dans l'EditText
String recoverRN = MasterNumber.getDefaults("mehmet", RegulationTime.this);
edit2 = (EditText) findViewById(R.id.regedit2);
edit2.setText(recoverRN);
//On rentre automatiquement le texte "#152#SIMCardNumber#" à la place de l'utilisateur
EditText edit3 = (EditText) findViewById(R.id.regedit3);
String concatenation;
if(simCard.length()>0)
{
concatenation = "#152#" + simCard + "#";
edit3.setText(concatenation);
}
}
}
什么是您所遇到的问题?有错误吗? logcat的? – codeMagic
@codeMagic我没有任何错误。我必须自动更新我的应用程序,但我不知道如何!就像你在我的活动中看到的一样,我什么也没做,因为我不知道我该怎么做这件事! – d3vpasha
请更清楚地解释你想要发生的事情吗? – codeMagic