Android開發:自定義銀行app的最大額度控件

詳解

前幾天看到掌上生活上一個好玩的最大額度提示的頁面,做爲程序員的我,不能光看別人作的效果,因而本身也擼了一個差很少的額度控件了。android

掌上生活效果:

image

今天就是這麼個玩意是個主角了。好了,下面也來看看咋們要實現的結果:git

image

使用:

xml:程序員

<com.xiangcheng.amount.AmountView
 android:id="@+id/amount_view"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:layout_centerInParent="true"
 app:hint_text="Max Amount"
 app:max_amount="30000"
 app:shadow_color="#FFD700" />

複製代碼

這裏就定義了三個屬性:github

**hint_text:**提示文字面試

**max_amount:**最大的額度bash

**shadow_color:**背景顏色微信

code:架構

//代碼中設置額度
public void setAmount(int amount) {
}

複製代碼
//啓動動畫
public void start() {
}

複製代碼

maven dependence:app

<dependency>
 <groupId>com.a1002326270</groupId>
 <artifactId>amountlibs</artifactId>
 <version>1.0</version>
 <type>pom</type>
</dependency>

複製代碼

gradle dependence:maven

implementation 'com.a1002326270:amountlibs:1.0'

複製代碼

源碼地址:

github.com/xiangcman/A…

Android學習PDF+架構視頻+面試文檔+源碼筆記

最後

感謝你們能耐着性子,看完這篇文章。

在這裏我也分享一份本身收錄整理的Android學習PDF+架構視頻+面試文檔+源碼筆記,還有高級架構技術進階腦圖、Android開發面試專題資料,高級進階架構資料幫助你們學習提高進階,也節省你們在網上搜索資料的時間來學習,也能夠分享給身邊好友一塊兒學習

若是你有須要的話,能夠點贊關注我,而後關注微信公衆號【Android開發之家】免費領取

image

image
相關文章
相關標籤/搜索