mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
Fix a small typeface related memory leak.
This commit is contained in:
parent
42e07ea04e
commit
c5765c3981
@ -4,6 +4,10 @@ import android.content.*;
|
|||||||
import android.graphics.*;
|
import android.graphics.*;
|
||||||
import android.util.*;
|
import android.util.*;
|
||||||
|
|
||||||
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
|
|
||||||
|
import net.kdt.pojavlaunch.R;
|
||||||
|
|
||||||
public class MineButton extends androidx.appcompat.widget.AppCompatButton
|
public class MineButton extends androidx.appcompat.widget.AppCompatButton
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -17,7 +21,7 @@ public class MineButton extends androidx.appcompat.widget.AppCompatButton
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
setTypeface(Typeface.createFromAsset(getContext().getAssets(), "font/noto_sans_bold.ttf"));
|
setTypeface(ResourcesCompat.getFont(getContext(), R.font.noto_sans_bold));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user