当前位置: 代码迷 >> Android >> 安卓界面
  详细解决方案

安卓界面

热度:80   发布时间:2016-04-28 04:46:44.0
安卓界面,求助

<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:orientation="vertical"
    tools:context=".MainActivity" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:orientation="vertical"
        tools:context=".MainActivity" >

        <ImageView
            android:layout_width="150dp"
            android:layout_height="30dp"
            android:background="#ff0000" />
             
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:orientation="horizontal"
        tools:context=".MainActivity" >
        
        <ImageView
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="#EEDC82" />
         
            
         
         <ImageView
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="#EED8AE" />
         
      <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:orientation="vertical"
        tools:context=".MainActivity" >
        
        <ImageView
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="#9AFF9A" />
      
         <ImageView
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="#9ACD32" />
       
          <ImageView
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="#9AC0CD" />
    
      
</LinearLayout>
</LinearLayout>
</LinearLayout>
求助,如何让下面颜色变成水平链接,然后垂直排列的。就是两个或者三个颜色一行,然后下面接着再那样。而不是图片上那样
------解决方案--------------------

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#880016"
    >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#000000"
        android:layout_marginTop="20dp"
        android:orientation="vertical" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
  相关解决方案