界面设计-滚动界面

来源:互联网 发布:北欧游戏 知乎 编辑:程序博客网 时间:2024/06/09 21:20

十分简单用ScrollView 包裹需要滚动的部分就可以

这是简单的效果一般的设计

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"

   android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="none"
    >
    <LinearLayout 
        android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
        >
    <ImageView 
    android:layout_width="fill_parent"
    android:layout_height="260dp"
    android:background="@drawable/f7"
    android:layout_marginLeft="0dp"
    android:layout_marginTop="0dp"
        />
    <LinearLayout 
     android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
        >
    <RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_marginTop="20dp"  
        >
        <ImageButton 
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:background="@drawable/e"
    android:id="@+id/e"
            />
     <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="你是盛夏"
    android:id="@+id/ming"
    android:layout_toRightOf="@id/e"
    android:textSize="15sp"
    android:textColor="#124578"
         /> 
      <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="那一起锁下的情锁,锁住了情,还是锁断了念!"
    android:layout_toRightOf="@id/e"
    android:textSize="13sp"
    android:layout_marginTop="25dp"
    android:layout_marginLeft="7dp"
         />     
    </RelativeLayout>
      <ImageView 
    android:layout_width="300dp"
    android:layout_height="200dp"
    android:background="@drawable/f2"
    android:layout_toRightOf="@id/e"
    android:layout_marginLeft="60dp"
      />
      </LinearLayout> 
     <LinearLayout 
     android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
        >
    <RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_marginTop="20dp"  
        >
        <ImageButton 
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:background="@drawable/e1"
    android:id="@+id/e1"
            />
     <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="小默"
    android:id="@+id/ming1"
    android:layout_toRightOf="@id/e1"
    android:textSize="15sp"
    android:textColor="#124578"
         /> 
      <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="爱情是灯,友情是影子,当灯灭了,你会发现你的周围都是影子。"
    android:layout_toRightOf="@id/e1"
    android:textSize="13sp"
    android:layout_marginTop="25dp"
    android:layout_marginLeft="7dp"
         />     
    </RelativeLayout>
      <ImageView 
    android:layout_width="300dp"
    android:layout_height="200dp"
    android:background="@drawable/d"
    android:layout_toRightOf="@id/e1"
    android:layout_marginLeft="60dp"
      />
      </LinearLayout> 
      
     
     
     
    
          <LinearLayout 
     android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
        >
    <RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_marginTop="20dp"  
        >
        <ImageButton 
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:background="@drawable/e2"
    android:id="@+id/e2"
            />
     <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="夕阳"
    android:id="@+id/ming2"
    android:layout_toRightOf="@id/e2"
    android:textSize="15sp"
    android:textColor="#124578"
         /> 
      <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="属于自己的,不要放弃。已经失去的,留作回忆。"
    android:layout_toRightOf="@id/e2"
    android:textSize="13sp"
    android:layout_marginTop="25dp"
    android:layout_marginLeft="7dp"
         />     
    </RelativeLayout>
      <ImageView 
    android:layout_width="300dp"
    android:layout_height="200dp"
    android:background="@drawable/f3"
    android:layout_toRightOf="@id/e2"
    android:layout_marginLeft="60dp"
      />
      </LinearLayout> 
      
          
          
           <LinearLayout 
     android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
        >
    <RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_marginTop="20dp"  
        >
        <ImageButton 
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:background="@drawable/e3"
    android:id="@+id/e3"
            />
     <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="执念"
    android:id="@+id/ming3"
    android:layout_toRightOf="@id/e3"
    android:textSize="15sp"
    android:textColor="#124578"
         /> 
      <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="生活中的成功者,总是看得比别人远,想得比别人深,做得比别人多。"
    android:layout_toRightOf="@id/e3"
    android:textSize="13sp"
    android:layout_marginTop="25dp"
    android:layout_marginLeft="7dp"
         />     
    </RelativeLayout>
      <ImageView 
    android:layout_width="300dp"
    android:layout_height="200dp"
    android:background="@drawable/image3"
    android:layout_toRightOf="@id/e2"
    android:layout_marginLeft="60dp"
      />
      </LinearLayout> 
      
        
           
                    <LinearLayout 
     android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
        >
    <RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_marginTop="20dp"  
        >
        <ImageButton 
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:background="@drawable/e4"
    android:id="@+id/e4"
            />
     <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="意念"
    android:id="@+id/ming4"
    android:layout_toRightOf="@id/e4"
    android:textSize="15sp"
    android:textColor="#124578"
         /> 
      <TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="人生是如此的短暂,哪有心思去浪费呢?"
    android:layout_toRightOf="@id/e4"
    android:textSize="13sp"
    android:layout_marginTop="25dp"
    android:layout_marginLeft="7dp"
         />     
    </RelativeLayout>
      <ImageView 
    android:layout_width="300dp"
    android:layout_height="200dp"
    android:background="@drawable/f1"
    android:layout_toRightOf="@id/e4"
    android:layout_marginLeft="60dp"
      />
      </LinearLayout> 
      
                    
</LinearLayout>
</ScrollView>
0 1