2017-10-15 61 views

回答

0

您可以用簡單的方式添加動態佈局:

final LinearLayout lm = (LinearLayout) findViewById(R.id.linearMain); 
TextView tv = new TextView(this); 
tv.setText("Name"); 
lm.addView(tv); 

交替您可以創建一個Recyclerview和dynamicaly添加元素。