آموزش های این وب سایت به صورت رایگان در دسترس است. اطلاعات بیشتر
بروز خطا
   [message]
اشتراک در سوال
رای ها
[dataList]

طراحی ui

سپهر  11 سال پیش  11 سال پیش
+1 0

چطور میشه یک ui به صورت زیر طراحی کرد ؟ ممنون میشم راهنمایی کنید

 برای این سوال 5 پاسخ وجود دارد.
پاسخ به سوال 
MILAD-MB  11 سال پیش
+4 0

سلام اگه اشتباه نکنم باید اینطور باشه. برای اینکه بیشتر بتونید روی این طرح مسلط باشید، در بعضی Layou ها  از RelativLayout استفاده کنید. اگه دوستان راه دیگه ای هم دارن مطرح کنند...

 

 

0 0
البته سایز ImageView ها بستگی به خودتون داره که چه اندازه ای باشه. (11 سال پیش)
0 0
دقیقا به همین صورت میخواستم ، ممنون از کمکت ، سعی میکنم خودم پیاده سازیش کنم ، اگر لطفی کنی و کدهای xml ش رو هم در پاسخ بذاری ممنونت میشم (11 سال پیش)
0 0
الان نقش relativelayout 2 چی هست در اینجا؟ (11 سال پیش)
0 0
چطور relativelayout 2 رو بردین زیر linearlayout ؟ من هر کاری میکنم روی اون قرار میگیره (11 سال پیش)
0 0
اون جوری که در تصویر مشخصه به نظر میاد RelativeLayout 2 زیر مجموعه ی RelativeLayout 1 قرار گرفته. (11 سال پیش)
0 0
خب درسته ولی بازم میفته روش ، به نظرم باید margin داده باشه بهش ، مطمئن نیستم (11 سال پیش)
0 0
یه چیز دیگه هم هست اون دو تا Layout قرمز و سبز رو من تو قسمت outLine نمیبینم، الان خودمم کنجکاو شدم ببینم میتونم اینو بسازم یا نه .تا حالا با Relative کار نکردم (11 سال پیش)
0 0
layout قرمز همون linearlayout هست و آبیه هم relative layout 2 این جوری که من متوجه شدم و بهشون background داده (11 سال پیش)
0 0
تونستم پیاده سازیش کنم با margin ولی نمیدونم کار درستی هست یا نه اما همین خروجی رو بهم داد (11 سال پیش)
0 0
کد xmlشو بذارید لطفاً. وقتی درگ میکنیم خودشون بسته به موقعیت آیتم ها align میشن .چه جالب :) (11 سال پیش)
0 0
سلام. شما اصلا تمام Layout هاتونو روی RelativLayout ست کنید. با کشیدن Image ها براحتی میتونید انجام بدید. اما بعضی وقتا مشکل ساز میشه که داخل این طراحی مشکلی ایجاد نکرد (11 سال پیش)
پاسخ به سوال 
سپهر  11 سال پیش
+2 0

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="48dip"
android:background="#ff33b5e5" >

<ImageView
android:id="@+id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:scaleType="centerInside"
android:src="@drawable/ic_launcher" />

<ImageView
android:id="@+id/search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/login"
android:layout_toRightOf="@+id/login"
android:scaleType="centerInside"
android:src="@drawable/ic_launcher" />

<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<ImageView
android:id="@+id/drawer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/ic_launcher" />
</LinearLayout>

<ImageView
android:id="@+id/ImageView01"
android:layout_width="fill_parent"
android:layout_height="100dip"
android:layout_marginTop="48dip"
android:scaleType="fitXY"
android:src="@drawable/back" />

<ListView
android:id="@+id/listView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="148dip" >
</ListView>

<ImageView
android:id="@+id/profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dip"
android:scaleType="centerInside"
android:src="@drawable/nature" />

</RelativeLayout>
پاسخ به سوال 
override  11 سال پیش
+1 0

منم جواب گرفتم ولی اینطوری

 

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="130dip"
android:background="#00ff00" >

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

<ImageView
android:id="@+id/ImageView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/article" />
</LinearLayout>


<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="60dip"
android:layout_above="@+id/listView1"
android:background="#00ffff" >

</RelativeLayout>


<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout1" >

</ListView>

<ImageView
android:id="@+id/ImageView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/linearLayout1"
android:layout_alignParentLeft="true"
android:layout_marginBottom="30dp"
android:layout_marginLeft="112dp"
android:src="@drawable/article" />

</RelativeLayout>
0 0
پس فکر کنم با همون margin باشه اونم (11 سال پیش)
0 0
دوستان حواستون به دستگاه های مختلف هم باشه ، همین رو تو صفحه ی بزرگ تر و کوچیک تر هم تست کنید (11 سال پیش)
پاسخ به سوال 
MILAD-MB  11 سال پیش
0 0

مجتبی جان توی صفحه های کوچک و بزرگ تست کردم خدا رو شکر مشکلی نداشت

 

 

 

0 0
شما هم از margin استفاده کردی؟ (11 سال پیش)
0 0
نه استفاده نکردم. شما اگه از RelativLayout استفاده کنید حساب کار دستتون میاد. یک بار انجام بدین و اطلاع بدید. وقتی روی این Layout ست میکنی با موس اون ایمیج ها رو بکش و جابه جا کن. برای Layout هم طبق روش استاد سایز بندی کن :) (11 سال پیش)
0 0
خب من هم با موس اون تصویر وسط رو جا به جا کردم خودش اتوماتیک margin اضافه کرد منظور اینه که در فایل xml شما هم در کد xml برای تصویر آخر margin اضافه شده ؟ کد xml که گذاشتم نگاه کنید برای تصویر آخر margin ست شده. (11 سال پیش)
0 0
الان کد رو پایین می نویسم ببینید (11 سال پیش)
پاسخ به سوال 
MILAD-MB  11 سال پیش
+1 0

خدمت شما...

 

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="#BA2A63"
android:orientation="horizontal" >

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

<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
</LinearLayout>

<RelativeLayout
android:id="@+id/RelativeLayout2"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/linearLayout1"
android:background="#12C9B1"
android:orientation="vertical" >
</RelativeLayout>

<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/RelativeLayout2"
android:layout_centerHorizontal="true"
android:layout_marginBottom="22dp"
android:src="@drawable/ic_launcher" />

<ListView
android:id="@+id/listView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/RelativeLayout2" >
</ListView>

</RelativeLayout>
0 0
خب درسته کد شما هم برای تصویر وسطی، از پایین بهش margin اضافه شده برای اینکه در وسط هم قرار بگیره layout_centralHorizental مقدارش true ست شده من چون دقیقاً تا وسط تصویر رو قرار ندادم بهش 112dp margin داد. (11 سال پیش)

پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .