zoukankan      html  css  js  c++  java
  • 15-下拉选择器Spinner

    SpinnerActivity.java

    activity_spinner.xml

    item_dropdown.xml(选择框)

    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="40dp"
        android:gravity="center"
        android:textSize="17sp"
        android:textColor="#ff0000" />

    item_select.xml(选择项)

    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/tv_name"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:singleLine="true"
        android:gravity="center"
        android:textSize="17sp"
        android:textColor="#0000ff" />

     item_simple.xml(图文选择项)

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
    
        <!-- 这是展示行星图标的ImageView -->
        <ImageView
            android:id="@+id/iv_icon"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_weight="1"
            android:gravity="center" />
    
        <!-- 这是展示行星名称的TextView -->
        <TextView
            android:id="@+id/tv_name"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="3"
            android:gravity="center"
            android:textSize="17sp"
            android:textColor="#ff0000" />
    </LinearLayout>

  • 相关阅读:
    php内核为变量的值分配内存的几个宏
    php7 引用成为一种类型
    function参数
    execvp php-fpm reload使用的函数
    fastcgi
    php-fpm定时器
    php 类继承
    php 对象 调用静态方法
    php unset变量
    php5数组与php7数组区别
  • 原文地址:https://www.cnblogs.com/fdxjava/p/14801850.html
Copyright © 2011-2022 走看看