# FontResize
**Repository Path**: 327744707/FontResize
## Basic Information
- **Project Name**: FontResize
- **Description**: 仿微信/支付宝 字体大小 调整控件
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2020-04-23
- **Last Updated**: 2025-06-17
## Categories & Tags
**Categories**: webui
**Tags**: None
## README
[](https://jitpack.io/#liujingxing/fontresize)
FontResize是一个仿微信/支付宝 字体大小 调整控件的库
**gradle依赖**
将`jitpack`添加到项目的`build.gradle`文件中,如下:
```java
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
```
`注:FontResize 1.1.0版本起,已全面从JCenter迁移至jitpack`
```java
com.github.liujingxing:fontresize:1.1.0'
```
该库里面只有一个类`FontResizeView`,故不用担心库很大。
**效果图**

### 属性说明
```xml
```
### xml配置
```xml
```
### 设置回调
```java
FontResizeView fontResizeView = findViewById(R.id.font_resize_view);
fontResizeView.setOnFontChangeListener(new OnFontChangeListener() {
@Override
public void onFontChange(float fontSize) {
//字体size改变回调 单位:sp
}
});
```
这样配置过后,代码跑起来效果就跟上面的 gif 动图一样
我们把所有属性都加上,看看效果
```xml
```
效果如下

相信以上属性已经能满足大部分场景,如果不能满足您的场景,请提出您的需求,我会第一时间回应您。
# Licenses
```
Copyright 2019 liujingxing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```