我試圖做一個不錯的應用程序,並在此應用程序;
我想提出一個時間表和時間表將包括"Image", "2 TextBlock" and "2 Buttons"
。
我該如何創建類似的東西。我將從web api service
獲取我的數據。
我發現進行異步調用來獲取數據,但無法創建時間線的模式。在Android中創建時間軸
我該怎麼辦?
等待您的意見,謝謝。我GOOGLE了很多,但始終發現基本listviews
。
我試圖做一個不錯的應用程序,並在此應用程序;
我想提出一個時間表和時間表將包括"Image", "2 TextBlock" and "2 Buttons"
。
我該如何創建類似的東西。我將從web api service
獲取我的數據。
我發現進行異步調用來獲取數據,但無法創建時間線的模式。在Android中創建時間軸
我該怎麼辦?
等待您的意見,謝謝。我GOOGLE了很多,但始終發現基本listviews
。
<LinearLayout orientation="vertical">
</ImageView>
<LinearLayout orientation="horizontal">
</TextBox>
</TextBox>
</LinearLauout>
<LinearLayout orientation="horizontal">
</Button>
</Button>
</LinearLauout>
</LinearLayout>
下圖描述了你的頁面的設計視圖
編輯:我如何劃分線性佈局等於2塊?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/btn_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="10" >
<Button
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="5"
/>
<Button
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="5" />
</LinearLayout>
</LinearLayout>
你能幫我解決這個按鈕問題嗎?我怎樣才能將線性佈局等分爲兩部分?謝謝。 –
@KuthayGumus我已經更新了答案plz看看 – Amith
您可以創建類似於您的圖像的XML文件。使用相對和線性佈局來設計你的結構 –
我使用片段視圖爲我的選項卡。我怎麼能把它放在fragmentlayout裏面? –
你可以設計一個xml,並通過代碼將它膨脹到你的分片佈局。 –