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

  • 相关阅读:
    tensorflow 学习
    join-semi and join-anti
    深入拆解Tomcat_Jetty 笔记
    Set化
    DDD实战-笔记
    高并发系统设计-笔记
    技术管理
    性能调优-笔记
    程序员是如何思考的-笔记
    LeetCode
  • 原文地址:https://www.cnblogs.com/tz4630/p/6908762.html
Copyright © 2011-2022 走看看