2012-10-10 65 views
-3

可能重複:
how to translate my logic into android programming怎麼我的邏輯轉化爲機器人編程

我有3位圖和1標籤

"""""""""""""""""""""""""" 
label 
"""""""""""""""""""""""""" 
bitmap1 
bitmap2 
bitmap3 
"""""""""""""""""""""""""" 

插圖

如果bitmap1拖動w第i個手指向右然後標籤設定爲值10

""""""""""""""""""""""""""" 
10 
""""""""""""""""""""""""""" 
       bitmap1 
bitmap2 
bitmap3 
""""""""""""""""""""""""""" 

如果用手指bitmap2拖動到右邊,然後標籤設定爲值20

""""""""""""""""""""""""""" 
20 
""""""""""""""""""""""""""" 
bitmap1 
      bitmap2 
bitmap3 
""""""""""""""""""""""""""" 

如果用手指bitmap3拖動到右邊,然後標籤設定爲值30

""""""""""""""""""""""""""" 
30 
""""""""""""""""""""""""""" 
bitmap1 
bitmap2 
      bitmap3 
""""""""""""""""""""""""""" 

我該怎麼做?

請幫我

我是在Android

+0

你的Java和Android – keyser

+0

讀了如果你沒有任何代碼,給我們至少有一些洞察到你對你的問題的看法。也許你甚至可以想出一些僞代碼:) – halex

回答

0

新手也許這會適合你的概率:

<?xml version="1.0" encoding="utf-8"?> 

<TextView 
    android:id="@+id/textView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="TextView" /> 

<ImageView 
    android:id="@+id/ImageView02" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/sub" /> 

<ImageView 
    android:id="@+id/ImageView01" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/sub" /> 

<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:src="@drawable/sub" /> 

你只需要惡魔讓一位聽衆根據狀態更改位圖的gravity

好運;)