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


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

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

#1
سلام میشه یکی برام این دوتا کد که برای ظاهر برنامه هست رو یک کد بکنه بهم بده؟
من هرجور میکنم خطا میده بهم

کد اول

کد پی‌اچ‌پی:
<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" >

    <
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
        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" >
        </
LinearLayout>
    </
ScrollView

بعبارت دیگه میخوام رو کد اولی که قرار دادم قابلیت اسکرول ویو داشته باشه ولی نمیدونم چرا کدهای اسکرول ویو رو که میریزم تو کد اولی خطا میگیره میشه یکی این دوتا رو ادغام کنه بصورت صحیح؟؟
پاسخ


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

پرش به انجمن:


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