0
我目前正在嘗試找到一種方法來獲得諸如「東西,東西,這個,」這樣的輸入,然後能夠將每個單獨的部分分割成不同的值,以便我可以將它們用於不同的東西。輸入分割方法
例如將它們放置到它們自己的TextView位置或根據輸入設置計時器,但仍然能夠完全使用其他信息。
我在使用eclipse之前就已經看到了這一點,我目前正試圖從他們那裏獲取代碼,但到目前爲止我還沒有得到任何迴應。
感謝您提前提供任何幫助,我有一種感覺,這將是一個艱難的事情。
編輯: 我想用它來編輯結果
<TextView
android:id="@+id/LocationFixed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/location"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/LocationResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/locationResult" />
<TextView
android:id="@+id/TimeFixed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/time"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/TimeResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/timeResult" />
<TextView
android:id="@+id/CostFixed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cost"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/CostResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/costResult" />
視圖參考
我將要做的調用每個不同的人將它們應用到不同的佈局TextViews 。 (給我一分鐘上傳我的意思,如果這將有助於代碼) –
@Tehjohn editted。與其他textviews一樣 –
因此,要使'LocationResult'「this」,我會使用't.setText(s2 [2]);'? –