2015-09-28 45 views
0

我有一個RelativeLayout,它包含一組按鈕。在應用程序執行過程中,按鈕的順序被改變。在RelativeLayout中查找視圖的順序

如何在onDestroy()找到按鈕的順序?

+0

你使用哪種語言? – PMerlet

+0

我使用java,但平臺是Android和IDE是eclipse。 – hhl

回答

1
for(int i = 0; i < parentLayout.getChildCount(); i++){ 
    View child = parentLayout.getChildAt(i); 
    // other logic here 
} 
+0

非常好。非常感謝。對於我下面的代碼是完美: \t \t對(INT I = 0; I hhl