首先我們產生一個隨機數(例如從比如0〜10): If randomNumber = 0
Animate imageSet0 [here we create an ImageArray and an animate function – please see code below)
Else if randomNumber = 1
Animate imageSet1
Else
Here the vector of what i'm trying to do 會有2個標籤和這兩個標籤頁之間的一個imageview的什麼的,標誌應該是不可點擊。 我已經嘗試了幾乎所有的方法,但都失敗了。 任何人知道如何做到這一點? 代碼: TabLayout tabLayout = (TabLayout) view.findViewById(R.id.tabs2);
tabLa
所以我需要創建一個簡單的棋盤遊戲。它基於一個片段內的Gridview(10x10)。該活動還顯示了帶有控件的另一個片段(從左下方向右上方)。 當我按下控件片段上的一個按鈕時,我需要移動GridView中的圖像。到目前爲止,我設法填充GridView,但我無法弄清楚如何移動圖像。 這是網格片段 public class Grid extends Fragment{
GridView g