zoukankan      html  css  js  c++  java
  • NiewPatchDrawable

    在使用AS的时候要注意以下几点:

    • 1.点9图不能放在mipmap目录下,而需要放在drawable目录下!
    • 2.AS中的.9图,必须要有黑线,不然编译都不会通过

    xml定义NinePatchDrawable:

    <!--pic9.xml-->  
    <!--参数依次为:引用的.9图片,是否对位图进行抖动处理-->  
    <?xml version="1.0" encoding="utf-8"?>  
    <nine-patch  
        xmlns:android="http://schemas.android.com/apk/res/android"  
        android:src="@drawable/dule_pic"  
        android:dither="true"/>  

    使用Bitmap包装.9图片:

    <!--pic9.xml-->  
    <!--参数依次为:引用的.9图片,是否对位图进行抖动处理-->  
    <?xml version="1.0" encoding="utf-8"?>  
    <bitmap  
        xmlns:android="http://schemas.android.com/apk/res/android"  
        android:src="@drawable/dule_pic"  
        android:dither="true"/>
  • 相关阅读:
    woj 1574
    UESTC 594 我要长高 dp单调队列
    HDU 3401 Trade dp 单调队列优化
    HDU 2844 Coins 多重背包
    2-1
    1-2
    1-1
    12-1
    9-1
    14-8
  • 原文地址:https://www.cnblogs.com/loaderman/p/10169015.html
Copyright © 2011-2022 走看看