Skip to content
프로젝트

소개

모듈의 글꼴을 쉽게 변경할 수 있습니다. (앱 내 모든 구성 요소의 글꼴을 간편하고 빠르게 바꿀 수 있습니다.)

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

FontsManager

License Android Arsenal

有待重构

English Readme please cilick here

字体管理器,方便快速的为应用内所有组件更换字体。

作者微博: @GcsSloop

Demo演示

如何添加

1.在Project的build.gradle中添加仓库地址

	allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}

2.在Module目录下的build.gradle中添加依赖

	dependencies {
	        compile 'com.github.GcsSloop:FontsManager:v1.0.0'
	}

使用文档

初始化

PS: 初始化方式任选其一即可,并且初始化函数只需要调用一次。

	FontsManager.init(typeface);                     //传入一个typeface初始化
	FontsManager.initFormAssets(context, fontPath);  //传入上下文和字体包路径(字体文件在Assets中)
	FontsManager.initFormFile(fontFile);             //传入一个字体包文件
	FontsManager.initFormFile(fontFilePath);         //传入一个字体包文件路径

改变一个activity的字体

	FontsManager.changeFonts(activity);

改变一个view的字体

	FontsManager.changeFonts(view);

改变一个ViewGroup的字体

	FontsManager.changeFonts(viewGroup);

示例

	@Override
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		FontsManager.initFormAssets(this, "fonts/sao.ttf");	//初始化
		FontsManager.changeFonts(this);		                //进行替换
	}

更新说明

版本号 更新内容
v1.0.0 从 Bintray 迁移到 JitPack。

About Me

作者微博: @GcsSloop

开源协议

Copyright (c) 2015 GcsSloop

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.

관련 프로젝트 살펴보기

불러오는 중…