당신은 프로그램에 다음과 같은 코드를 작성하여 (이 경우 글고 치기를)보기를 만들 수 있습니다에서 당신이 얻을 수있는 자세한 내용은
Intent i=new Intent(MainActivity.this,NexActivity.class);
startActivity(i);
를 사용하여 작업을 수행 할 수 있습니다 귀하의 자바 파일.
//Main layout ID in your activity_main.xl
LinearLayout mainLayout = (LinearLayout) findViewById(R.id.linearLayoutHorizontal);
//Creating the edittext
EditText editTextOne = new EditText(this);
//You can also add properities here
editTextOne.setHint("Hello World");
editTextOne.setHintTextColor(Color.CYAN);
//Adding the edittext to the xml file
mainLayout.addView(editTextOne);
여기 좋은 튜토리얼입니다 : http://android-er.blogspot.ca/2013/05/add-and-remove-view-dynamically.html
먼저 몇 가지 기본적인 안드로이드 자습서를 읽어 보시기 바랍니다. –
나는 많은 것을 알고 읽었습니다. 그러나이 주제는 그것에 대해 혼란 스럽습니다. 나는 addView에 대해 알고있다. – Prince
대신 "_assume you have ..._"를 작성하는 대신 여기에 관련 코드를 게시하십시오. – csmckelvey