package com.example.addmultitext; import android.app.*; import android.os.*; import android.widget.*; import android.view.Menu; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); setContentView(ll); TextView tv1 = new TextView(this); tv1.setText("歡迎使用Android!"); TextView tv2 = new TextView(this); tv2.setText("再次感謝使用Android!"); ll.addView(tv1); ll.addView(tv2); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
arrow
arrow
    文章標籤
    android display multi line text
    全站熱搜

    痞客興 發表在 痞客邦 留言(0) 人氣()