ورود

View Full Version : مشکل در طراحی UI



perkas
سه شنبه 06 اسفند 1392, 01:52 صبح
من میخوام یه فرم طراحیکنم به شکل زیر ولی یه مشکل دارم

http://upload7.ir/imgs/2014-02/43590219316799539981.png (http://upload7.ir/)

در قسمت 1 سایزشومیذارم رو سایز دلخواه و مشکلی تو این قسمت ندارم
ولی مشکلم تو بخش 2 و 3 هست

با توجه به اینکه در بخش 2 از scrollView استفاده کردم اگر تعداد اشیاء داخلش از ظرفیت سایز گوشی یا تبلت بیشتر بشن قسمت 3 نمایش داده نمیشه

با انواع لایوت هم تست کردم نتیجه نگرفتم

لطفا راهنمایی کنید

jalil_gh
سه شنبه 06 اسفند 1392, 11:26 صبح
می‌تونید به این صورت بنویسید:

<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"
android:padding="10dp">


<LinearLayout android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#0000ff"
android:orientation="horizontal"
android:layout_marginBottom="10dp"></LinearLayout>

<LinearLayout android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#ff0000"
android:orientation="vertical"
android:layout_marginBottom="10dp">

<ScrollView android:layout_width="match_parent"
android:layout_height="wrap_content">

</ScrollView>

</LinearLayout>

<LinearLayout android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#00ff00"
android:orientation="horizontal"></LinearLayout>

</LinearLayout>