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


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

تعریف ScrollView (در برنامه نویسی اندروید)

#2
دوست عزیز شما باید قبل از گذلشتن هر چیز اسکرول ویو رو بزاری اگر دقت کنی یه linearlayout بین کد های اسکلرول هست تو باید کد ها رو بین اونا پیست کنی با این کد  هایی که گذاشتی کد نهایی تو میشه این:

کد پی‌اچ‌پی:
<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:background="@drawable/subjects_background"
    
android:orientation="vertical"
    
tools:context=".Show_Subjects" >
<
ScrollView
        android
:id="@+id/scrollView1"
        
android:layout_width="match_parent"
        
android:layout_height="match_parent" >

        <
LinearLayout
            android
:layout_width="match_parent"
            
android:layout_height="match_parent"
            
android:orientation="vertical" >
//کد های اجزای اکتیوتی مثل نوشته و عکس و... رو اینجا قرار بده من خودم اون کد هایی که با نوشتی رو قرار دادم
<TextView
        android
:id="@+id/textView1"
        
android:layout_width="match_parent"
        
android:layout_height="wrap_content"
        
android:layout_margin="8dp"
        
android:gravity="right"
        
android:textSize="20sp"
        
android:text="@string/hello_world" />
    
    <
TextView
        android
:id="@+id/textView2"
        
android:layout_width="match_parent"
        
android:layout_height="wrap_content"
        
android:layout_margin="8dp"
        
android:gravity="right"
        
android:textSize="20sp"
        
android:text="@string/hello_world" />
    
    <
TableRow
        android
:id="@+id/tableRow1"
        
android:layout_width="wrap_content"
        
android:layout_height="wrap_content"
        
android:layout_gravity="center" >

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

    </
TableRow>
        </
LinearLayout>
    </
ScrollView
</
LinearLayout
 
Better then Best
پاسخ
 سپاس شده توسط تازه کار ، aliasghar ، admin


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

پرش به انجمن:


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