PDA

View Full Version : طراحی layout



momayyezi_m
پنج شنبه 12 شهریور 1394, 15:02 عصر
سلام دوستان ..واقعا سرچ کردم ولی به چیزی نرسیدم و برای همین تاپیک زدم
همچین صفحه ای اگه بخوام طراحی کنم چه کار باید بکنم
اگه یه نمونه برنامه خیلی ساده هم کدهاش باشه خودم میرم یاد میگیرم .دمتون گرم
134891

iran_sun99
پنج شنبه 12 شهریور 1394, 16:14 عصر
سلام دوست عزیز
ساخت این فرم کلا یک ساعت طول میکشه
چیشو میخوای یاد بگیری؟
اینا همش با linearlayout درست شده

javdanmj
جمعه 13 شهریور 1394, 22:45 عصر
سلام دوست عزیز
ساخت این فرم کلا یک ساعت طول میکشه
چیشو میخوای یاد بگیری؟
اینا همش با linearlayout درست شده

سلام
درسته میشه با LinearLayout درستش کرد
ولی به نظرم اگه با LinearLayout درست بشه تغییر ، اضافه کردن ، حذف کردن که البته حتما پیش میاد باعث دردسر میشه
من اگه بودم اونو با Custom Grid View درست میکردم
اگه منظورت اینه چطور طول هر المنت 50 درصد صفحه شده این شاید کمکت بکنه
134974


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



<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Text"
android:id="@+id/textView4" />

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Text"
android:id="@+id/textView5" />
</LinearLayout>

<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Button"
android:id="@+id/button" />

<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Button"
android:id="@+id/button2" />
</LinearLayout>
</LinearLayout>

H120:D
سه شنبه 17 شهریور 1394, 11:55 صبح
سلام
درسته میشه با LinearLayout درستش کرد
ولی به نظرم اگه با LinearLayout درست بشه تغییر ، اضافه کردن ، حذف کردن که البته حتما پیش میاد باعث دردسر میشه
من اگه بودم اونو با Custom Grid View درست میکردم
اگه منظورت اینه چطور طول هر المنت 50 درصد صفحه شده این شاید کمکت بکنه
134974


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



<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Text"
android:id="@+id/textView4" />

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Text"
android:id="@+id/textView5" />
</LinearLayout>

<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Button"
android:id="@+id/button" />

<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:text="New Button"
android:id="@+id/button2" />
</LinearLayout>
</LinearLayout>



ببخشید چرا من این رو کپی میکنم تویِ XML م اررور میده که این آبجکت ها نیستن ؟؟؟

حقیقتش من میخوم ماشین حساب بنویسم دکمه هاش داینامیک باشه تویِ هر صفحه ای چکار کنم ؟