zoukankan      html  css  js  c++  java
  • 修改ListView的字体颜色和大小

    自定义XML文件,在适配器中引用该文件即可!
    xml文件

    <?xml version="1.0" encoding="utf-8"?>
        <TextView xmlns:android="http://schemas.android.com/apk/res/android"
           android:id="@+id/TextView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
             android:textSize="16sp"
            android:padding="10dp"
            android:textColor="#ff000000"
            android:shadowDx="4"
             android:shadowDy="4"
            android:shadowRadius="2"
          />

    适配器设置

    adapter=new ArrayAdapter<String>(this,R.layout.list_xx,list);

    切记要在Oncreate里面初始化,否则将会出现R文件错误!

  • 相关阅读:
    Redis 安装和启动
    有序的map类--LinkedHashMap
    Springmvc
    工厂模式
    Top K
    判断链表是否有环
    注解
    Spring 事务
    热点账户高并发解决方案
    sql优化
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13309798.html
Copyright © 2011-2022 走看看