Skip to content
集成常用的自定义控件
Branch: master
Clone or download
luoqingfeng
luoqingfeng update minvalue
Latest commit 2bcae75 Mar 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
newbutton
.gitignore
README.md
build.gradle
example.gif
gradle.properties
gradlew
gradlew.bat
settings.gradle
useImag.jpg
ways2.gif

README.md

用于购物车添加或者减少按钮

使用方式

step1

allprojects {
		repositories {
			...
			maven { url 'https://www.jitpack.io' }
		}
	}
dependencies {
          implementation 'com.github.lqfGaara:MySDk:v1.2'
  }

step2

<lqf.com.newbutton.AmountView
     android:id="@+id/amountView"
     android:layout_centerInParent="true"
     android:layout_width="wrap_content"
     app:etTextColor="@color/colorPrimary"
     app:btnTextSize="20sp"
     app:btnWidth="40dp"
     app:tvWidth="60dp"
     android:layout_height="50dp"/>
名称 作用
btnTextSize 按钮的大小
etTextColor 中间文字的颜色
btnWidth 每一个按钮的宽度
tvWidth 中间文字的宽度
<lqf.com.newbutton.PullDownSelectionButton
       android:layout_marginTop="20dp"
       android:layout_below="@id/amountView"
       android:id="@+id/pull_bt"
       android:layout_centerInParent="true"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       app:background="@drawable/bt_background"
       app:buttonHeight="50dp"
       app:buttonWidth="80dp"
       app:text="123"
       app:buttonTextColor="#666666"
       app:textSize="20sp" />
名称 作用
buttonHeight 按钮的高度
buttonWidth 按钮的宽度
buttonTextColor 文字颜色
textSize 中间文字的大小
text 需要默认显示的文字
background 按钮的背景

演示效果图

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.