GiftRainView,一個用來下金幣,下紅包的View
GiftRainView
還記得有一招從天而降的功夫?GiftRainView,一個用來下金幣,下紅包的View
直接看效果
Usage
Step 1
Install with gradle
dependencies { compile 'com.xujinyang.GiftRainView:library:1.0.0' }
Step 2
attrs:
參數 | 類型 | 含義 |
---|---|---|
gift_background | color | 背景顏色 |
gift_count | integer | 屏幕內物體數量 |
gift_duration | integer | 動畫時長 |
Step 3
public class MainActivity extends Activity { private GiftRainView giftRainView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); giftRainView = (GiftRainView) findViewById(R.id.dropview); giftRainView.setImages(R.mipmap.ico_money, R.mipmap.ico_gold_money); } }
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!