Fix a small typeface related memory leak.

This commit is contained in:
SerpentSpirale 2021-08-12 18:06:46 +02:00
parent 42e07ea04e
commit c5765c3981

View File

@ -4,6 +4,10 @@ import android.content.*;
import android.graphics.*;
import android.util.*;
import androidx.core.content.res.ResourcesCompat;
import net.kdt.pojavlaunch.R;
public class MineButton extends androidx.appcompat.widget.AppCompatButton
{
@ -17,7 +21,7 @@ public class MineButton extends androidx.appcompat.widget.AppCompatButton
}
public void init() {
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "font/noto_sans_bold.ttf"));
setTypeface(ResourcesCompat.getFont(getContext(), R.font.noto_sans_bold));
}
}