은 내가 글꼴 자산/글꼴 아래에 있었다 확인했다 안드로이드 프로그래밍 버튼 글꼴
Button loginButton = (Button) findViewById(R.id.login_button);
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Lato-Regular.ttf");
loginButton.setTypeface(tf);
라는 다음 버튼을 만들어 변경되지 않습니다. 정확한 파일 이름은/Users/
입니다. myusername/Documents/GitHub/
appname /app/src/main/assets/fonts/Lato-BoldItalic.ttf입니다.
그러나 단추의 글꼴은 여전히 변경되지 않습니다. 여기서 문제가 될 수있는 것은 무엇입니까?
편집 : 확장 된 코드
protected void onCreate(Bundle savedInstanceState) {
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId("###")
.server("https://parseapi.back4app.com/")
.clientKey("###")
.enableLocalDataStore()
.build()
);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
Button loginButton = (Button) findViewById(R.id.login_button);
Typeface tf = Typeface.createFromAsset(getAssets(), "Lato-Regular.ttf");
loginButton.setTypeface(tf);
more stuff
시도했지만 여전히 작동하지 않습니다. :/다른 문제가 있을지 모르겠습니다. – chickenwings
여전히 어떤 이유로 든 작동하지 않습니다. ( – chickenwings
내 업데이트 된 게시물보기 – Raja