嗨,我正在尝试开始制作一个 android 应用程序(初学者的东西),我希望用户在文本框中输入的任何内容都可以转到我拥有的文本视图,我已经通过引用所有 id 来启动我的代码并搜索了所有在互联网上,但每次我尝试它时,我都会遇到错误,有人可以帮助我使用一些可以做到这一点的简单代码。
public class BitActivity extends Activity {
EditText INPUT;
TextView byte1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bit);
INPUT = (EditText) findViewById(R.id.input);
byte1 = (TextView) findViewById(R.id.byte1);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}