GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - GcsSloop/FontsManager: help you change the module font easily.(方便快速的为应用内所有组件更换字体)

BranchesTags
Open more actions menu

Latest commit

 

History

88 Commits
88 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle/wrapper
gradle/wrapper
 
 
library
library
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README-EN.md
README-EN.md
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
local.properties
local.properties
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

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.

About

help you change the module font easily.(方便快速的为应用内所有组件更换字体)

Resources

Readme
EPL-1.0 license
Activity

Stars

472 stars

Watchers

18 watching

Forks

78 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.