zoukankan      html  css  js  c++  java
  • 下拉列表框与线性、帧布局管理器

    6.Spinner(下拉列表框)  

      6.1下拉列表选项的配置方式  

       第一步:在String.xml配置   

       <string name="hei">选择省份</string>      

       <string-array name="sheng">        

          <item>湖南</item>      

           <item>广州</item>        

          <item>浙江</item>       

        </string-array>

        第二部:指定资源   android:entries="@array/sheng"

             适配器配置    

        第一种:资源配置

       ArrayAdapter<CharSequence> adapterCity=ArrayAdapter.createFromResource         ( this, 资源id,列表显示样式);  //从资源文件夹读取信息   

         第二种:列表配置  

       ArrayAdapter<CharSequence> adapterCity=new ArrayAdapter<CharSequence>  (this,列表显示样式,集合数据);

    7.布局方式  

        7.1LinearLayout(线性布局)   

      常用属性:android:orientation="vertical  or horizontal"  垂直或水平布局        

           android:layout_width="fill_parent"       

           android:layout_height="wrap_content"    

        wrap_content:宽度/高度  和内容的宽度/高度相同    fill_parent:宽度/高度  是整父件的宽度/高度相同

        7.2:FrameLayout(帧布局)

  • 相关阅读:
    C#的编码规范中文版(www.idesign.net Author: Juval Lowy)
    [经典推荐]事半功倍系列之javascript(二)
    [推荐]让SQL跑得更快
    SortedList 用法
    在C#中应用哈希表(Hashtable)
    SVN配置安装
    sql事务处理回滚及保留点transaction,ROLLBACK
    启用Service Broker
    BLOB
    WebServiceBinding属性
  • 原文地址:https://www.cnblogs.com/tz4630/p/6889900.html
Copyright © 2011-2022 走看看