zoukankan      html  css  js  c++  java
  • 使用android:layout_weight解决布局时把按纽压到屏幕外的问题

    <?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:orientation
    ="vertical" >

        <Gallery 
            
    android:id="@+id/gallery"
            android:layout_width
    ="fill_parent"
            android:layout_height
    ="70px"
            
    />
        
        <GridView 
               
    android:id="@+id/gridview"    
               android:layout_width
    ="fill_parent"     
               android:layout_height
    ="fill_parent"   
               android:columnWidth
    ="90px"   
               android:numColumns
    ="auto_fit"    
               android:verticalSpacing
    ="2dp"    
               android:horizontalSpacing
    ="2dp"   
               android:stretchMode
    ="columnWidth"    
               android:gravity
    ="center"
               
               android:layout_below
    ="@id/gallery"
               
    />
        
        <LinearLayout
            
    android:id="@+id/linesexshow"
            android:layout_width
    ="fill_parent"
               android:layout_height
    ="fill_parent"
               android:layout_below
    ="@id/gallery"
               android:orientation
    ="vertical"
               android:visibility
    ="gone"
            
    >
            
            <ImageView 
                
    android:id="@+id/ivsexshow"
                android:layout_width
    ="fill_parent"     
                android:layout_height
    ="0dp" 
                android:layout_centerHorizontal
    ="true"
                android:visibility
    ="gone"
                android:scaleType
    ="fitCenter"
                android:layout_weight
    ="100"
                
    />
            <Button 
                
    android:id="@+id/btnback"
                android:layout_width
    ="fill_parent"
                android:layout_height
    ="wrap_content"
                android:text
    ="@string/btnback"
                android:visibility
    ="gone"
                android:layout_centerHorizontal
    ="true"
                android:layout_weight
    ="1"
                
    />
            
            
        </LinearLayout>
    </RelativeLayout>
  • 相关阅读:
    Source Insight的一些使用技巧
    ADS中Image$$RO$$Limit的计算
    JQuery 对 Select option 的操作
    设计模式: 细节[装饰模式]
    ObjectContext 实例已释放,不可再用于需要连接的操作
    关于一个多线程面试题的理解
    [Head First]第三章:装饰模式
    [Head First]第一章:策略模式
    MVC4 DropDownListFor的问题
    如何调试MVC4的代码
  • 原文地址:https://www.cnblogs.com/zziss/p/2346230.html
Copyright © 2011-2022 走看看