下拉列表框与线性、帧布局管理器

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(帧布局)

原文地址:https://www.cnblogs.com/22joke/p/6874741.html