انجمن سایت کلیدستان


رتبه موضوع:
  • 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
عناصر گرافیکی لایوت (layout) (برنامه نویسی اندروید)

عناصر گرافیکی لایوت (layout) (برنامه نویسی اندروید)

#2
سلام

مشکل شما در استفاه از Layout مناسب هستش
باید برای انجام این کار از یکی از 3 Layout زیر استفاده کنید 

FrameLayout
AbsoluteLayout
RelativeLayout


که برای مثال من از RelativeLayout استفاده کردم

کد:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
               android:id="@+id/scrollView1"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:background="@drawable/j" >

       <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                       android:layout_width="match_parent"
                       android:layout_height="match_parent"
                       android:orientation="vertical" >

           <ImageView
               android:id="@+id/splash_imageview"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:layout_centerInParent="true"
               android:scaleType="centerCrop" />

           <TextView
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_gravity="center_horizontal"
               android:layout_marginBottom="20dip"
               android:layout_centerInParent="true"
               android:background="#AA000000"
               android:padding="12dip"
               android:text="SomeText"
               android:textColor="#ffffffff" />

       </RelativeLayout>

   </ScrollView>


فایل‌های پیوست

عکس(ها)
   
پاسخ
 سپاس شده توسط admin ، تازه کار


پیام‌های این موضوع
RE: عناصر گرافیکی لایوت - توسط mahdi10539 - ۱۳۹۴/۱۰/۲۹, ۰۹:۲۶ ب.ظ
RE: عناصر گرافیکی لایوت - توسط تازه کار - ۱۳۹۴/۱۰/۲۹, ۰۹:۵۸ ب.ظ

پرش به انجمن:


کاربران در حال بازدید این موضوع: 1 مهمان