2015-07-03 12 views
0

我開發動態創建textviews一個應用程序,和期望的結果將是:的Android附加的TextView上述其他textviews

textview1 
textview2 
textview3 

(然後當用戶創建新的TextView)

textview4 
textview1 
textview2 
textview3 

但截至目前,textview4進入textview3

文本瀏覽是在一個線性佈局下。

我該如何達到預期的效果?

謝謝。

+0

可以顯示一些代碼和XML .. – Ranjit

回答

1

您需要使用:

addView (View child, int index) 

指數是在視圖中的位置(0,如果你想擁有它在頂部)